/* ==========================================================================
   Manajemen File PPG Ekonomi UNY 2026 — style sheet
   ========================================================================== */

:root {
    --bg: #f5f7fc;
    --bg-soft: #eef2fb;
    --surface: #ffffff;
    --surface-2: #f8faff;
    --text: #131a2e;
    --text-soft: #45506b;
    --muted: #76809a;
    --border: #e5eaf3;
    --border-strong: #d7deed;
    --primary: #6155e8;
    --primary-dark: #4d41d4;
    --primary-soft: #eeecff;
    --teal: #0ea5a4;
    --amber: #f59e0b;
    --danger: #e5484d;
    --danger-soft: #fff0f0;
    --success: #0f9d70;
    --success-soft: #e8f8f1;
    --shadow-sm: 0 4px 16px rgba(24, 34, 66, .05);
    --shadow: 0 14px 40px rgba(24, 34, 66, .09);
    --shadow-lg: 0 28px 70px rgba(24, 34, 66, .16);
    --radius: 18px;
    --radius-sm: 12px;
    --sidebar: #121a36;
    --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #0a0f1e;
    --bg-soft: #0e1528;
    --surface: #131c33;
    --surface-2: #18213b;
    --text: #eef2ff;
    --text-soft: #c2cae0;
    --muted: #909bb8;
    --border: #26314f;
    --border-strong: #32405f;
    --primary: #8b7cff;
    --primary-dark: #7566f0;
    --primary-soft: #262347;
    --danger: #ff7075;
    --danger-soft: #3b1f2b;
    --success: #34d399;
    --success-soft: #12362f;
    --shadow-sm: 0 4px 18px rgba(0, 0, 0, .2);
    --shadow: 0 16px 42px rgba(0, 0, 0, .34);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, .45);
    --sidebar: #0d1429;
}

* { box-sizing: border-box; }

