/* ============================================
   Arsip Dokumentasi Humas — Design Tokens
   Terinspirasi portal instansi modern:
   navy pekat + biru + aksen cyan, kartu mengambang
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --navy-950: #0A162E;
    --navy-900: #0D1F3C;
    --navy-800: #12294D;
    --navy-700: #1B3A66;
    --blue-600: #2454E0;
    --blue-500: #3B6BF0;
    --cyan-500: #22D3EE;
    --cyan-400: #67E8F9;
    --bg: #EFF3FA;
    --paper: #FFFFFF;
    --border: #E2E8F4;
    --ink-900: #101B33;
    --ink-600: #56617A;
    --ink-400: #93A0BC;
    --green-600: #1F8A57;
    --green-bg: #E7F6EE;
    --red-600: #C23B3B;
    --red-bg: #FCEAEA;
    --gold-600: #B07C1F;
    --gold-bg: #FCF3DF;

    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --radius: 10px;
    --radius-lg: 18px;
    --shadow-card: 0 1px 2px rgba(10, 22, 46, 0.05), 0 10px 24px -8px rgba(10, 22, 46, 0.10);
    --shadow-float: 0 18px 40px -14px rgba(10, 22, 46, 0.35);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: page-fade-in 0.35s ease;
}

@keyframes page-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.015em; }

::selection { background: var(--cyan-400); color: var(--navy-950); }

a { color: inherit; }

/* ============ AUTH / LOGIN PAGE ============ */
.auth-body {
    background: radial-gradient(ellipse 900px 560px at 80% -10%, rgba(34,211,238,0.16), transparent 60%),
                radial-gradient(ellipse 700px 500px at -10% 110%, rgba(36,84,224,0.22), transparent 55%),
                var(--navy-950);
    min-height: 100vh;
}
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.auth-panel {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    border-radius: 24px;
    padding: 3rem 3rem 2.6rem;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: auth-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-float);
}
@keyframes auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.auth-mark {
    position: relative;
    width: 68px; height: 68px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.4rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--cyan-400), var(--blue-600) 70%);
    box-shadow: 0 0 0 8px rgba(34,211,238,0.08), 0 12px 30px -6px rgba(34,211,238,0.5);
}
.auth-mark span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff;
}
.mark-ring { display: none; }
.auth-panel h1 {
    font-size: 1.65rem;
    color: #fff;
    letter-spacing: -0.01em;
    font-weight: 700;
}
.auth-sub {
    color: var(--cyan-400);
    margin: 0.5rem 0 1.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
}
.auth-form { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; text-align: left; }
.auth-form label {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    margin-top: 1rem;
    letter-spacing: 0.01em;
}
.auth-form input {
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.06);
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.auth-form input::placeholder { color: rgba(255,255,255,0.32); }
.auth-form input:hover { border-color: rgba(255,255,255,0.28); }
.auth-form input:focus {
    outline: none;
    border-color: var(--cyan-400);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(34,211,238,0.15);
}
.btn-primary {
    margin-top: 1.7rem;
    background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
    color: #fff;
    border: none;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 10px 24px -6px rgba(36,84,224,0.55);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 30px -6px rgba(36,84,224,0.6); }
.btn-primary:active { transform: translateY(0); }
.auth-foot {
    margin-top: 1.6rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    max-width: 340px;
    line-height: 1.5;
}
.auth-side, .side-content, .side-eyebrow { display: none; }

/* ============ NAVBAR ============ */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.navbar {
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}
.navbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.6rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; margin-right: auto; }
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-900), var(--blue-600) 120%);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 14px -4px rgba(36,84,224,0.5);
}
.brand-name { font-weight: 700; font-size: 0.92rem; color: var(--navy-950); }
.brand-sub { font-size: 0.73rem; color: var(--ink-400); }

.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav-item {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: var(--ink-600);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    font-family: inherit;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.nav-item:hover { background: var(--bg); color: var(--navy-950); }
.nav-item.active { background: rgba(36,84,224,0.1); color: var(--blue-600); }
.nav-cta {
    background: var(--navy-950) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px -4px rgba(10,22,46,0.4);
}
.nav-cta:hover { background: var(--navy-800) !important; }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-left: 1.2rem;
    margin-left: 0.4rem;
    border-left: 1px solid var(--border);
}
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.user-name { font-size: 0.83rem; font-weight: 700; color: var(--navy-950); line-height: 1.2; }
.user-role { font-size: 0.7rem; color: var(--ink-400); }
.role-tag {
    display: inline-block;
    background: var(--gold-bg);
    color: var(--gold-600);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 2px;
}
.logout-link {
    margin-left: 0.3rem;
    color: var(--ink-400);
    text-decoration: none;
    font-size: 1.05rem;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
}
.logout-link:hover { background: var(--red-bg); color: var(--red-600); }

