/* =========================================================
   ADMIN PANEL — STYLE
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --navy-950: #0b1324;
    --navy-900: #0f1b33;
    --navy-800: #16264a;
    --navy-700: #1d3361;
    --navy-100: #e7ecf7;
    --gold-500: #c79a3f;
    --gold-400: #d9b15c;
    --gold-100: #f7ecd3;
    --ink: #14181f;
    --ink-soft: #5b6072;
    --paper: #f5f5f2;
    --paper-card: #ffffff;
    --line: #e6e4dd;
    --green-600: #1f7a4d;
    --green-100: #e3f5ea;
    --red-600: #b3412c;
    --red-100: #fbe9e4;
    --yellow-700: #97650f;
    --yellow-100: #faf0d8;
    --gray-600: #6b7080;
    --gray-100: #eef0f3;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15,27,51,0.06);
    --shadow-md: 0 6px 20px rgba(15,27,51,0.08);
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1,h2,h3,h4 { font-family: var(--font-display); color: var(--navy-950); font-weight: 600; line-height: 1.25; }

/* ---------------- LAYOUT ---------------- */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: var(--navy-950);
    color: #fff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    padding: 26px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .logo-mark {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--gold-500); color: var(--navy-950);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 16px;
    flex-shrink: 0;
}
.sidebar-brand .s-name { font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.3; }
.sidebar-brand .s-tag { font-size: 11px; color: rgba(255,255,255,0.45); }

.sidebar-nav { flex: 1; padding: 18px 14px; overflow-y: auto; }
.sidebar-nav .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); padding: 14px 12px 8px; font-weight: 700; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.7);
    margin-bottom: 2px; transition: all 0.15s;
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav a.active { background: var(--gold-500); color: var(--navy-950); font-weight: 700; }
.sidebar-nav a .nav-count {
    margin-left: auto; background: rgba(255,255,255,0.12); color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.sidebar-nav a.active .nav-count { background: var(--navy-950); color: var(--gold-400); }

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.sidebar-user .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--navy-700); color: var(--gold-400);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.sidebar-user .u-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.sidebar-user .u-role { font-size: 11px; color: rgba(255,255,255,0.45); text-transform: capitalize; }

.main-content { flex: 1; min-width: 0; }

.topbar {
    background: var(--paper-card);
    border-bottom: 1px solid var(--line);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar h1 { font-size: 22px; }
.topbar .topbar-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.page-body { padding: 28px 32px 60px; }

/* ---------------- CARDS / STATS ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.stat-card .st-label { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.stat-card .st-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--navy-950); }
.stat-card .st-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-card .st-icon svg { width: 20px; height: 20px; }
.icon-navy { background: var(--navy-100); color: var(--navy-800); }
.icon-gold { background: var(--gold-100); color: var(--gold-500); }
.icon-green { background: var(--green-100); color: var(--green-600); }
.icon-red { background: var(--red-100); color: var(--red-600); }

.card {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-head h3 { font-size: 16.5px; }

/* ---------------- TABLE ---------------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
    text-align: left; padding: 12px 14px; background: var(--paper);
    color: var(--ink-soft); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data-table td { padding: 13px 14px; border-bottom: 1px solid #f0efe9; vertical-align: middle; }
table.data-table tr:hover td { background: #fafaf8; }
table.data-table .td-name { font-weight: 600; color: var(--ink); }
table.data-table .td-sub { font-size: 12px; color: var(--gray-600); }

.action-icons { display: flex; gap: 6px; }
.action-icons a, .action-icons button {
    width: 30px; height: 30px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-soft);
    transition: all 0.15s;
}
.action-icons a:hover { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.action-icons svg { width: 15px; height: 15px; }
.action-icons .danger:hover { background: var(--red-600); border-color: var(--red-600); }

/* ---------------- FORM (admin) ---------------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-control, select.form-control, textarea.form-control {
    width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 13.5px; background: #fff; transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(29,51,97,0.08); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ---------------- BUTTONS ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px;
    cursor: pointer; border: 1.5px solid transparent; transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-gold { background: var(--gold-500); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-400); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--navy-900); }
.btn-danger { background: var(--red-100); color: var(--red-600); }
.btn-danger:hover { background: var(--red-600); color: #fff; }
.btn-success { background: var(--green-100); color: var(--green-600); }
.btn-success:hover { background: var(--green-600); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn svg { width: 16px; height: 16px; }

/* ---------------- BADGES ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge-green { background: var(--green-100); color: var(--green-600); }
.badge-red { background: var(--red-100); color: var(--red-600); }
.badge-yellow { background: var(--yellow-100); color: var(--yellow-700); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ---------------- ALERTS ---------------- */
.alert { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; margin-bottom: 18px; }
.alert svg { width: 17px; height: 17px; flex-shrink: 0; }
.alert-success { background: var(--green-100); color: var(--green-600); }
.alert-danger { background: var(--red-100); color: var(--red-600); }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.6; font-size: 16px; color: inherit; }

/* ---------------- LOGIN ADMIN ---------------- */
.admin-login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(165deg, var(--navy-950), var(--navy-800));
    padding: 24px;
}
.admin-login-card {
    background: #fff; border-radius: var(--radius-lg); padding: 44px; width: 100%; max-width: 400px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.admin-login-card .logo-mark {
    width: 52px; height: 52px; border-radius: 14px; background: var(--navy-950); color: var(--gold-400);
    display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 22px;
    margin: 0 auto 18px;
}
.admin-login-card h2 { text-align: center; font-size: 22px; margin-bottom: 6px; }
.admin-login-card .sub { text-align: center; color: var(--ink-soft); font-size: 13.5px; margin-bottom: 28px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--gray-600); }
.input-icon-wrap .form-control { padding-left: 40px; }

/* ---------------- DETAIL PROFIL PENDAFTAR ---------------- */
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-header .p-avatar {
    width: 80px; height: 80px; border-radius: var(--radius-md); object-fit: cover;
    background: var(--navy-100); display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--navy-800);
}
.detail-row { display: grid; grid-template-columns: 200px 1fr; padding: 10px 0; font-size: 13.5px; border-bottom: 1px solid #f1f0eb; }
.detail-row .dr-label { color: var(--gray-600); }
.detail-row .dr-value { font-weight: 600; color: var(--ink); }

.file-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.file-preview-item {
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; text-align: center;
}
.file-preview-item svg { width: 28px; height: 28px; color: var(--navy-700); margin: 0 auto 8px; }
.file-preview-item .fp-label { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.file-preview-item.empty { opacity: 0.4; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { padding: 11px 18px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--navy-900); border-color: var(--gold-500); }

/* ---------------- PAGINATION / FILTER BAR ---------------- */
.filter-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-bar .form-control { width: auto; min-width: 160px; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--gray-600); }
.search-box input { padding-left: 38px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-600); }
.empty-state svg { width: 44px; height: 44px; margin: 0 auto 14px; opacity: 0.4; }

@media (max-width: 1024px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { width: 76px; }
    .sidebar-brand .s-name, .sidebar-brand .s-tag, .sidebar-nav a span, .nav-label, .sidebar-user .u-name, .sidebar-user .u-role { display: none; }
    .sidebar-nav a { justify-content: center; }
    .sidebar-user { justify-content: center; }
}
