/* =========================================
   SISTEM AKHIR STUDI — Custom Style
   Warna: Slate Blue (#1e3a5f) & Emas (#d4a843)
   ========================================= */

:root {
    --navy:       #1e3a5f;
    --navy-l:     #2d5282;
    --navy-d:     #132640;
    --gold:       #d4a843;
    --gold-l:     #e8c060;
    --gold-d:     #b08a2e;
    --sidebar-w:  260px;
    --header-h:   62px;
}

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    background: #f5f3ef;
    color: #2c2a27;
    overflow-x: hidden;
    margin: 0;
}
a { text-decoration: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--navy-d); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* =========================================
   LOGIN PAGE
   ========================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-d) 0%, var(--navy) 50%, var(--navy-l) 100%);
    padding: 20px;
}

.login-box {
    background: #fdfcfa;
    border-radius: 18px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.login-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 100%);
    padding: 36px 40px 28px;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-d), var(--gold), var(--gold-d));
}

.login-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 16px rgba(201,168,76,.5);
    font-size: 1.8rem; color: var(--navy); font-weight: 800;
}

.login-header h4 { color: #fff; font-weight: 700; margin: 0 0 4px; font-size: 1.2rem; }
.login-header p  { color: var(--gold-l); font-size: .8rem; margin: 0; opacity: .85; }

.login-body { padding: 32px 40px 36px; }

.login-body .form-label { font-size: .84rem; font-weight: 600; color: var(--navy); margin-bottom: 5px; }

.login-body .form-control {
    border-radius: 8px;
    border: 1.5px solid #dde1e9;
    font-size: .9rem;
    padding: 10px 14px;
    transition: border-color .2s, box-shadow .2s;
}
.login-body .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.18);
    outline: none;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap .bi {
    position: absolute; top: 50%; left: 13px;
    transform: translateY(-50%);
    color: #aab;
    font-size: .95rem;
}
.input-icon-wrap .form-control { padding-left: 38px; }

.role-tabs { display: flex; gap: 0; margin-bottom: 24px; border-radius: 10px; overflow: hidden; border: 1.5px solid #e2e5ec; }
.role-tab {
    flex: 1; padding: 10px; text-align: center;
    font-size: .84rem; font-weight: 600; cursor: pointer;
    background: #f7f8fa; color: #888;
    transition: background .2s, color .2s;
    border: none; outline: none;
}
.role-tab.active { background: var(--navy); color: #fff; }

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 100%);
    color: #fff; border: none;
    border-radius: 10px; padding: 12px;
    font-size: .95rem; font-weight: 700;
    letter-spacing: .03em;
    transition: opacity .2s, transform .2s;
    cursor: pointer;
}
.btn-login:hover { opacity: .92; transform: translateY(-1px); }

.login-hint {
    background: linear-gradient(135deg, rgba(201,168,76,.1) 0%, rgba(10,31,68,.06) 100%);
    border: 1px solid rgba(201,168,76,.3);
    border-radius: 10px; padding: 12px 14px;
    font-size: .78rem; color: #555; margin-top: 18px;
}
.login-hint strong { color: var(--navy); }
.login-hint .divider { border-top: 1px dashed rgba(201,168,76,.4); margin: 7px 0; }

.alert-login { border-radius: 8px; font-size: .85rem; margin-bottom: 18px; }

/* =========================================
   LAYOUT (authenticated)
   ========================================= */

/* Sidebar */
.main-sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-w); height: 100vh;
    background: linear-gradient(180deg, var(--navy-d) 0%, var(--navy) 55%, var(--navy-l) 100%);
    z-index: 1100;
    display: flex; flex-direction: column;
    transition: width .3s ease;
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0,0,0,.35);
}

/* Modal harus selalu di atas sidebar */
.modal         { z-index: 1200; }
.modal-backdrop{ z-index: 1160; }
.main-sidebar.collapsed { width: 68px; }

.sidebar-brand {
    display: flex; align-items: center; gap: 11px;
    padding: 0 16px; height: var(--header-h);
    border-bottom: 1px solid rgba(201,168,76,.2);
    flex-shrink: 0;
}
.brand-logo {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%);
    border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy); font-size: 1rem; font-weight: 800;
    box-shadow: 0 2px 8px rgba(201,168,76,.35);
}
.brand-text { overflow: hidden; white-space: nowrap; transition: opacity .3s, width .3s; }
.brand-text .brand-title { display: block; color: #fff; font-size: .93rem; font-weight: 700; line-height: 1.2; }
.brand-text .brand-sub   { display: block; color: var(--gold-l); font-size: .67rem; opacity: .8; }
.main-sidebar.collapsed .brand-text { opacity: 0; width: 0; }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0; }