/* ============ HERO ============ */
.hero {
    background:
        radial-gradient(ellipse 640px 360px at 88% -20%, rgba(34,211,238,0.20), transparent 60%),
        radial-gradient(ellipse 500px 320px at 5% 120%, rgba(36,84,224,0.28), transparent 55%),
        linear-gradient(160deg, var(--navy-950), var(--navy-800));
    padding: 2.6rem 2rem 4.6rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.025) 40px);
    pointer-events: none;
}
.hero-inner { max-width: 1240px; margin: 0 auto; position: relative; }
.hero-eyebrow {
    display: inline-block;
    color: var(--cyan-400);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.7rem;
}
.hero-title { color: #fff; font-size: 1.9rem; font-weight: 700; line-height: 1.25; max-width: 640px; }
.hero-sub { color: rgba(255,255,255,0.6); margin: 0.6rem 0 1.7rem; font-size: 0.92rem; max-width: 520px; }

.search-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #fff;
    padding: 0.5rem;
    border-radius: 999px;
    box-shadow: var(--shadow-float);
}
.search-form input[type="search"] {
    flex: 1;
    min-width: 200px;
    border: none !important;
    background: transparent !important;
    padding-left: 1.1rem !important;
}
.search-form input, .search-form select {
    padding: 0.62rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.86rem;
    background: var(--bg);
    color: var(--ink-900);
    font-family: var(--font-body);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-form input:hover, .search-form select:hover { border-color: #c7d2e6; }
.search-form input:focus, .search-form select:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(36,84,224,0.12);
}
.search-form .btn-secondary {
    border-radius: 999px;
    background: var(--navy-950);
    color: #fff;
    border: none;
}
.search-form .btn-secondary:hover { background: var(--blue-600); }
.btn-clear {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.55);
    text-decoration: underline;
    font-size: 0.82rem;
    padding: 0 0.5rem;
    transition: color 0.15s ease;
}
.btn-clear:hover { color: #fff; }

/* ============ STAT CARDS ============ */
.sidebar-stats {
    max-width: 1240px;
    margin: -3.2rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.stat {
    background: var(--paper);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.3rem;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 0.9rem;
    animation: card-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.sidebar-stats .stat:nth-child(1) { animation-delay: 0.02s; }
.sidebar-stats .stat:nth-child(2) { animation-delay: 0.08s; }
.sidebar-stats .stat:nth-child(3) { animation-delay: 0.14s; background: var(--navy-950); }
.sidebar-stats .stat:nth-child(3) .stat-num,
.sidebar-stats .stat:nth-child(3) .stat-label { color: #fff; }
.sidebar-stats .stat:nth-child(3) .stat-label { color: rgba(255,255,255,0.55); }
.sidebar-stats .stat:nth-child(3) .stat-icon { background: rgba(255,255,255,0.12); }
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(36,84,224,0.1);
    color: var(--blue-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.stat-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--navy-950); display: block; line-height: 1.15; }
.stat-label { font-size: 0.78rem; color: var(--ink-400); font-weight: 500; }

/* ============ QUICK PILLS ============ */
.quick-pills {
    max-width: 1240px;
    margin: 1.4rem auto 0;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid var(--border);
    color: var(--navy-950);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.quick-pill:hover { border-color: var(--blue-500); background: #F3F7FF; transform: translateY(-1px); }
.quick-pill.active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }

/* ============ MAIN CONTENT ============ */
.main { min-width: 0; flex: 1; }
.content { max-width: 1240px; margin: 0 auto; padding: 2.2rem 2rem 3rem; }

.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}
.folder-title { font-size: 1.7rem; margin-top: 0.5rem; color: #fff; font-weight: 700; }
.folder-sub { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin-top: 0.5rem; }
.folder-desc { color: var(--ink-600); background: var(--paper); padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 1.4rem; }

.badge-jenis {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    color: var(--cyan-400);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.folder-thumb .badge-jenis { background: rgba(10,22,46,0.65); color: #fff; }

/* ============ FOLDER GRID ============ */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.3rem;
}
.folder-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, border-color 0.18s ease;
    animation: card-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.folder-grid .folder-card:nth-child(1) { animation-delay: 0.02s; }
.folder-grid .folder-card:nth-child(2) { animation-delay: 0.06s; }
.folder-grid .folder-card:nth-child(3) { animation-delay: 0.1s; }
.folder-grid .folder-card:nth-child(4) { animation-delay: 0.14s; }
.folder-grid .folder-card:nth-child(n+5) { animation-delay: 0.16s; }
@keyframes card-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.folder-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -10px rgba(10,22,46,0.18); border-color: #cddaf5; }
.folder-thumb {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--bg);
    overflow: hidden;
}
.folder-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.folder-card:hover .folder-thumb img { transform: scale(1.06); }
.folder-thumb-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    opacity: 0.25;
}
.folder-thumb .badge-jenis { position: absolute; top: 0.65rem; left: 0.65rem; }
.folder-info { padding: 1rem 1.1rem 1.2rem; }
.folder-date { font-size: 0.72rem; color: var(--blue-600); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.folder-name { font-family: var(--font-display); font-size: 1.05rem; margin-top: 0.35rem; color: var(--navy-950); line-height: 1.35; font-weight: 700; }
.folder-meta { font-size: 0.78rem; color: var(--ink-400); margin-top: 0.5rem; }

/* ============ MEDIA GRID ============ */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.1rem;
}
.media-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    animation: card-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.media-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -10px rgba(10,22,46,0.16); }
.media-card img, .media-card video {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: #000;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.media-card:hover img { transform: scale(1.04); }
.media-info { padding: 0.75rem 0.9rem; }
.media-type-badge { font-size: 0.7rem; font-weight: 700; color: var(--blue-600); }
.media-caption { font-size: 0.83rem; color: var(--ink-900); margin: 0.35rem 0; }
.media-meta { font-size: 0.72rem; color: var(--ink-400); }
.media-delete {
    position: absolute;
    top: 0.5rem; right: 0.5rem;
}
.media-delete button {
    background: rgba(10,22,46,0.65);
    backdrop-filter: blur(2px);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s ease, transform 0.15s ease;
}
.media-delete button:hover { background: var(--red-600); transform: scale(1.08); }

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--paper);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}
.empty-icon {
    font-size: 1.8rem;
    margin: 0 auto 1rem;
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    border-radius: 50%;
}
.empty-state h3 { color: var(--navy-950); margin-bottom: 0.4rem; font-weight: 700; }
.empty-state p { color: var(--ink-600); margin-bottom: 1.2rem; font-size: 0.9rem; }

/* ============ ALERTS ============ */
.alert {
    padding: 0.8rem 1.05rem;
    border-radius: var(--radius);
    font-size: 0.87rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}
.alert-error { background: var(--red-bg); color: var(--red-600); border: 1px solid #F4CFCF; }
.alert-success { background: var(--green-bg); color: var(--green-600); border: 1px solid #C7EAD6; }
.alert-warning { background: var(--gold-bg); color: var(--gold-600); border: 1px solid #F1E0AF; }
.dup-list { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.dup-list li { font-size: 0.83rem; margin-bottom: 0.2rem; }

/* ============ MODAL ============ */
.modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(10,22,46,0.55);
    backdrop-filter: blur(2px);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
.modal {
    background: var(--paper);
    border-radius: 20px;
    padding: 1.9rem;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(10,22,46,0.35);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal h3 { color: var(--navy-950); margin-bottom: 1rem; font-size: 1.2rem; font-weight: 700; }
.modal form { display: flex; flex-direction: column; }
.modal label { font-size: 0.8rem; font-weight: 700; color: var(--ink-600); margin-top: 0.9rem; margin-bottom: 0.35rem; }
.modal input, .modal textarea, .modal select {
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: var(--bg);
}
.modal input:focus, .modal textarea:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(36,84,224,0.12);
}
.field-hint { font-size: 0.72rem; color: var(--ink-400); margin-top: 0.35rem; line-height: 1.5; }

.modal .btn-primary { border-radius: var(--radius); }

.upload-progress {
    display: none;
    margin-top: 1.2rem;
    padding: 0.85rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.upload-progress.show { display: block; }
.upload-progress-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--ink-600);
    margin-bottom: 0.55rem;
}
#upload-progress-label { flex: 1; }
#upload-progress-pct { font-weight: 700; color: var(--blue-600); font-variant-numeric: tabular-nums; }
.upload-spinner {
    width: 14px; height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--cyan-500);
    border-radius: 50%;
    flex-shrink: 0;
    animation: spin 0.8s linear infinite;
}
.upload-progress-track {
    height: 8px;
    background: #E4E9F2;
    border-radius: 5px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
    transition: width 0.3s ease;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.modal-actions.uploading .btn-secondary { opacity: 0.5; pointer-events: none; }

.upload-minimize-btn {
    margin-left: auto;
    background: var(--paper);
    border: 1px solid var(--border);
    color: var(--ink-600);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.upload-minimize-btn:hover { border-color: var(--blue-500); background: #F3F7FF; color: var(--blue-600); }

/* ============ FLOATING UPLOAD TOAST ============ */
.upload-toast {
    display: none;
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 60;
    background: var(--navy-950);
    color: #fff;
    border-radius: 16px;
    padding: 0.9rem 1.1rem;
    min-width: 280px;
    max-width: 340px;
    align-items: center;
    gap: 0.7rem;
    box-shadow: var(--shadow-float);
    cursor: pointer;
    animation: toast-rise 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.upload-toast:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -14px rgba(10,22,46,0.55); }
.upload-toast.show { display: flex; }
@keyframes toast-rise {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.upload-toast .upload-spinner { border-color: rgba(255,255,255,0.2); border-top-color: var(--cyan-400); flex-shrink: 0; }
.upload-toast-body { flex: 1; min-width: 0; }
.upload-toast-label { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-toast .upload-progress-track { height: 6px; background: rgba(255,255,255,0.14); }
.upload-toast-pct { font-size: 0.78rem; font-weight: 700; color: var(--cyan-400); font-variant-numeric: tabular-nums; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
    .upload-toast { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
    .upload-spinner, .upload-progress-fill { animation: none; }
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.6rem;
}
.modal-actions .btn-primary { margin-top: 0; }
.modal-actions .btn-secondary {
    background: var(--paper);
    border: 1px solid var(--border);
    color: var(--navy-950);
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.87rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.modal-actions .btn-secondary:hover { border-color: var(--blue-500); background: var(--bg); }

/* ============ USER TABLE (halaman kelola user) ============ */
.user-avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }
.user-table-wrap {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
}
.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    min-width: 720px;
}
.user-table thead th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-400);
    font-weight: 700;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    white-space: nowrap;
}
.user-table tbody td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    color: var(--ink-900);
    vertical-align: middle;
    white-space: nowrap;
}
.user-table tbody tr:last-child td { border-bottom: none; }
.user-table tbody tr:hover { background: #F8FAFD; }
.user-table-cell { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.mono-cell { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-600); }

.role-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
}
.role-pill-admin { background: rgba(36,84,224,0.1); color: var(--blue-600); }
.role-pill-pegawai { background: var(--bg); color: var(--ink-600); }

.user-table-actions { display: flex; gap: 0.35rem; white-space: nowrap; }
.btn-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--paper);
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.btn-icon:hover { border-color: var(--blue-500); background: #F3F7FF; transform: translateY(-1px); }
.btn-icon-danger:hover { border-color: var(--red-600); background: var(--red-bg); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .navbar-inner { padding: 0.85rem 1.2rem; flex-wrap: wrap; }
    .nav { order: 3; width: 100%; overflow-x: auto; padding-top: 0.5rem; }
    .navbar-user { border-left: none; padding-left: 0; margin-left: auto; }
    .hero { padding: 2rem 1.2rem 4rem; }
    .sidebar-stats { grid-template-columns: 1fr; padding: 0 1.2rem; margin-top: -2.6rem; }
    .quick-pills { padding: 0 1.2rem; }
    .content { padding: 1.6rem 1.2rem 2.5rem; }
    .folder-header { flex-direction: column; align-items: flex-start; }
    .auth-panel { padding: 2.4rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .folder-card, .media-card { transition: none; animation: none; }
    body, .auth-panel { animation: none; }
    .folder-thumb img, .media-card img { transition: none; }
    .modal-overlay, .modal { transition: none; }
}