/* Atribut hidden harus selalu menang atas aturan display komponen. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
}

body.public-page { background: var(--bg); }
body.admin-page { background: var(--bg-soft); }

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(720px 420px at 88% -5%, rgba(97, 85, 232, .13), transparent 70%),
        radial-gradient(600px 380px at -5% 22%, rgba(14, 165, 164, .09), transparent 70%);
}

[data-theme="dark"] .site-bg {
    background:
        radial-gradient(720px 420px at 88% -5%, rgba(139, 124, 255, .13), transparent 70%),
        radial-gradient(600px 380px at -5% 22%, rgba(14, 165, 164, .08), transparent 70%);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; font-weight: 800; }
h2 { font-size: 22px; letter-spacing: -.02em; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .92em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; }
.icon { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- Buttons ------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(97, 85, 232, .25); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 12px 26px rgba(97, 85, 232, .32); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.icon-btn--danger:hover { color: var(--danger); border-color: var(--danger); }

.link-like { color: var(--primary); font-weight: 700; cursor: pointer; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-soft { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- Header publik ------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: 11px; color: var(--muted); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 6px; margin-left: 18px; }
.nav-link { padding: 9px 14px; border-radius: 9px; color: var(--text-soft); font-weight: 600; font-size: 13.5px; transition: background .18s, color .18s; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ---------- Hero ---------------------------------------------------------- */
.hero { padding-top: 44px; }
.hero-inner {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    align-items: center;
    gap: 30px;
    min-height: 400px;
    padding: 54px 56px;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(125deg, #4138b8 0%, #6455e8 46%, #8a5cf0 72%, #0e9fa3 130%);
    box-shadow: var(--shadow-lg);
}
.hero-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .22;
    background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(90deg, transparent, #000);
}
.hero-copy { position: relative; z-index: 2; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: 20px;
}
.hero-badge--light { background: rgba(255, 255, 255, .14); }
.hero h1 { color: #fff; margin-bottom: 16px; }
.hero h1 span { color: #ffd676; }
.hero-copy > p { max-width: 580px; color: rgba(255, 255, 255, .82); font-size: 15px; margin-bottom: 24px; }
.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 620px;
    padding: 7px 7px 7px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 40px rgba(15, 12, 60, .24);
    color: var(--muted);
}
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #1b2140; font-size: 13.5px; }
.hero-search .btn { flex: none; }
.hero-hints { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; font-size: 12px; color: rgba(255, 255, 255, .72); }
.hero-hints a { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }
.hero-hints a:hover { background: rgba(255, 255, 255, .27); }
.hero-art { position: relative; z-index: 1; height: 100%; min-height: 270px; }
.hero-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .13); filter: blur(4px); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hero-orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 250px; height: 250px; }
.orbit-two { width: 340px; height: 340px; border-style: dashed; opacity: .55; }
.hero-file {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px rgba(17, 12, 70, .22);
    animation: floaty 5s ease-in-out infinite;
}
.hero-file span { font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.hero-file--main { width: 142px; height: 142px; border-radius: 30px; left: 50%; top: 48%; transform: translate(-50%, -50%); color: #ffe08a; }
.hero-file--small { width: 82px; height: 82px; border-radius: 22px; animation-delay: -2s; }
.hero-file--pdf { left: 3%; top: 12%; color: #ffb4b4; }
.hero-file--img { right: 2%; bottom: 11%; color: #a9f0df; animation-delay: -3.4s; }
@keyframes floaty { 0%, 100% { margin-top: 0; } 50% { margin-top: -12px; } }

/* ---------- Statistik ----------------------------------------------------- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.stat-item div { display: flex; flex-direction: column; line-height: 1.25; }
.stat-item strong { font-size: 20px; font-weight: 800; }
.stat-item span { color: var(--muted); font-size: 12px; }
.stat-icon, .metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    flex: none;
}
.stat-icon--violet, .metric-icon--violet { background: var(--primary-soft); color: var(--primary); }
.stat-icon--teal, .metric-icon--teal { background: #e1f7f5; color: #0d9488; }
.stat-icon--amber, .metric-icon--amber { background: #fff4dd; color: #d97706; }
.stat-icon--blue, .metric-icon--blue { background: #e7f0ff; color: #3b82f6; }
[data-theme="dark"] .stat-icon--teal, [data-theme="dark"] .metric-icon--teal { background: #123b38; color: #5eead4; }
[data-theme="dark"] .stat-icon--amber, [data-theme="dark"] .metric-icon--amber { background: #3d3118; color: #fbbf24; }
[data-theme="dark"] .stat-icon--blue, [data-theme="dark"] .metric-icon--blue { background: #1b2f4d; color: #93c5fd; }

/* ---------- Koleksi berkas ------------------------------------------------ */
.collection { padding: 62px 0 76px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: 28px; margin-bottom: 6px; }
.sort-select { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); font-weight: 700; }
.sort-select select, .table-toolbar select, .field select, .field input, .field textarea, .search-box input {
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.sort-select select { min-height: 38px; font-size: 12.5px; }
select:focus, input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(97, 85, 232, .12); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 700;
    transition: all .18s ease;
}
.chip span { font-size: 10.5px; color: var(--muted); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(97, 85, 232, .22); }
.chip.active span { color: rgba(255, 255, 255, .8); }
.result-line { margin-bottom: 16px; font-size: 12.5px; color: var(--muted); }
.result-line a { margin-left: 8px; color: var(--primary); font-weight: 700; }

.file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.file-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.file-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.file-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 15px; }
.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
}
.file-icon--sm { width: 38px; height: 38px; border-radius: 11px; }
.type-archive { background: #fff1e0; color: #ea850f; }
.type-pdf { background: #ffe9e9; color: #e5484d; }
.type-doc { background: #e8efff; color: #3b6fe0; }
.type-sheet { background: #e6f7ee; color: #159568; }
.type-slide { background: #fff0e2; color: #ea7a22; }
.type-image { background: #f0e9ff; color: #8b5cf6; }
.type-video { background: #e6f6ff; color: #0ea5e9; }
.type-audio { background: #ffe9f4; color: #db2777; }
.type-default { background: var(--primary-soft); color: var(--primary); }
[data-theme="dark"] .type-archive { background: #3c2c18; color: #fbbf24; }
[data-theme="dark"] .type-pdf { background: #402127; color: #fb8085; }
[data-theme="dark"] .type-doc { background: #1e2c4a; color: #93b4ff; }
[data-theme="dark"] .type-sheet { background: #16382c; color: #6ee7b7; }
[data-theme="dark"] .type-slide { background: #3b2a1c; color: #fdba74; }
[data-theme="dark"] .type-image { background: #2c2247; color: #c4b5fd; }
[data-theme="dark"] .type-video { background: #172f42; color: #7dd3fc; }
[data-theme="dark"] .type-audio { background: #3c2035; color: #f9a8d4; }

.file-card h3 { margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-description { color: var(--muted); font-size: 12.5px; min-height: 40px; margin-top: 10px; margin-bottom: 16px; }
.file-meta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 11.5px; }
.file-meta span { display: inline-flex; align-items: center; gap: 5px; }
.file-card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 60px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.empty-illustration { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }
.empty-state h3 { font-size: 17px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.empty-state--inline { padding: 36px 20px; border: 0; background: transparent; gap: 4px; }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 30px; }
.page-link { min-width: 36px; height: 36px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text-soft); font-size: 12.5px; font-weight: 700; }
.page-link:hover, .page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Footer -------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 48px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.footer-motto { width: 190px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 12.5px; max-width: 380px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); }
.footer-col h4 { font-size: 13px; color: var(--text); margin-bottom: 6px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11.5px; }

.setup-notice { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 90px 20px; }
.setup-notice img { width: 84px; height: 84px; }
.setup-notice p { max-width: 520px; }

/* ---------- Panel & tabel ------------------------------------------------- */
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.panel-head h2 { display: flex; align-items: center; gap: 9px; font-size: 17px; }
.panel-head h2 .icon { color: var(--primary); }
.panel-head p { margin: 5px 0 0; }
.panel-body { padding: 24px; }
.check-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; padding: 40px 0 70px; }
.page-head { padding-top: 44px; }
.check-list { list-style: none; margin: 0; padding: 8px 24px 20px; }
.check-item { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.check-item:last-child { border-bottom: 0; }
.check-item div { display: flex; flex-direction: column; flex: 1; }
.check-item small { color: var(--muted); font-size: 12px; }
.check-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; }
.check-dot.ok { background: var(--success-soft); color: var(--success); }
.check-dot.bad { background: var(--danger-soft); color: var(--danger); }
.prose { color: var(--text-soft); font-size: 13px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-table th, .mini-table td { padding: 8px 4px; border-bottom: 1px solid var(--border); text-align: left; }
.mini-table th { color: var(--muted); font-weight: 600; }
.mini-table td { text-align: right; font-weight: 700; }
.mini-table--wide td { text-align: left; color: var(--text-soft); }
.mini-table--wide th { width: 45%; }

.notice { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: 12px; font-size: 12.5px; margin: 0 0 16px; line-height: 1.55; }
.notice > .icon { margin-top: 1px; }
.notice p { margin: 4px 0 0; }
.notice--success { background: var(--success-soft); color: var(--success); }
.notice--info { background: var(--primary-soft); color: var(--primary); }
.notice--error { background: var(--danger-soft); color: var(--danger); }
.notice code { background: rgba(127, 127, 127, .12); border-color: transparent; }

/* ---------- Formulir ------------------------------------------------------ */
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--text-soft); }
.field textarea { resize: vertical; min-height: 74px; }
.field-hint { color: var(--muted); font-size: 11.5px; }
.optional { color: var(--muted); font-weight: 500; }
.checkline { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-soft); cursor: pointer; }
.checkline input { width: 16px; height: 16px; accent-color: var(--primary); }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon .icon { position: absolute; left: 14px; color: var(--muted); }
.input-icon input { width: 100%; padding-left: 42px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Login & instalasi -------------------------------------------- */
.auth-page { display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(900px 500px at 15% -10%, rgba(97, 85, 232, .16), transparent 65%), var(--bg); }
.auth-shell { display: grid; grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr); width: min(940px, 100%); border: 1px solid var(--border); border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-brand { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 44px 38px; color: #fff; background: linear-gradient(150deg, #3d34ab, #6655e8 55%, #0e9fa3 140%); }
.auth-brand-emblem { width: 70px; height: 70px; margin-bottom: 22px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); }
.auth-brand h2 { color: #fff; font-size: 27px; margin-bottom: 12px; }
.auth-brand > p { color: rgba(255, 255, 255, .82); font-size: 13px; }
.auth-feature-list { list-style: none; padding: 0; margin: 24px 0 30px; display: flex; flex-direction: column; gap: 12px; font-size: 12.5px; }
.auth-feature-list li { display: flex; align-items: center; gap: 10px; }
.auth-brand-footer-logo { width: 72px; height: 72px; object-fit: contain; margin-top: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); }
.auth-card { position: relative; padding: 40px; background: var(--surface); }
.auth-card--wide { width: min(560px, 100%); margin-inline: auto; display: block; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card--login { padding: 46px 42px; }
.auth-logo { width: 66px; height: 66px; object-fit: contain; margin-bottom: 14px; }
.auth-card h1 { font-size: 26px; margin-bottom: 8px; }
.auth-card-head { margin-bottom: 22px; }
.auth-avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 16px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 12px; }
.auth-footlinks { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.auth-footlinks a { color: var(--primary); font-weight: 700; }
.auth-theme { position: absolute; top: 18px; right: 18px; }

/* ---------- Admin shell --------------------------------------------------- */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; display: flex; flex-direction: column; width: 248px; padding: 22px 16px; color: #c7cfeb; background: var(--sidebar); overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; border-bottom: 1px solid rgba(255, 255, 255, .09); margin-bottom: 18px; }
.sidebar-brand img { width: 40px; height: 40px; object-fit: contain; }
.sidebar-brand span { display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-brand strong { color: #fff; font-size: 13.5px; font-weight: 800; }
.sidebar-brand small { color: #8793bb; font-size: 10.5px; }
.sidebar-label { margin: 14px 12px 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #6d7aa4; font-weight: 800; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; color: #bcc6e4; font-size: 13px; font-weight: 600; transition: background .18s, color .18s; }
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-link.active { background: linear-gradient(100deg, #6556e8, #8b5cf6); color: #fff; box-shadow: 0 8px 20px rgba(97, 85, 232, .32); }
.side-link em { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 10px; font-style: normal; }
.sidebar-spacer { flex: 1; min-height: 24px; }
.sidebar-storage { padding: 15px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 13px; background: rgba(255, 255, 255, .05); margin-bottom: 14px; }
.sidebar-storage-head { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #9aa6cc; margin-bottom: 7px; }
.sidebar-storage strong { display: block; color: #fff; font-size: 18px; }
.sidebar-storage small { color: #8793bb; font-size: 10.5px; }
.storage-bar { height: 5px; margin-top: 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.storage-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #2dd4bf); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .09); }
.user-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar-user div { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.sidebar-user strong { color: #fff; font-size: 12px; }
.sidebar-user small { color: #8793bb; font-size: 10.5px; }
.sidebar-user .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #c7cfeb; }
.sidebar-overlay { display: none; }
.admin-main { width: calc(100% - 248px); margin-left: 248px; min-height: 100vh; }
.admin-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 12px 30px; border-bottom: 1px solid var(--border); background: var(--surface); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); }
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 19px; margin-bottom: 2px; }
.topbar-title p { color: var(--muted); font-size: 12px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.menu-toggle { display: none; }
.topbar-brand { display: none; align-items: center; flex: none; }
.topbar-brand img { width: 34px; height: 34px; object-fit: contain; }
.admin-content { display: flex; flex-direction: column; gap: 20px; padding: 26px 30px 50px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { display: flex; align-items: center; gap: 13px; padding: 17px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-card > div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.metric-card small { color: var(--muted); font-size: 11.5px; }
.metric-card strong { font-size: 19px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.metric-trend { display: none; }

/* ---------- Unggah -------------------------------------------------------- */
.upload-panel .panel-head { align-items: flex-start; }
.dropzone { position: relative; display: grid; place-items: center; min-height: 172px; padding: 22px; border: 2px dashed var(--border-strong); border-radius: 15px; background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color .2s, background .2s, transform .2s; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--primary); background: var(--primary-soft); transform: scale(.995); }
.dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.dropzone-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); margin-bottom: 8px; }
.dropzone h3 { font-size: 15px; }
.dropzone p, .dropzone small { color: var(--muted); margin: 0; font-size: 12px; }
.file-picked { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 520px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); text-align: left; box-shadow: var(--shadow-sm); }
.file-picked-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.file-picked div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.file-picked strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-picked small { color: var(--muted); font-size: 11.5px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-progress { padding: 14px 16px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 700; margin-bottom: 9px; }
.progress-head strong { color: var(--primary); }
.progress-track { height: 9px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #2dd4bf); transition: width .25s ease; }
.upload-progress small { display: block; color: var(--muted); font-size: 11px; margin-top: 8px; }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.upload-actions .muted { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Tabel admin --------------------------------------------------- */
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.search-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 220px; }
.search-box .icon { position: absolute; left: 13px; color: var(--muted); }
.search-box input { width: 100%; padding-left: 40px; }
.table-toolbar select { min-width: 170px; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 24px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; }
.bulk-bar div { display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { padding: 13px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.col-check { width: 42px; text-align: center; }
.col-check input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.col-actions { width: 150px; }
.table-file { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.table-file div { display: flex; flex-direction: column; min-width: 0; }
.table-file strong { font-size: 12.5px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-file small { color: var(--muted); font-size: 11px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 5px; }
.row-actions .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.pagination--admin { margin: 0; padding: 18px 24px; border-top: 1px solid var(--border); justify-content: flex-start; }

/* ---------- Modal & toast ------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(9, 14, 30, .62); backdrop-filter: blur(4px); }
.modal-dialog { position: relative; z-index: 1; width: min(540px, 100%); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal-dialog--sm { width: min(420px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 13px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-head p { margin: 2px 0 0; }
.modal-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.modal-icon--danger { background: var(--danger-soft); color: var(--danger); }
.modal-close { margin-left: auto; }
.modal-body { padding: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 18px 18px; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; width: min(360px, calc(100% - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600; animation: slidein .22s ease-out; }
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--info { border-left-color: #3b82f6; }
.toast .icon { color: var(--primary); }
.toast--success .icon { color: var(--success); }
.toast--error .icon { color: var(--danger); }
@keyframes slidein { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Pengaturan ---------------------------------------------------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; }
.panel--danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.panel--danger .panel-head h2 .icon { color: var(--danger); }

/* ---------- Responsif ----------------------------------------------------- */
@media (max-width: 1050px) {
    .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-inner { padding: 44px; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.is-open { transform: none; }
    .admin-main { width: 100%; margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar-brand { display: inline-flex; }
    .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(5, 9, 20, .55); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
    .sidebar-overlay.is-open { opacity: 1; visibility: visible; }
    .check-layout, .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .site-nav { display: none; }
    .hero-inner { grid-template-columns: 1fr; padding: 38px 30px; }
    .hero-art { display: none; }
    .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { padding: 30px; }
    .auth-brand-footer-logo { margin-top: 20px; }
    .topbar-date, .topbar-site { display: none; }
    .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
    .container { width: min(100% - 28px, 1180px); }
    .header-inner { min-height: 64px; gap: 12px; }
    .brand-text small { display: none; }
    .header-actions .btn span { display: none; }
    .hero { padding-top: 24px; }
    .hero-inner { border-radius: 22px; padding: 30px 22px; }
    .hero-search { flex-wrap: wrap; padding: 12px; }
    .hero-search input { width: 100%; flex-basis: 100%; }
    .hero-search .btn { width: 100%; }
    .file-grid, .upload-grid, .field-row, .footer-grid { grid-template-columns: 1fr; }
    .stats-strip, .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-item, .metric-card { gap: 9px; padding: 13px; }
    .stat-item strong, .metric-card strong { font-size: 16px; }
    .stat-icon, .metric-icon { width: 34px; height: 34px; border-radius: 10px; }
    .stat-item span, .metric-card small { font-size: 10.5px; }
    .collection { padding: 44px 0 56px; }
    .admin-topbar { padding: 10px 16px; }
    .admin-content { padding: 18px 14px 40px; }
    .panel-head, .panel-body, .table-toolbar, .bulk-bar { padding-left: 16px; padding-right: 16px; }
    .panel-head { align-items: flex-start; }
    .table-toolbar select, .search-box { width: 100%; }
    .data-table { min-width: 760px; }
    .bulk-bar div { width: 100%; }
    .bulk-bar .btn { flex: 1; }
    .auth-card--login, .auth-card { padding: 30px 22px; }
    .auth-brand { padding: 20px 22px; }
    .auth-brand h2 { font-size: 20px; }
    .auth-brand > p, .auth-feature-list { display: none; }
    .auth-brand-footer-logo { width: 56px; height: 56px; margin-top: 14px; }
    .auth-brand-emblem { width: 52px; height: 52px; margin-bottom: 12px; }
    .footer-bottom { flex-direction: column; gap: 6px; }
    .btn { min-height: 44px; }
    .icon-btn { width: 40px; height: 40px; }
    .row-actions .icon-btn { width: 34px; height: 34px; }
    .modal { padding: 12px; }
    .modal-actions .btn { flex: 1; }
    .sidebar { width: min(280px, 84vw); }
    .toast-stack { right: 14px; bottom: 14px; }
}

@media (max-width: 420px) {
    .topbar-title p { display: none; }
    .topbar-title h1 { font-size: 17px; }
    .hero h1 { font-size: 27px; }
    .hero-badge { font-size: 10.5px; }
    .stat-item, .metric-card { flex-direction: column; align-items: flex-start; gap: 7px; }
    .stat-item div, .metric-card div { width: 100%; }
    .file-card { padding: 18px; }
    .sort-select { width: 100%; justify-content: space-between; }
    .page-head h1 { font-size: 24px; }
}