.nav-section-label {
    color: var(--gold); font-size: .63rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    padding: 12px 20px 5px; white-space: nowrap;
    transition: opacity .3s;
}
.main-sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-link-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 18px;
    color: rgba(255,255,255,.68); font-size: .855rem; font-weight: 500;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
    cursor: pointer;
}
.nav-link-item:hover   { background: rgba(201,168,76,.1); color: var(--gold-l); border-left-color: var(--gold-l); }
.nav-link-item.active  { background: rgba(201,168,76,.17); color: var(--gold); border-left-color: var(--gold); font-weight: 600; }
.nav-link-item .ni     { font-size: .95rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-link-item .nl     { flex: 1; overflow: hidden; white-space: nowrap; transition: opacity .3s; }
.nav-link-item .nb     { background: var(--gold); color: var(--navy); font-size: .63rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.main-sidebar.collapsed .nl,
.main-sidebar.collapsed .nb { opacity: 0; pointer-events: none; }
.main-sidebar.collapsed .nav-link-item { justify-content: center; padding: 12px; }

.sidebar-user-badge {
    margin: 0 12px 12px;
    background: rgba(201,168,76,.12);
    border: 1px solid rgba(201,168,76,.25);
    border-radius: 10px; padding: 10px 12px;
    display: flex; align-items: center; gap: 10px;
    transition: opacity .3s;
    flex-shrink: 0;
}
.main-sidebar.collapsed .sidebar-user-badge { opacity: 0; pointer-events: none; }
.sub-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--navy); font-size: .78rem; font-weight: 700;
    flex-shrink: 0;
}
.sub-name  { display: block; color: #fff; font-size: .78rem; font-weight: 600; line-height: 1.2; }
.sub-role  { display: block; color: var(--gold-l); font-size: .67rem; }

.sidebar-footer {
    padding: 10px 14px; border-top: 1px solid rgba(201,168,76,.2); flex-shrink: 0;
}
.sidebar-footer a {
    display: flex; align-items: center; gap: 11px;
    color: rgba(255,255,255,.5); font-size: .84rem;
    padding: 8px 4px; border-radius: 6px;
    transition: color .2s, background .2s; white-space: nowrap;
}
.sidebar-footer a:hover { color: #ff7675; background: rgba(255,118,117,.08); }
.main-sidebar.collapsed .sidebar-footer a span { display: none; }

/* Header */
.main-header {
    position: fixed; top: 0;
    left: var(--sidebar-w); right: 0;
    height: var(--header-h);
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 100%);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 22px; z-index: 1000;
    box-shadow: 0 2px 14px rgba(0,0,0,.3);
    transition: left .3s ease;
}
.main-header.sx { left: 68px; }

.h-toggle {
    background: none; border: none;
    color: var(--gold); font-size: 1.3rem; cursor: pointer;
    padding: 6px 9px; border-radius: 6px;
    transition: background .2s;
}
.h-toggle:hover { background: rgba(201,168,76,.15); }

.h-breadcrumb { color: rgba(255,255,255,.85); font-size: .88rem; }
.h-breadcrumb .sep { color: var(--gold); margin: 0 6px; font-size: .7rem; }

.h-icon-btn {
    position: relative; background: none; border: none;
    color: rgba(255,255,255,.7); font-size: 1.05rem;
    padding: 6px 9px; border-radius: 6px; cursor: pointer;
    transition: color .2s, background .2s;
}
.h-icon-btn:hover { color: var(--gold); background: rgba(201,168,76,.1); }
.h-notif-dot {
    position: absolute; top: 4px; right: 6px;
    width: 8px; height: 8px; background: var(--gold);
    border-radius: 50%; border: 2px solid var(--navy);
}

.h-divider { width: 1px; height: 30px; background: rgba(255,255,255,.15); }

.h-user { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 9px; border-radius: 8px; transition: background .2s; }
.h-user:hover { background: rgba(255,255,255,.07); }
.h-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--navy); font-weight: 700; font-size: .8rem;
    border: 2px solid rgba(201,168,76,.6);
}
.h-uname { display: block; color: #fff; font-size: .82rem; font-weight: 600; line-height: 1.2; }
.h-urole { display: block; color: var(--gold-l); font-size: .7rem; }

/* Content */
.content-wrapper {
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
    display: flex; flex-direction: column;
    transition: margin-left .3s ease;
}
.content-wrapper.sx { margin-left: 68px; }
.page-content { flex: 1; padding: 26px 26px 0; }

/* Footer */
.main-footer {
    background: #fdfcfa; border-top: 1px solid #e4e7ed;
    padding: 13px 26px; margin-top: auto;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    font-size: .78rem; color: #888; gap: 12px;
    position: relative; z-index: 1;
    flex-shrink: 0;
}
.main-footer > div:first-child { flex: 0 1 auto; }
.main-footer > div:nth-child(2) { flex: 1 1 auto; text-align: center; }
.main-footer > span:last-child { flex: 0 1 auto; white-space: nowrap; }
.footer-brand { color: var(--navy); font-weight: 700; }

/* =========================================
   PAGE COMPONENTS
   ========================================= */
.page-title-area { margin-bottom: 22px; }
.page-title-area h1 { color: var(--navy); font-size: 1.45rem; font-weight: 700; margin: 0 0 3px; }
.page-title-area p  { color: #94a3b8; font-size: .84rem; margin: 0; }

/* Stat cards */
.stat-card {
    background: #fdfcfa; border-radius: 13px;
    padding: 20px 22px; display: flex; align-items: center; gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-left: 4px solid transparent;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.09); }
.stat-card.c-gold  { border-left-color: var(--gold); }
.stat-card.c-navy  { border-left-color: var(--navy); }
.stat-card.c-green { border-left-color: #27ae60; }
.stat-card.c-yellow{ border-left-color: #f39c12; }
.stat-card.c-red   { border-left-color: #e74c3c; }
.stat-card.c-blue  { border-left-color: #2980b9; }

.s-icon {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; flex-shrink: 0;
}
.s-icon.ig  { background: rgba(201,168,76,.14);  color: var(--gold-d); }
.s-icon.in  { background: rgba(10,31,68,.1);     color: var(--navy); }
.s-icon.igr { background: rgba(39,174,96,.12);   color: #27ae60; }
.s-icon.iy  { background: rgba(243,156,18,.13);  color: #d68910; }
.s-icon.ir  { background: rgba(231,76,60,.12);   color: #e74c3c; }
.s-icon.ib  { background: rgba(41,128,185,.12);  color: #2980b9; }

.s-num   { font-size: 1.65rem; font-weight: 700; color: var(--navy); line-height: 1; }
.s-label { font-size: .78rem; color: #94a3b8; margin-top: 2px; }

/* Card */
.card-c { background: #fdfcfa; border-radius: 13px; box-shadow: 0 2px 10px rgba(0,0,0,.06); overflow: hidden; }
.card-hd {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 100%);
    color: #fff; display: flex; align-items: center; justify-content: space-between;
}
.card-hd.gold { background: linear-gradient(135deg, var(--gold-d) 0%, var(--gold) 100%); }
.card-hd h5 { margin: 0; font-size: .9rem; font-weight: 600; }
.card-hd.gold h5 { color: var(--navy); }
.card-bd { padding: 20px; }

/* Responsive border-end for lg+ breakpoint */
.border-end-lg { border-right: none !important; }
@media (min-width: 992px) { .border-end-lg { border-right: 1px solid #f0f2f5 !important; } }

/* Table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
    background: var(--navy); color: #fff;
    font-size: .775rem; font-weight: 600; letter-spacing: .04em;
    padding: 11px 14px; border: none;
}
.tbl tbody td { padding: 10px 14px; font-size: .83rem; vertical-align: middle; border-bottom: 1px solid #f2f4f7; }
.tbl tbody tr:hover td { background: rgba(201,168,76,.04); }
.tbl-striped tbody tr:nth-child(even) td { background: #fafbfc; }

/* Status badge */
.bs {
    padding: 3px 11px; border-radius: 20px;
    font-size: .7rem; font-weight: 700;
    display: inline-block; white-space: nowrap;
}
.bs.disetujui    { background: rgba(39,174,96,.12);   color: #1e8449; }
.bs.menunggu     { background: rgba(243,156,18,.14);  color: #b7770d; }
.bs.revisi       { background: rgba(41,128,185,.12);  color: #1a5276; }
.bs.ditolak      { background: rgba(231,76,60,.12);   color: #c0392b; }
.bs.belum_daftar { background: rgba(100,116,139,.12); color: #475569; }

/* Filter bar */
.filter-bar {
    background: #fdfcfa; border-radius: 13px;
    padding: 18px 20px; margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
}
.filter-bar label { font-size: .8rem; font-weight: 600; color: var(--navy); display: block; margin-bottom: 4px; }
.filter-bar .form-select,
.filter-bar .form-control {
    font-size: .84rem; border: 1.5px solid #dde1e9; border-radius: 8px;
    padding: 7px 12px; min-width: 160px;
    transition: border-color .2s;
}
.filter-bar .form-select:focus,
.filter-bar .form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.filter-bar .btn-filter {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 100%);
    color: #fff; border: none; border-radius: 8px;
    padding: 8px 20px; font-size: .84rem; font-weight: 600; cursor: pointer;
    transition: opacity .2s;
}
.filter-bar .btn-filter:hover { opacity: .88; }
.filter-bar .btn-reset {
    background: none; border: 1.5px solid #dde1e9; border-radius: 8px;
    padding: 7px 16px; font-size: .84rem; color: #666; cursor: pointer;
    transition: border-color .2s;
}
.filter-bar .btn-reset:hover { border-color: var(--gold); color: var(--gold-d); }

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%);
    color: var(--navy); border: none; border-radius: 8px;
    padding: 8px 20px; font-weight: 700; cursor: pointer;
    transition: opacity .2s, transform .2s; font-size: .84rem;
}
.btn-gold:hover { opacity: .9; transform: translateY(-1px); color: var(--navy); }
.btn-navy {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 100%);
    color: #fff; border: none; border-radius: 8px;
    padding: 8px 20px; font-weight: 700; cursor: pointer;
    transition: opacity .2s, transform .2s; font-size: .84rem;
}
.btn-navy:hover { opacity: .9; transform: translateY(-1px); color: #fff; }

/* Form pendaftaran */
.form-section-title {
    font-size: .78rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--gold-d);
    border-bottom: 2px solid rgba(201,168,76,.25);
    padding-bottom: 6px; margin-bottom: 16px;
}
.form-c label { font-size: .83rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.form-c .form-control,
.form-c .form-select {
    font-size: .87rem; border: 1.5px solid #dde1e9; border-radius: 8px; padding: 9px 12px;
    transition: border-color .2s, box-shadow .2s;
}
.form-c .form-control:focus,
.form-c .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); outline: none; }
.form-c .form-control:disabled,
.form-c .form-select:disabled { background: #f7f8fa; color: #888; }

/* Status card mahasiswa */
.status-card {
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.status-card-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 100%);
    color: #fff;
}
.status-badge-big {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 30px;
    font-size: .95rem; font-weight: 700; margin-top: 14px;
}
.status-badge-big.disetujui { background: rgba(39,174,96,.2);  color: #2ecc71; border: 2px solid rgba(46,204,113,.3); }
.status-badge-big.menunggu  { background: rgba(243,156,18,.2); color: #f39c12; border: 2px solid rgba(243,156,18,.3); }
.status-badge-big.revisi    { background: rgba(52,152,219,.2); color: #5dade2; border: 2px solid rgba(52,152,219,.3); }
.status-badge-big.ditolak   { background: rgba(231,76,60,.2);  color: #e74c3c; border: 2px solid rgba(231,76,60,.3); }

.info-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f0f2f5; }
.info-row:last-child { border-bottom: none; }
.info-row .ik { flex: 0 0 180px; font-size: .82rem; font-weight: 600; color: #64748b; }
.info-row .iv { font-size: .84rem; color: #1e293b; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 2px; background: #e2e5ec; }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-dot {
    position: absolute; left: -24px; top: 3px;
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #e2e5ec; background: #fff;
    z-index: 1;
}
.tl-dot.done  { background: var(--gold); border-color: var(--gold); }
.tl-dot.active{ background: var(--navy); border-color: var(--navy); }
.tl-dot.err   { background: #e74c3c; border-color: #e74c3c; }
.tl-title { font-size: .84rem; font-weight: 600; color: #2d3748; line-height: 1.3; }
.tl-sub   { font-size: .76rem; color: #94a3b8; margin-top: 1px; }

/* Sidebar overlay mobile */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 1050;
}
.sidebar-overlay.active { display: block; }

/* =========================================
   BERKAS / UPLOAD
   ========================================= */

/* Card per berkas */
.berkas-card {
    background: #fdfcfa;
    border-radius: 14px;
    border: 1.5px solid #e2e5ec;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.berkas-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(201,168,76,.15); }
.berkas-card.uploaded { border-color: #28a745; }
.berkas-card.uploaded .berkas-icon { background: #28a745; }

.berkas-card-header {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 18px 20px 14px;
}

.berkas-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: var(--gold); flex-shrink: 0;
    transition: background .2s;
}
.berkas-icon.done { background: #28a745; color: #fff; }

.berkas-title { font-weight: 600; font-size: .9rem; color: #1a202c; }
.berkas-meta  { font-size: .74rem; color: #94a3b8; margin-top: 2px; }

/* File info after upload */
.berkas-file-info {
    padding: 10px 20px 16px;
    background: #f8fffe;
    border-top: 1px solid #e8f5e9;
}
.berkas-filename {
    font-size: .82rem; font-weight: 600; color: #2d3748;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.berkas-file-meta { font-size: .74rem; color: #94a3b8; margin-top: 3px; }

/* Upload form in card */
.berkas-upload-form { padding: 14px 20px 18px; border-top: 1px solid #f0f0f0; }

/* Drop zone */
.upload-dropzone {
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #fafbfc;
}
.upload-dropzone:hover,
.upload-dropzone.drag-over { border-color: var(--gold); background: #fffbf0; }
.upload-dropzone.has-file  { border-color: #28a745; background: #f0fff4; }

.upload-dz-text { font-size: .82rem; font-weight: 600; color: #4a5568; margin-top: 4px; }
.upload-dz-hint { font-size: .74rem; color: #94a3b8; margin-top: 2px; }
.upload-dz-filename {
    font-size: .78rem; font-weight: 600; color: #28a745;
    margin-top: 6px; word-break: break-all;
}

/* Outline-navy button */
.btn-outline-navy {
    color: var(--navy); border-color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* Modal berkas list items */
.berkas-list-item-modal {
    transition: background .15s;
}
.berkas-list-item-modal:hover { background: #fff; }

/* =========================================
   DARK MODE
   ========================================= */
body.dark-mode {
    --navy:   #2d5282;
    --navy-l: #3d6a9e;
    --navy-d: #1a3a5c;
    --gold:   #d4a843;
    --gold-l: #e8c060;
    --gold-d: #b08a2e;
    background: #1a1d23;
    color: #e2e4e8;
}

/* Content area */
body.dark-mode .content-wrapper { background: #1a1d23; }
body.dark-mode .page-content    { background: #1a1d23; }

/* Cards */
body.dark-mode .card-c          { background: #252830; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
body.dark-mode .card-bd         { background: #252830; }
body.dark-mode .stat-card       { background: #252830; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
body.dark-mode .filter-bar      { background: #252830; }
body.dark-mode .berkas-card     { background: #252830; border-color: #3a3d47; }
body.dark-mode .status-card     { background: #252830; }

/* Page title */
body.dark-mode .page-title-area h1 { color: #e2e4e8; }
body.dark-mode .page-title-area p  { color: #94a3b8; }

/* Table */
body.dark-mode .tbl thead th        { background: var(--navy-d); }
body.dark-mode .tbl tbody td        { border-bottom-color: #2e3138; color: #d1d5db; }
body.dark-mode .tbl tbody tr:hover td { background: rgba(212,168,67,.06); }

/* Info rows */
body.dark-mode .info-row            { border-bottom-color: #2e3138; }
body.dark-mode .info-row .ik        { color: #94a3b8; }
body.dark-mode .info-row .iv        { color: #e2e4e8; }

/* Forms */
body.dark-mode .form-c .form-control,
body.dark-mode .form-c .form-select,
body.dark-mode .filter-bar .form-control,
body.dark-mode .filter-bar .form-select {
    background: #1e2028;
    border-color: #3a3d47;
    color: #e2e4e8;
}
body.dark-mode .form-c .form-control:disabled,
body.dark-mode .form-c .form-select:disabled { background: #16181f; color: #666; }

/* Upload dropzone */
body.dark-mode .upload-dropzone     { background: #1e2028; border-color: #3a3d47; }
body.dark-mode .upload-dropzone:hover { background: #22251e; border-color: var(--gold); }
body.dark-mode .berkas-file-info    { background: #1e2028; border-top-color: #2e3138; }

/* Footer */
body.dark-mode .main-footer         { background: #252830; border-top-color: #2e3138; color: #666; }

/* Dropdown menus */
body.dark-mode .dropdown-menu       { background: #252830; border-color: #3a3d47 !important; }
body.dark-mode .dropdown-item       { color: #d1d5db; }
body.dark-mode .dropdown-item:hover { background: rgba(212,168,67,.1); color: var(--gold-l); }
body.dark-mode .dropdown-divider    { border-color: #3a3d47; }
body.dark-mode .dropdown-header     { color: var(--gold) !important; }

/* S-num text */
body.dark-mode .s-num  { color: #e2e4e8; }
body.dark-mode .s-label { color: #94a3b8; }

/* ── Typography & teks konten ────────────── */
body.dark-mode .tl-title           { color: #d1d5db; }
body.dark-mode .tl-sub             { color: #94a3b8; }
body.dark-mode .berkas-title       { color: #e2e4e8; }
body.dark-mode .berkas-meta        { color: #94a3b8; }
body.dark-mode .berkas-filename    { color: #d1d5db; }
body.dark-mode .berkas-file-meta   { color: #94a3b8; }
body.dark-mode .upload-dz-text     { color: #c9cdd4; }
body.dark-mode .upload-dz-hint     { color: #94a3b8; }
body.dark-mode .upload-dz-filename { color: #6fcf97; }
body.dark-mode .form-section-title { color: var(--gold-l); border-bottom-color: rgba(232,192,96,.2); }
body.dark-mode .form-c label       { color: #c9cdd4; }
body.dark-mode .filter-bar label   { color: #c9cdd4; }
body.dark-mode .footer-brand       { color: var(--gold-l); }
body.dark-mode .text-muted         { color: #94a3b8 !important; }

/* ── Inline color:var(--navy) di area konten ─ */
body.dark-mode .card-bd [style*="color:var(--navy)"],
body.dark-mode .card-bd [style*="color: var(--navy)"] { color: #e2e4e8 !important; }
body.dark-mode .page-content [style*="color:var(--navy)"],
body.dark-mode .page-content [style*="color: var(--navy)"] { color: #e2e4e8 !important; }

/* ── Inline warna gelap lain yg tidak terbaca ── */
body.dark-mode [style*="color:#7b241c"]  { color: #f08080 !important; }
body.dark-mode [style*="color:#1a5276"]  { color: #7ecbee !important; }
body.dark-mode [style*="color:#21618c"]  { color: #7ecbee !important; }
body.dark-mode [style*="color:#1e293b"]  { color: #e2e4e8 !important; }
body.dark-mode [style*="color:#64748b"]  { color: #94a3b8 !important; }

/* ── Inline background terang ──────────────── */
body.dark-mode [style*="background:#f8f9fb"] { background: #1e2028 !important; }
body.dark-mode [style*="background:#eef0f3"] { background: #2e3138 !important; }
body.dark-mode .card-bd [style*="background:#fff"] { background: #1e2028 !important; }

/* ── Progress bar ───────────────────────────── */
body.dark-mode .progress { background: #2e3138; }

/* ── Bootstrap alerts ───────────────────────── */
body.dark-mode .alert-light   { background: #252830 !important; border-color: #3a3d47 !important; color: #c9cdd4 !important; }
body.dark-mode .alert-success { background: rgba(39,174,96,.15) !important; border-color: rgba(39,174,96,.3) !important; color: #6fcf97 !important; }
body.dark-mode .alert-danger  { background: rgba(231,76,60,.15) !important; border-color: rgba(231,76,60,.3) !important; color: #eb8e8e !important; }
body.dark-mode .alert-primary { background: rgba(41,128,185,.15) !important; border-color: rgba(41,128,185,.3) !important; color: #7ecbee !important; }
body.dark-mode .alert         { color: #c9cdd4; }

/* ── Login page ─────────────────────────────── */
body.dark-mode .login-box                  { background: #252830; }
body.dark-mode .login-body .form-label     { color: #c9cdd4; }
body.dark-mode .login-body .form-control   { background: #1e2028; border-color: #3a3d47; color: #e2e4e8; }
body.dark-mode .login-body .form-control:focus { border-color: var(--gold); }
body.dark-mode .login-hint                 { background: rgba(212,168,67,.08); border-color: rgba(212,168,67,.2); color: #94a3b8; }
body.dark-mode .login-hint strong          { color: var(--gold-l); }
body.dark-mode .role-tab                   { background: #1e2028; color: #888; }
body.dark-mode .role-tab.active            { background: var(--navy); color: #fff; }

/* Dark mode toggle button */
.dm-toggle {
    background: none; border: none;
    color: rgba(255,255,255,.7); font-size: 1.05rem;
    padding: 6px 9px; border-radius: 6px; cursor: pointer;
    transition: color .2s, background .2s;
}
.dm-toggle:hover { color: var(--gold); background: rgba(212,168,67,.1); }

/* =========================================
   RESPONSIVE — additional breakpoints
   ========================================= */

/* ── Tablet (max 992px) ─────────────────── */
@media (max-width: 992px) {
    .s-num { font-size: 1.35rem; }
    .page-title-area h1 { font-size: 1.2rem; }
    
    /* Footer for tablet */
    .main-footer { flex-direction: column; gap: 8px; text-align: center; padding: 12px 16px; }
    .main-footer > div:first-child { flex: 1 1 100%; }
    .main-footer > div:nth-child(2) { flex: 1 1 100%; display: none; }
    .main-footer > span:last-child { flex: 1 1 100%; }
}

/* ── Mobile (max 768px) — extended ──────── */
@media (max-width: 768px) {
    /* Sidebar & layout (sudah ada, diperluas) */
    .main-sidebar { left: calc(-1 * var(--sidebar-w)); }
    .main-sidebar.mobile-open { left: 0; }
    .main-header { left: 0 !important; }
    .content-wrapper { margin-left: 0 !important; }
    .page-content { padding: 14px 14px 0; }

    /* Title area */
    .page-title-area h1 { font-size: 1.1rem; }
    .page-title-area p  { font-size: .8rem; }

    /* Stat cards */
    .s-num   { font-size: 1.25rem; }
    .s-label { font-size: .72rem; }
    .s-icon  { width: 40px; height: 40px; font-size: 1rem; }
    .stat-card { padding: 14px 14px; gap: 10px; }

    /* Card header */
    .card-hd h5 { font-size: .85rem; }

    /* Filter bar */
    .filter-bar { flex-direction: column; }
    .filter-bar .form-select,
    .filter-bar .form-control { min-width: 100%; }
    .filter-bar .ms-auto { margin-left: 0 !important; }

    /* Info row */
    .info-row { flex-direction: column; gap: 2px; }
    .info-row .ik { flex: none; }

    /* Berkas card header — allow wrap on small screens */
    .berkas-card-header { flex-wrap: wrap; }

    /* Status badge big */
    .status-badge-big { font-size: .82rem; padding: 8px 14px; }

    /* Status card header stacks */
    .status-card-header .d-flex.justify-content-between { flex-direction: column; gap: 12px; }

    /* Footer */
    .main-footer { flex-direction: column; gap: 8px; text-align: center; padding: 12px 16px; justify-content: center; }
    .main-footer > div:first-child { flex: 1 1 100%; }
    .main-footer > div:nth-child(2) { flex: 1 1 100%; display: none; }
    .main-footer > span:last-child { flex: 1 1 100%; }
    .main-footer .d-none.d-md-flex { display: none !important; }

    /* Table text */
    .tbl tbody td { font-size: .78rem; padding: 8px 10px; }
    .tbl thead th { font-size: .72rem; padding: 9px 10px; }

    /* Login box */
    .login-header { padding: 24px 24px 20px; }
    .login-body   { padding: 22px 24px 28px; }
}

/* ── Very small phones (max 480px) ──────── */
@media (max-width: 480px) {
    .stat-card { padding: 12px 10px; gap: 8px; }
    .s-num     { font-size: 1.1rem; }
    .s-icon    { width: 36px; height: 36px; font-size: .9rem; border-radius: 9px; }
    .page-content { padding: 12px 10px 0; }
    .card-bd   { padding: 14px; }
    .berkas-card-header { padding: 12px 14px 10px; }
    .berkas-upload-form { padding: 10px 14px 14px; }
    .berkas-file-info   { padding: 8px 14px 12px; }
}

/* ── Dark mode: Bootstrap 5.3 subtle utility overrides ─ */
body.dark-mode .bg-success-subtle { background-color: rgba(39,174,96,.18) !important; }
body.dark-mode .bg-danger-subtle  { background-color: rgba(231,76,60,.18) !important; }
body.dark-mode .bg-primary-subtle { background-color: rgba(41,128,185,.18) !important; }
body.dark-mode .bg-warning-subtle { background-color: rgba(243,156,18,.18) !important; }
body.dark-mode .text-success      { color: #6fcf97 !important; }
body.dark-mode .text-danger       { color: #eb8e8e !important; }
body.dark-mode .text-primary      { color: #7ecbee !important; }
body.dark-mode .border-success-subtle { border-color: rgba(39,174,96,.35) !important; }
body.dark-mode .border-danger-subtle  { border-color: rgba(231,76,60,.35) !important; }
body.dark-mode .border-primary-subtle { border-color: rgba(41,128,185,.35) !important; }

/* ── Dark mode: Bootstrap card + table inside log page ─ */
body.dark-mode .card             { background: #252830 !important; border-color: #3a3d47 !important; }
body.dark-mode .card-body        { background: #252830 !important; color: #d1d5db; }
body.dark-mode .table-dark th    { background: var(--navy-d) !important; }
body.dark-mode .table-hover tbody tr:hover td { background: rgba(212,168,67,.06) !important; }
body.dark-mode .table > :not(caption) > * > * { background-color: transparent; color: #d1d5db; border-bottom-color: #2e3138; }
body.dark-mode .pagination .page-link { background: #252830; border-color: #3a3d47; color: #d1d5db; }
body.dark-mode .pagination .page-item.active .page-link { background: var(--navy); border-color: var(--navy); color: #fff; }
body.dark-mode .pagination .page-item.disabled .page-link { background: #1e2028; color: #555; border-color: #3a3d47; }

/* ── Dark mode: form-select & form-control (Bootstrap native) ─ */
body.dark-mode .form-select,
body.dark-mode .form-control:not([class*="form-c"]) {
    background-color: #1e2028;
    border-color: #3a3d47;
    color: #e2e4e8;
}
body.dark-mode .form-select:focus,
body.dark-mode .form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,67,.18); }

/* ── Berkas card: badge tidak ikut menyusut ─ */
.berkas-card-header > .badge { flex-shrink: 0; }

/* ── Modal Berkas: ukuran & responsif ───────*/
.bm-content {
    display: flex;
    flex-direction: column;
    height: 90vh;
}
/* Modal fullscreen (≤992px) → pakai tinggi 100% */
@media (max-width: 992px) {
    .bm-content { height: 100%; }
}

/* ── Modal Berkas: layout mobile ────────────
   Panel kiri (daftar) + panel kanan (preview)
   diubah ke kolom di layar ≤768px            */
@media (max-width: 768px) {
    #modalBerkas .modal-body {
        flex-direction: column !important;
        overflow-y: auto !important;
    }
    #modalBerkas #berkasListContainer {
        width: 100% !important;
        min-width: 0 !important;
        max-height: 220px;
        border-right: none !important;
        border-bottom: 1px solid #e2e5ec;
        flex-shrink: 0;
    }
    #modalBerkas .modal-body > .flex-grow-1 {
        min-height: 240px;
        flex: 1 1 auto;
    }
    #modalBerkas .modal-footer {
        flex-wrap: wrap;
        gap: 6px;
    }
    #modalDetailBody .info-row .iv {
        word-break: break-word;
    }
}

/* Dark mode: panel modal berkas */
body.dark-mode #berkasListContainer    { background: #1e2028 !important; border-color: #3a3d47 !important; }
body.dark-mode #modalBerkas .modal-body > .flex-grow-1 > div:first-child { background: #252830 !important; border-bottom-color: #3a3d47 !important; }
body.dark-mode #previewContainer       { background: #1a1d23 !important; }
body.dark-mode #modalBerkas .modal-footer { background: #252830 !important; border-top-color: #3a3d47 !important; }

