/* =========================================================
   SIPEG — Direktori Pegawai · stylesheet utama
   ========================================================= */
:root {
    --brand: #0f766e;
    --brand-2: #14b8a6;
    --brand-ink: #ffffff;
    --accent: #f59e0b;
    --bg: #f5f7f6;
    --surface: #ffffff;
    --surface-2: #f0f4f3;
    --text: #0f1f1c;
    --text-2: #5b6b68;
    --line: #e3e9e7;
    --danger: #dc2626;
    --success: #059669;
    --warning: #d97706;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(15, 31, 28, .04), 0 4px 16px rgba(15, 31, 28, .06);
    --shadow-lg: 0 10px 40px rgba(15, 31, 28, .12);
    --hero-1: #0b3b36;
    --hero-2: #0f766e;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --brand: #2dd4bf;
    --brand-2: #5eead4;
    --brand-ink: #042f2b;
    --bg: #0b1211;
    --surface: #121c1a;
    --surface-2: #182421;
    --text: #e6efed;
    --text-2: #93a6a2;
    --line: #22312e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);
    --hero-1: #06201d;
    --hero-2: #0d4d47;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.ico { flex-shrink: 0; vertical-align: middle; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding-top: 28px; padding-bottom: 56px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.d-block { display: block; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- Tombol ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
    font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
    text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer;
    transition: all .15s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.theme-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.theme-btn:hover { color: var(--brand); }

/* ---------- Topbar publik ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; min-width: 0; }
.brand-logo {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
}
.brand-logo.lg { width: 60px; height: 60px; border-radius: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 800; }
.brand-text small { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav > a:not(.btn) {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
    color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none;
}
.nav > a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.nav > a.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--hero-1); }
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, #14b8a6aa, transparent 60%),
        linear-gradient(135deg, var(--hero-1), var(--hero-2));
}
.hero-bg::after {
    content: ""; position: absolute; inset: 0; opacity: .12;
    background-image:
        linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(60deg, #ffffff77 25%, transparent 25.5%, transparent 75%, #ffffff77 75%, #ffffff77);
    background-size: 40px 70px;
    background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0;
    mask-image: linear-gradient(to bottom, #000, transparent 90%);
}
.hero-inner { position: relative; padding-top: 64px; padding-bottom: 72px; text-align: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; margin: 18px 0 14px; }
.grad { background: linear-gradient(90deg, #fde68a, #fbbf24, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 17px; opacity: .85; max-width: 620px; margin: 0 auto; }
.hero-search {
    display: flex; align-items: center; gap: 10px; max-width: 680px; margin: 30px auto 0;
    padding: 8px 8px 8px 18px; border-radius: 18px; background: var(--surface); color: var(--text-2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.hero-search input[type=search], .hero-search input[type=search]:focus { flex: 1; min-width: 0; border: 0; outline: 0; box-shadow: none; border-radius: 0; font: inherit; font-size: 16px; background: transparent; color: var(--text); padding: 10px 0 !important; }
.hero-search:focus-within { box-shadow: 0 20px 50px rgba(0, 0, 0, .25), 0 0 0 4px rgba(255,255,255,.25); }
.hero-search .btn { padding: 12px 24px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 760px; margin: 36px auto 0; }
.hero-stats div { padding: 16px 10px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.hero-stats strong { display: block; font-size: 28px; font-weight: 800; }
.hero-stats span { font-size: 13px; opacity: .8; }

/* ---------- Page head ---------- */
.page-head { position: relative; padding: 48px 0 36px; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: #fff; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin: 14px 0 8px; }
.page-head .lead { margin: 0; }

/* ---------- Card ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head h2 .ico { color: var(--brand); }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: -60px; position: relative; z-index: 2; padding: 14px; box-shadow: var(--shadow-lg); }
.filter-bar .field { flex: 1 1 200px; }
select, textarea, input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]) {
    width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; outline: none; font-weight: 500;
    transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 36px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
select:focus, input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
input[type=color] { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: var(--surface); cursor: pointer; }

.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 12px; gap: 2px; }
.seg label { padding: 8px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer; transition: all .15s; user-select: none; }
.seg label.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg-block { display: flex; margin-bottom: 14px; }
.seg-block label { flex: 1; text-align: center; }

.result-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 16px; color: var(--text-2); gap: 12px; flex-wrap: wrap; }
.link-reset { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }

/* ---------- Kartu pegawai ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.emp-card {
    position: relative; display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important;
    box-shadow: var(--shadow); overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    animation: rise .45s both; animation-delay: var(--d, 0ms);
}
.emp-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 76px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 4%, transparent));
}
.emp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.emp-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.emp-name { font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.emp-role { color: var(--text-2); font-size: 13.5px; margin: 4px 0 12px; }
.emp-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.emp-scores { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 14px; border-top: 1px dashed var(--line); text-align: center; }
.emp-scores-tendik { grid-template-columns: repeat(3, 1fr); }
.emp-scores strong { display: block; font-size: 15px; font-weight: 800; color: var(--text); }
.emp-scores span { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Avatar ---------- */
.avatar { width: 64px; height: 64px; border-radius: 18px; object-fit: cover; flex-shrink: 0; border: 3px solid var(--surface); box-shadow: var(--shadow); }
.avatar-initial {
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; letter-spacing: .02em;
    background: linear-gradient(135deg, var(--c, #0f766e), color-mix(in srgb, var(--c, #0f766e) 55%, #000));
}
.avatar-sm { width: 38px; height: 38px; border-radius: 11px; font-size: 13px; border-width: 2px; }
.avatar-xl { width: 128px; height: 128px; border-radius: 32px; font-size: 42px; border-width: 4px; }

/* ---------- Badge & chip ---------- */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge-dosen  { background: color-mix(in srgb, #0f766e 14%, var(--surface)); color: #0f766e; }
.badge-tendik { background: color-mix(in srgb, #d97706 16%, var(--surface)); color: #b45309; }
.badge-admin  { background: color-mix(in srgb, #7c3aed 14%, var(--surface)); color: #7c3aed; }
.badge-soft   { background: var(--surface-2); color: var(--text-2); }
:root[data-theme="dark"] .badge-dosen { color: #5eead4; }
:root[data-theme="dark"] .badge-tendik { color: #fbbf24; }
:root[data-theme="dark"] .badge-admin { color: #c4b5fd; }
.chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px;
    font-size: 12px; font-weight: 700;
    background: color-mix(in srgb, var(--c, var(--brand)) 13%, transparent);
    color: color-mix(in srgb, var(--c, var(--brand)) 80%, var(--text));
}
.chip-soft { background: var(--surface-2); color: var(--text-2); font-weight: 600; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.pg { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none !important; }
a.pg:hover { border-color: var(--brand); color: var(--brand); }
.pg.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pg.disabled, .pg.dots { opacity: .45; }
.pg.dots { border: 0; background: none; }

.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .ico { color: var(--brand); opacity: .6; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

/* ---------- Profil ---------- */
.profile-hero { position: relative; padding: 28px 0 44px; color: #fff;
    background:
        radial-gradient(600px 300px at 90% 0%, color-mix(in srgb, var(--c) 70%, transparent), transparent 70%),
        linear-gradient(135deg, var(--hero-1), color-mix(in srgb, var(--c) 60%, var(--hero-1))); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; opacity: .85; font-weight: 600; font-size: 14px; margin-bottom: 20px; }
.profile-hero .back-link { color: #fff; }
.profile-head { display: flex; gap: 28px; align-items: center; }
.profile-head h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin: 10px 0 6px; }
.profile-sub { opacity: .85; margin-bottom: 14px; }
.profile-head .chip { background: rgba(255, 255, 255, .14); color: #fff; }
.profile-head .badge { background: rgba(255, 255, 255, .18); color: #fff; }
.profile-body { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.profile-side .card + .card, .profile-side .btn { margin-top: 20px; }
.score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px; }
.score-box { padding: 16px; border-radius: 14px; background: var(--surface-2); }
.score-box span { font-size: 13px; color: var(--text-2); }
.score-box strong { display: block; font-size: 28px; font-weight: 800; margin: 2px 0 10px; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); animation: grow 1s ease-out both; }
@keyframes grow { from { width: 0 !important; } }
.info-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; margin: 0; }
.info-list div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list .full { grid-column: 1 / -1; border-bottom: 0; }
.info-list dt { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.info-list dd { margin: 3px 0 0; font-weight: 600; }
.contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact li { display: flex; align-items: center; gap: 10px; word-break: break-all; }
.contact .ico { color: var(--brand); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: flex; align-items: center; gap: 12px; padding: 10px 6px; color: var(--text); text-decoration: none; border-radius: 10px; }
.mini-list a:hover { background: var(--surface-2); }
.mini-list a > span:not(.badge) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-list strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list small { font-size: 12.5px; color: var(--text-2); }

/* ---------- KPI & grafik ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.kpi:nth-child(2) .kpi-ico { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #d97706; }
.kpi:nth-child(3) .kpi-ico { background: color-mix(in srgb, #6366f1 14%, transparent); color: #6366f1; }
.kpi:nth-child(4) .kpi-ico { background: color-mix(in srgb, #e11d48 12%, transparent); color: #e11d48; }
.kpi:nth-child(5) .kpi-ico { background: color-mix(in srgb, #0ea5e9 14%, transparent); color: #0284c7; }
.kpi strong { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; }
.kpi small { color: var(--text-2); font-size: 13px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.chart-grid .card + .card { margin-top: 0; }
.span-2 { grid-column: span 2; }
.chart-wrap { position: relative; height: 260px; }
.chart-wrap.tall { height: 320px; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: 4px; }
.person { display: flex; align-items: center; gap: 10px; color: var(--text); }
.person > span { display: flex; flex-direction: column; min-width: 0; }
.person small { color: var(--text-2); font-size: 12.5px; }
a.person:hover { color: var(--brand); text-decoration: none; }
.rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-weight: 800; font-size: 13px; background: var(--surface-2); color: var(--text-2); }
.rank-1 { background: #fde68a; color: #92400e; }
.rank-2 { background: #e2e8f0; color: #334155; }
.rank-3 { background: #fed7aa; color: #9a3412; }
.table-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 12px; flex-wrap: wrap; }
.table-foot .pagination { margin: 0; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.dot-on::before { background: #10b981; box-shadow: 0 0 0 3px color-mix(in srgb, #10b981 25%, transparent); }
form.inline { display: inline; }

/* ---------- Alert ---------- */
.alert { position: relative; padding: 12px 40px 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; font-size: 14px; border: 1px solid; transition: all .25s; }
.alert-success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: color-mix(in srgb, var(--success) 80%, var(--text)); }
.alert-danger  { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: color-mix(in srgb, var(--danger) 80%, var(--text)); }
.alert-warning { background: color-mix(in srgb, var(--warning) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 30%, transparent); color: color-mix(in srgb, var(--warning) 80%, var(--text)); }
.alert-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 4px 8px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer p { color: var(--text-2); }

/* ---------- Login ---------- */
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 48px; }
.auth-art-inner { position: relative; max-width: 420px; }
.auth-art h2 { font-size: 36px; font-weight: 800; margin: 24px 0 6px; }
.auth-art p { opacity: .8; }
.auth-art ul { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.auth-art li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; }
.auth-card h1 { font-size: 28px; font-weight: 800; margin-top: 8px; }
.auth-card > .muted { margin: 4px 0 22px; }
.auth-card .btn-block { margin-top: 8px; padding: 13px; }
.auth-card .small { margin-top: 18px; }

/* ---------- Form ---------- */
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }
.form-label > input, .form-label > select, .form-label > .input-ico { margin-top: 6px; }
.input-ico { position: relative; display: flex; align-items: center; }
.input-ico > .ico { position: absolute; left: 13px; color: var(--text-2); pointer-events: none; }
.input-ico > input { padding-left: 40px; }
.grow { flex: 1 1 220px; }
.error { display: block; color: var(--danger); font-weight: 600; margin-top: 4px; font-size: 12.5px; }
.form-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.form-side { position: sticky; top: 88px; }
.form-main .card + .card { margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.photo-drop { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--line); transition: background .2s; flex-shrink: 0; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar select { width: auto; min-width: 150px; }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.split .card + .card { margin-top: 0; }
.sticky { position: sticky; top: 88px; }

/* ---------- Admin layout ---------- */
body.admin { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60; display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--line); padding: 20px 16px; transition: transform .25s;
}
.sidebar .brand { padding: 4px 8px 20px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); padding: 16px 12px 8px; opacity: .8; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; transition: all .15s; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
:root[data-theme="dark"] .side-nav a.active { color: var(--brand-ink); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.side-user > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-user strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { font-size: 12px; color: var(--text-2); }
.admin-main { flex: 1; margin-left: 260px; min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.admin-top h1 { font-size: 20px; font-weight: 800; flex: 1; }
.nav-toggle-admin { display: none; }
.admin-content { padding: 24px 28px 48px; max-width: 1400px; }
.sidebar-backdrop { display: none; }
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
    background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface) 60%); }
.welcome h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dash-grid .card + .card { margin-top: 0; }
.link { font-size: 13px; font-weight: 600; }
.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: 60px 1fr 32px; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.hbar strong { text-align: right; }
.hbar .bar { height: 10px; }
.progress-ring {
    --p: 0; width: 150px; height: 150px; margin: 6px auto 16px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0);
}
.progress-ring span { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; background: var(--surface); font-size: 28px; font-weight: 800; }

/* ---------- Responsif ---------- */
@media (max-width: 1024px) {
    .profile-body, .split, .form-layout { grid-template-columns: 1fr; }
    .form-side, .sticky { position: static; }
    .chart-grid, .dash-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 55; }
    .admin-main { margin-left: 0; }
    .nav-toggle-admin { display: inline-grid; }
    .admin-top { padding: 0 16px; }
    .admin-content { padding: 18px 16px 40px; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}
@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .nav-toggle { display: block; }
    .nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); display: none; }
    .nav.open { display: flex; }
    .nav .theme-btn { width: 100%; }
    .hero-inner { padding-top: 44px; padding-bottom: 80px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-search .btn { padding: 12px 16px; }
    .filter-bar .seg { width: 100%; }
    .filter-bar .seg label { flex: 1; text-align: center; }
    .profile-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .avatar-xl { width: 104px; height: 104px; font-size: 34px; }
    .info-list, .score-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-grid .span-2, .form-grid .span-3 { grid-column: 1 / -1; }
    .table-wrap { margin: 0 -22px; }
    .toolbar select { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Kartu tanpa link detail */
.emp-card-static { cursor: default; }
.emp-card-static:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }
