/* ==========================================================================
   SIPANAS - Sistem Laporan Perjalanan Dinas
   Tema: merah marun (pusat) → marun gelap (tepi/vignette) dengan aksen emas.
   Latar tetap putih dan teks hitam agar tetap mudah dibaca & dicetak.
   ========================================================================== */

:root {
    /* Merah marun */
    --maroon:        #931A21;   /* pusat gradasi */
    --maroon-2:      #80151C;
    --maroon-3:      #6B1118;
    --maroon-dark:   #3B090C;   /* tepi / vignette */
    --maroon-darkest:#2C0507;

    /* Emas */
    --gold:          #E5B869;
    --gold-light:    #F2D272;
    --gold-deep:     #C79A४4;
    --gold-deep-2:   #A8783A;

    /* Netral (teks hitam di atas putih) */
    --ink:       #14100F;
    --ink-soft:  #3A3230;
    --muted:     #6B605E;
    --line:      #E7DED9;
    --line-soft: #F1EAE6;
    --bg:        #FFFFFF;
    --bg-soft:   #FBF7F4;
    --card:      #FFFFFF;

    --ok:        #166B45;
    --ok-soft:   #E6F4EC;
    --warn:      #9A5B00;
    --warn-soft: #FDF3E2;
    --danger:    #A31621;
    --danger-soft:#FBEAEA;
    --info:      #7A2408;
    --info-soft: #FBEFE6;

    --radius:    14px;
    --radius-sm: 10px;
    --shadow:    0 6px 20px rgba(59, 9, 12, .09);
    --shadow-lg: 0 20px 48px rgba(44, 5, 7, .28);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;

    /* Gradasi utama */
    --grad-maroon: linear-gradient(135deg, #2C0507 0%, #80151C 42%, #931A21 72%, #3B090C 100%);
    --grad-gold:   linear-gradient(135deg, #E5B869 0%, #F2D272 45%, #E5B869 100%);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--ink);
    background-color: #fff;
    /* vignette marun halus di tepi, bagian tengah tetap putih bersih */
    background-image:
        radial-gradient(1100px 520px at -8% -12%, rgba(59, 9, 12, .12), rgba(59, 9, 12, 0) 60%),
        radial-gradient(1000px 480px at 108% -6%, rgba(147, 26, 33, .13), rgba(147, 26, 33, 0) 62%),
        radial-gradient(900px 420px at 50% 112%, rgba(44, 5, 7, .10), rgba(44, 5, 7, 0) 60%);
    background-attachment: fixed;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--maroon-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0 0 10px; }

/* ---------------------------------------------------------------- Header */
.app-header {
    background: var(--grad-maroon);
    color: #fff;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    border-bottom: 3px solid transparent;
    border-image: var(--grad-gold) 1;
    box-shadow: 0 6px 26px rgba(44, 5, 7, .30);
    position: relative;
    z-index: 30;
}
.app-header::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(600px 200px at 85% -40%, rgba(229, 184, 105, .22), transparent 70%);
    pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 240px; position: relative; z-index: 1; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--grad-gold);
    color: var(--maroon-darkest);
    display: grid; place-items: center; font-weight: 800; font-size: 15px;
    letter-spacing: -.5px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.brand-title { font-weight: 800; font-size: 17px; line-height: 1.15; letter-spacing: 1.4px; }
.brand-sub { font-size: 10.5px; opacity: .92; letter-spacing: .4px; text-transform: uppercase; color: var(--gold-light); }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.clock-chip {
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(229, 184, 105, .45);
    border-radius: 12px;
    padding: 6px 14px;
    text-align: center;
    line-height: 1.15;
    backdrop-filter: blur(4px);
}
.clock-time { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .6px; color: var(--gold-light); }
.clock-date { font-size: 10px; opacity: .9; text-transform: uppercase; letter-spacing: .6px; }

.user-chip {
    display: flex; align-items: center; gap: 10px;
    background: rgba(0, 0, 0, .2);
    border: 1px solid rgba(229, 184, 105, .45);
    border-radius: 12px; padding: 6px 12px 6px 8px;
    cursor: pointer; position: relative;
}
.user-chip .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--grad-gold); color: var(--maroon-darkest);
    display: grid; place-items: center; font-weight: 800; font-size: 12px;
}
.user-chip .u-name { font-size: 13px; font-weight: 700; }
.user-chip .u-role { font-size: 10px; opacity: .88; }
/* Info sisa masa berlaku akun (tepat di bawah username pada header) */
.user-chip .u-masa {
    font-size: 10px; font-weight: 700; margin-top: 2px; line-height: 1.25;
    padding: 1px 6px; border-radius: 999px; display: inline-block;
    background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); color: #fff;
}
.user-chip .u-masa.segera { background: rgba(255, 214, 132, .28); border-color: #FFD684; color: #FFF7E6; }
.user-chip .u-masa.lifetime { background: rgba(160, 255, 190, .18); border-color: rgba(160, 255, 190, .45); }
.user-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px; box-shadow: var(--shadow-lg);
    min-width: 235px; padding: 8px; display: none; z-index: 60;
}
.user-chip.open .user-menu { display: block; }
.user-menu a, .user-menu button {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    border-radius: 8px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer;
}
.user-menu a:hover, .user-menu button:hover { background: var(--bg-soft); text-decoration: none; }
.user-menu .menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }

/* ---------------------------------------------------------------- Nav */
.app-nav {
    background: linear-gradient(180deg, #FFFDFB, #FFFFFF);
    border-bottom: 1px solid var(--line);
    display: flex; gap: 4px; padding: 0 16px;
    overflow-x: auto; scrollbar-width: thin;
    position: sticky; top: 0; z-index: 25;
    box-shadow: 0 2px 12px rgba(59, 9, 12, .05);
}
.app-nav a {
    padding: 13px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
    border-bottom: 3px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 7px;
}
.app-nav a:hover { color: var(--maroon-2); background: var(--bg-soft); text-decoration: none; }
.app-nav a.active { color: var(--maroon-2); border-bottom-color: var(--gold); background: var(--bg-soft); font-weight: 700; }
.nav-badge {
    background: var(--maroon-2); color: #fff; border-radius: 999px;
    font-size: 10px; padding: 1px 6px; font-weight: 800;
}

/* ---------------------------------------------------------------- Layout */
.container { padding: 22px; max-width: 1560px; margin: 0 auto; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid-2-1 { grid-template-columns: 1.6fr 1fr; }
.grid > * { min-width: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Cards */
.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 20px;
    position: relative;
}
.card::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--grad-gold); opacity: .8;
}
.card.tight { padding: 16px; }
.card-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 16px;
    padding-bottom: 14px; border-bottom: 1px solid var(--line-soft);
}
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 12px; color: var(--muted); }

.stat-card { display: flex; align-items: flex-start; gap: 14px; }
.stat-icon {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    font-size: 21px; background: var(--grad-gold); color: var(--maroon-darkest); flex: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 25px; font-weight: 800; letter-spacing: -.6px; font-variant-numeric: tabular-nums; color: var(--maroon-darkest); }
.stat-foot { font-size: 12px; color: var(--muted); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, #1F8A5C, #3FBD8C); color: #fff; }
.stat-card.amber .stat-icon { background: linear-gradient(135deg, #B0680A, #DE9A33); color: #fff; }

/* ---------------------------------------------------------------- Hero */
.hero {
    background: var(--grad-maroon);
    color: #fff; border-radius: var(--radius); padding: 22px 24px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 184, 105, .28);
    position: relative; overflow: hidden;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(520px 220px at 88% -30%, rgba(242, 210, 114, .25), transparent 70%);
    pointer-events: none;
}
.hero h1 { font-size: 23px; color: #fff; position: relative; }
.hero .hero-sub { opacity: .93; font-size: 12.5px; margin-top: 3px; position: relative; }
.hero .hero-chip {
    background: rgba(0, 0, 0, .26); border: 1px solid rgba(229, 184, 105, .5);
    border-radius: var(--radius-sm); padding: 8px 18px; text-align: center;
    margin-left: auto; position: relative;
}
.hero .hero-chip .clock-time { font-size: 25px; }
.hero-right { text-align: right; position: relative; }

/* ---------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 7px; justify-content: center;
    border: 1px solid transparent; background: linear-gradient(135deg, var(--maroon-2), var(--maroon));
    color: #fff;
    padding: 9px 15px; border-radius: var(--radius-sm); font: inherit; font-weight: 650;
    font-size: 13px; cursor: pointer; transition: .16s; text-decoration: none; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(128, 21, 28, .22);
}
.btn:hover { background: linear-gradient(135deg, var(--maroon-3), var(--maroon-2)); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.orange { background: var(--grad-gold); color: var(--maroon-darkest); font-weight: 800; border-color: rgba(59, 9, 12, .18); }
.btn.orange:hover { background: linear-gradient(135deg, #F2D272, #E5B869); }
.btn.ghost { background: #fff; color: var(--maroon-2); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--bg-soft); border-color: var(--gold); }
.btn.soft { background: var(--bg-soft); color: var(--maroon-2); border-color: var(--line); box-shadow: none; }
.btn.soft:hover { background: #F6EDE7; border-color: var(--gold); }
.btn.danger { background: linear-gradient(135deg, #8E1218, var(--danger)); }
.btn.danger:hover { background: #7E0F14; }
.btn.ok { background: linear-gradient(135deg, #0F6F46, var(--ok)); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn.lg { padding: 12px 22px; font-size: 14px; }
.btn.block { width: 100%; }
.btn-icon {
    border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer;
    width: 32px; height: 32px; display: grid; place-items: center; color: var(--maroon-2); font-size: 14px;
}
.btn-icon:hover { background: var(--bg-soft); border-color: var(--gold); }

.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 9px 16px; font-weight: 650; font-size: 12.5px; color: var(--ink-soft);
}
.chip:hover { border-color: var(--gold); color: var(--maroon-2); background: var(--bg-soft); text-decoration: none; }
.chip .ico { font-size: 14px; }
.chip.active { background: linear-gradient(135deg, var(--maroon-2), var(--maroon)); border-color: var(--maroon); color: #fff; }
.chip-tab-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--ink-soft); }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=month], input[type=time], select, textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; font-size: 13px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(229, 184, 105, .45); border-color: var(--gold-deep-2); }
textarea { resize: vertical; min-height: 82px; line-height: 1.55; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)); }
.form-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.inline-note {
    background: linear-gradient(135deg, #FFFDF8, #FFF6E9); border: 1px dashed var(--gold-deep-2);
    color: #5A3A08; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12.5px;
}
.checkbox-list {
    display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    max-height: 230px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px;
    background: #fff;
}
.checkbox-item { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; cursor: pointer; }
.checkbox-item input { width: auto; margin-top: 3px; accent-color: var(--maroon-2); }
.checkbox-item .nm { font-weight: 700; }
.checkbox-item .jb { color: var(--muted); font-size: 11px; }

.filter-bar { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); align-items: end; }
.filter-bar .field { margin-bottom: 0; }
.filter-bar > * { min-width: 0; }
.search-big { display: flex; gap: 10px; flex-wrap: wrap; }
.search-big input { flex: 1 1 200px; min-width: 0; }

/* saklar Ya/Tidak */
.switch-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.switch {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 650;
    background: #fff; color: var(--ink-soft);
}
.switch input { width: auto; accent-color: var(--maroon-2); }
.switch.on { border-color: var(--maroon-2); background: linear-gradient(135deg, var(--maroon-2), var(--maroon)); color: #fff; }
.switch.on input { accent-color: var(--gold); }

/* baris hotel dinamis */
.hotel-row {
    display: grid; gap: 8px; grid-template-columns: 1.6fr .7fr 1fr auto;
    align-items: end; padding: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
    background: var(--bg-soft); margin-bottom: 8px;
}
.hotel-row .field { margin: 0; }
.hotel-row .sub { font-size: 11px; color: var(--muted); }
@media (max-width: 700px) {
    .hotel-row { grid-template-columns: 1fr; }
}

/* daftar berkas unggahan di form */
.upload-item {
    display: flex; gap: 12px; align-items: flex-start; padding: 11px 13px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 8px;
}
.upload-item.wajib { border-left: 4px solid var(--maroon-2); }
.upload-item .ui-ico {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--grad-gold); color: var(--maroon-darkest); flex: none; font-size: 15px;
}
.upload-item .ui-main { flex: 1; min-width: 0; }
.upload-item .ui-title { font-weight: 700; font-size: 12.6px; }
.upload-item .ui-sub { font-size: 11px; color: var(--muted); }
.upload-item .ui-file {
    display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 11.5px;
    background: var(--bg-soft); border-radius: 8px; padding: 5px 9px;
}
.upload-item input[type=file] { display: none; }
/* Berkas yang sudah terunggah (mode Ubah) beserta ID-nya */
.upload-item .ui-existing-title { font-size: 11px; color: var(--maroon-2); font-weight: 700; margin-top: 8px; text-transform: uppercase; letter-spacing: .4px; }
.upload-item .ui-file.lama { background: #FFF9EC; border: 1px solid var(--line); flex-wrap: wrap; }
.upload-item .ui-file.lama > span:first-child { flex: 1 1 220px; min-width: 0; }
.upload-item .ui-file.baru { background: #F3FAF4; border: 1px solid #BFE3C6; }
.upload-item .ui-file.baru .ui-file-aksi { font-size: 11px; color: var(--maroon-2); font-weight: 600; }
.upload-item .ui-file.baru .btn-icon { width: 22px; height: 22px; font-size: 11px; }

/* ---------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.6px; background: #fff; }
table.data thead th {
    background: linear-gradient(180deg, #FDF9F5, #F8F1EA); text-align: left; padding: 11px 12px; font-size: 11px;
    text-transform: uppercase; letter-spacing: .4px; color: var(--maroon-3); font-weight: 800;
    border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.data tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tbody tr:hover { background: #FFFCF9; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .tgl { font-size: 11.5px; color: var(--muted); }
table.data .keg { font-weight: 700; color: var(--ink); }
table.data .lok { font-size: 11.5px; color: var(--muted); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aksi-cell { display: flex; gap: 6px; }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-state .es-ico { font-size: 34px; opacity: .55; display: block; margin-bottom: 8px; }

/* ---------------------------------------------------------------- Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
    padding: 3px 10px; font-size: 11px; font-weight: 750; white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.grey { background: #F2EFED; color: var(--muted); }
.badge.brand { background: var(--bg-soft); color: var(--maroon-2); border: 1px solid var(--gold); }
.badge.gold { background: var(--grad-gold); color: var(--maroon-darkest); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

.kategori-tag { font-size: 11px; font-weight: 750; color: var(--maroon-2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.pill-tabs { display: flex; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); padding: 5px; border-radius: 999px; flex-wrap: wrap; }
.pill-tabs button {
    border: 0; background: none; font: inherit; font-weight: 650; font-size: 12.5px; color: var(--ink-soft);
    padding: 7px 15px; border-radius: 999px; cursor: pointer;
}
.pill-tabs button.active { background: linear-gradient(135deg, var(--maroon-2), var(--maroon)); color: #fff; box-shadow: 0 2px 8px rgba(128, 21, 28, .25); }
.pill-tabs button.active .badge { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------------------------------------------------------------- Lists */
.list-clean { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-clean li {
    border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 11px 13px;
    display: flex; gap: 12px; align-items: center; background: #fff; flex-wrap: wrap;
}
.list-clean li.warn-item { border-left: 4px solid var(--gold-deep-2); background: #FFFDF7; }
.list-clean li.danger-item { border-left: 4px solid var(--maroon); background: #FFF9F9; }
.list-clean li.info-item { border-left: 4px solid var(--gold); background: #FFFCF6; }
.list-clean .li-main { flex: 1; min-width: 0; }
.list-clean .li-title { font-weight: 700; font-size: 12.8px; }
.list-clean .li-sub { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- Modal */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(44, 5, 7, .62);
    backdrop-filter: blur(2px); display: none; z-index: 100; padding: 20px; overflow-y: auto;
}
.modal-backdrop.open { display: block; }
.modal {
    background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
    max-width: 1000px; margin: 20px auto; overflow: hidden;
    border-top: 4px solid transparent; border-image: var(--grad-gold) 1;
}
.modal.narrow { max-width: 520px; }
.modal.wide { max-width: 1200px; }
.modal-head {
    display: flex; align-items: center; gap: 12px; padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--grad-maroon); color: #fff;
}
.modal-head h3 { font-size: 16px; color: #fff; }
.modal-head .modal-sub { font-size: 12px; color: rgba(255, 255, 255, .88); }
.modal-head .btn-icon { background: rgba(255, 255, 255, .16); border-color: rgba(229, 184, 105, .5); color: #fff; }
.modal-body { padding: 20px; max-height: calc(100vh - 230px); overflow-y: auto; background: #fff; }
.modal-foot {
    padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-soft);
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.modal-sub { font-size: 12px; color: var(--muted); }

.section-block { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; background: #fff; }
.section-block > h4 {
    font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--maroon-2);
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px; font-weight: 800;
    padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}
.kalk-panel { background: linear-gradient(180deg, #FFFDF9, #FFF8EE); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.kalk-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 12.8px; }
.kalk-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 14px; color: var(--maroon-darkest); }
.kalk-row.sisa { font-weight: 800; }
.kalk-row.sisa.negatif { color: var(--danger); }
.kalk-row.sisa.positif { color: var(--ok); }

/* ---------------------------------------------------------------- Dokumen */
.doc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.doc-item {
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px;
    display: flex; gap: 10px; align-items: flex-start; background: #fff;
}
.doc-item.done { border-color: #CDE7D8; background: #FAFEFC; }
.doc-item.wajib-kurang { border-color: var(--gold-deep-2); background: #FFFCF4; }
.doc-item .di-ico {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--grad-gold); color: var(--maroon-darkest); flex: none; font-size: 15px;
}
.doc-item.done .di-ico { background: linear-gradient(135deg, #1F8A5C, #3FBD8C); color: #fff; }
.doc-item .di-title { font-weight: 700; font-size: 12.5px; }
.doc-item .di-sub { font-size: 11px; color: var(--muted); }
.doc-item .di-act { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

.progress { height: 7px; background: #F1EAE6; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--maroon-2), var(--gold)); }
.progress.ok > span { background: linear-gradient(90deg, var(--ok), #3FBD8C); }

/* ---------------------------------------------------------------- Command */
.cmd-box {
    background: var(--grad-maroon); color: #fff;
    border-radius: var(--radius); padding: 18px;
    border: 1px solid rgba(229, 184, 105, .3);
    box-shadow: var(--shadow);
}
.cmd-box input { border: 1px solid rgba(229, 184, 105, .4); font-size: 14px; padding: 13px 15px; }
.cmd-input-row { display: flex; gap: 10px; }
.cmd-hints { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cmd-hints button {
    background: rgba(0, 0, 0, .22); border: 1px solid rgba(229, 184, 105, .5); color: #fff;
    border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 12px; cursor: pointer;
}
.cmd-hints button:hover { background: rgba(0, 0, 0, .35); }
.cmd-answer { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; box-shadow: var(--shadow); }
.cmd-answer .ca-title { font-weight: 800; font-size: 15px; margin-bottom: 8px; color: var(--maroon-2); }
.cmd-mini { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.cmd-mini .cm-item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; min-width: 130px; }
/* Rincian folder pada halaman Kapasitas Drive */
.rak-rinci { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; padding: 3px 0; border-bottom: 1px dashed var(--line-soft); font-size: 11.5px; }
.rak-rinci:last-child { border-bottom: 0; }
.rak-rinci > span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rak-rinci > span:last-child { white-space: nowrap; color: var(--maroon-2); font-weight: 650; }
.cmd-mini .cm-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 800; }
.cmd-mini .cm-value { font-weight: 800; font-size: 15px; color: var(--maroon-darkest); }

/* ---------------------------------------------------------------- Kalender */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 800; color: var(--maroon-3); text-transform: uppercase; padding-bottom: 4px; }
.cal-cell {
    background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
    min-height: 104px; padding: 7px; display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.cal-cell.empty { background: #FCFAF8; border-style: dashed; }
.cal-cell.today { border-color: var(--maroon-2); box-shadow: inset 0 0 0 1px var(--gold); }
.cal-cell.libur { background: #FFF7F6; }
.cal-cell .cc-date { font-size: 12px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.cal-cell .cc-date .lib { font-size: 9px; font-weight: 800; background: var(--grad-gold); color: var(--maroon-darkest); padding: 1px 5px; border-radius: 5px; }
.cal-event {
    font-size: 10.6px; border-radius: 6px; padding: 4px 6px; background: var(--bg-soft);
    color: var(--maroon-3); border-left: 3px solid var(--maroon-2); cursor: pointer; line-height: 1.3;
}
.cal-event.k-luar_provinsi { background: #FDEEF0; border-left-color: #931A21; color: #6B1118; }
.cal-event.k-luar_kabupaten { background: #FDF6E8; border-left-color: #C79A44; color: #6B4B10; }
.cal-event.k-dalam_kabupaten { background: #EFF7F2; border-left-color: #1F8A5C; color: #14543A; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 12px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; }

/* ---------------------------------------------------------------- Chart */
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 260px; }

/* ---------------------------------------------------------------- Toast */
/* ---------------------------------------------------------------- Notifikasi (toast) */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 12px; z-index: 200; width: min(400px, calc(100vw - 36px)); }
.toast {
    position: relative; overflow: hidden; color: #fff; border-radius: 16px;
    padding: 14px 44px 16px 16px; font-size: 13px; line-height: 1.5;
    background: linear-gradient(135deg, #2C0507 0%, #80151C 55%, #3B090C 100%);
    border: 1px solid rgba(229, 184, 105, .45);
    box-shadow: 0 18px 40px rgba(44, 5, 7, .38);
    animation: toastMasuk .34s cubic-bezier(.2,.9,.3,1.2);
    display: flex; gap: 12px; align-items: flex-start;
}
.toast::after {
    content: ''; position: absolute; inset: 0 auto 0 0; width: 44px;
    background: radial-gradient(60px 60px at 0% 0%, rgba(242, 210, 114, .28), transparent 70%);
    pointer-events: none;
}
.toast .t-ico {
    width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center;
    font-size: 17px; background: var(--grad-gold); color: var(--maroon-darkest);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.toast .t-main { flex: 1; min-width: 0; }
.toast .t-judul { font-weight: 800; font-size: 13.5px; letter-spacing: .2px; color: var(--gold-light); margin-bottom: 2px; }
.toast .t-isi { color: #fff; word-wrap: break-word; }
.toast .t-tutup {
    position: absolute; top: 8px; right: 8px; border: 0; background: rgba(255, 255, 255, .14);
    color: #fff; width: 24px; height: 24px; border-radius: 8px; cursor: pointer; font-size: 12px; line-height: 1;
}
.toast .t-tutup:hover { background: rgba(255, 255, 255, .26); }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad-gold); animation: toastBar 5s linear forwards; }
.toast.ok { background: linear-gradient(135deg, #06301F 0%, #0F6F46 60%, #0A4A2F 100%); border-color: rgba(160, 230, 190, .4); }
.toast.ok .t-ico { background: linear-gradient(135deg, #A7F3D0, #34D399); color: #06301F; }
.toast.ok .t-judul { color: #C8F7DE; }
.toast.err { background: linear-gradient(135deg, #2C0507 0%, #931A21 60%, #3B090C 100%); }
.toast.warn { background: linear-gradient(135deg, #3A2200 0%, #8A5200 60%, #2C1A00 100%); border-color: rgba(255, 214, 130, .45); }
.toast.warn .t-judul { color: #FFE0A3; }
.toast.info { background: linear-gradient(135deg, #06263B 0%, #0C5A7A 60%, #04202F 100%); border-color: rgba(150, 220, 255, .4); }
.toast.info .t-judul { color: #BFE8FA; }
@keyframes toastMasuk {
    0% { transform: translateX(120%) scale(.94); opacity: 0; }
    70% { transform: translateX(-4px) scale(1.01); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toastBar { from { width: 100%; } to { width: 0; } }
.toast.keluar { animation: toastKeluar .28s ease-in forwards; }
@keyframes toastKeluar { to { transform: translateX(120%) scale(.95); opacity: 0; } }

/* Notifikasi sambutan setelah login */
.toast.sambutan { padding: 16px 44px 18px 16px; }
.toast.sambutan .t-ico { width: 42px; height: 42px; font-size: 21px; border-radius: 13px; }
.toast.sambutan .t-judul { font-size: 15px; }
.toast.sambutan .t-isi { font-size: 12.8px; }

/* Notifikasi pengingat (desktop/HP) */
.toast.pengingat { border-color: rgba(242, 210, 114, .6); }
@media (max-width: 560px) {
    .toast-wrap { right: 10px; left: 10px; bottom: 10px; width: auto; }
    .toast { padding-right: 40px; }
}

/* ---------------------------------------------------------------- Login */
.login-wrap {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background: var(--grad-maroon);
    position: relative;
}
.login-wrap::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(700px 380px at 80% 10%, rgba(242, 210, 114, .18), transparent 70%);
    pointer-events: none;
}
.login-card {
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
    width: 100%; max-width: 960px; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden;
    position: relative; z-index: 1;
}
.login-side {
    background: var(--grad-maroon); color: #fff; padding: 40px 34px;
    display: flex; flex-direction: column; gap: 14px;
}
.login-side h2 { font-size: 25px; line-height: 1.25; color: #fff; }
.login-side p { opacity: .93; font-size: 13px; }
.login-feat { display: grid; gap: 10px; margin-top: 10px; }
.login-feat div { display: flex; gap: 10px; align-items: center; font-size: 12.6px; opacity: .96; }
.login-form { padding: 38px 34px; background: #fff; }
.login-form h3 { font-size: 19px; margin-bottom: 4px; }
.tab-switch { display: flex; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); padding: 5px; border-radius: 999px; margin-bottom: 20px; }
.tab-switch button { flex: 1; border: 0; background: none; font: inherit; font-weight: 650; font-size: 12.5px; padding: 8px; border-radius: 999px; cursor: pointer; color: var(--ink-soft); }
.tab-switch button.active { background: linear-gradient(135deg, var(--maroon-2), var(--maroon)); color: #fff; box-shadow: 0 2px 8px rgba(128, 21, 28, .22); }
.demo-note { background: linear-gradient(135deg, #FFFDF8, #FFF5E6); border: 1px dashed var(--gold-deep-2); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; color: #5A3A08; margin-top: 14px; }
.code-box {
    font-family: ui-monospace, monospace; font-size: 24px; font-weight: 800; letter-spacing: 7px;
    text-align: center; background: var(--bg-soft); border: 1px dashed var(--maroon-2); color: var(--maroon-2);
    border-radius: var(--radius-sm); padding: 12px; margin: 10px 0;
}

/* ---------------------------------------------------------------- Print */
.print-sheet { background: #fff; }
.print-kop { display: flex; gap: 16px; align-items: center; border-bottom: 3px double #000; padding-bottom: 10px; margin-bottom: 14px; }
.print-kop .pk-logo {
    width: 70px; height: 70px; border-radius: 50%; border: 2px solid var(--maroon-2); color: var(--maroon-2);
    display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none;
}
.print-kop .pk-text { text-align: center; flex: 1; }
.print-kop .pk-text .l1 { font-size: 15px; font-weight: 700; letter-spacing: .4px; }
.print-kop .pk-text .l2 { font-size: 17px; font-weight: 800; letter-spacing: .4px; }
.print-kop .pk-text .l3 { font-size: 11px; }
.print-title { text-align: center; margin: 16px 0 4px; }
.print-title h2 { font-size: 16px; text-decoration: underline; letter-spacing: .5px; }
.print-meta { display: grid; grid-template-columns: 148px 1fr; gap: 3px 10px; font-size: 12.5px; margin: 14px 0; }
.print-meta .k { font-weight: 700; }
.print-body { font-size: 12.5px; text-align: justify; }
.print-section-title { font-weight: 800; font-size: 12.5px; margin: 14px 0 6px; text-transform: uppercase; }
.print-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.print-table th, .print-table td { border: 1px solid #333; padding: 6px 8px; vertical-align: top; }
.print-table th { background: #F6F1EC; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.print-table td.num { text-align: right; }
.print-sign { margin-top: 30px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 24px; }
.print-sign.multi { justify-content: space-between; }
.print-sign .box { text-align: center; font-size: 12.5px; min-width: 240px; }
.print-sign .box .nm { font-weight: 700; text-decoration: underline; margin-top: 58px; }
.print-sign .box.small { min-width: 200px; font-size: 11.5px; }
.print-sign .box.small .nm { margin-top: 44px; }
.print-only { display: none; }

@media print {
    @page { size: A4 portrait; margin: 14mm 16mm; }
    html, body { background: #fff !important; background-image: none !important; font-size: 11.5pt; }
    .no-print, .app-header, .app-nav, .modal-backdrop, .toast-wrap, .hero, .filter-bar, .pill-tabs, .chip-row { display: none !important; }
    .print-only { display: block !important; }
    .container { padding: 0; max-width: none; }
    .card, .print-sheet { border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
    .card::before { display: none !important; }
    .print-sheet { page-break-after: always; }
    .print-sheet:last-child { page-break-after: auto; }
    table.data thead th { position: static; background: #eee !important; }
    table.data { font-size: 10.5pt; }
    .badge { border: 1px solid #999; color: #000 !important; background: none !important; }
    a { color: #000; text-decoration: none; }
    tr, .print-no-break { page-break-inside: avoid; }
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
    .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .container { padding: 14px; }
    .grid-2-1, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .search-big .btn { flex: 1 1 auto; }
    .login-card { grid-template-columns: 1fr; }
    .login-side { display: none; }
    .cal-cell { min-height: 80px; }
    .header-right { width: 100%; }
    .clock-chip { flex: 1; }
    .modal { margin: 8px auto; }
    .modal-body { max-height: none; }
}
@media (max-width: 560px) {
    .cal-grid { gap: 4px; }
    .cal-cell { min-height: 66px; padding: 5px; }
    .cal-event { font-size: 9.5px; }
    .stat-value { font-size: 20px; }
}


/* ---------------------------------------------------------------- Logo & foto */
.brand-logo {
    width: 46px; height: 46px; border-radius: 12px; object-fit: contain;
    background: #fff; padding: 3px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .6);
    flex: none;
}
.login-logo {
    width: 62px; height: 62px; border-radius: 16px; object-fit: contain;
    background: #fff; padding: 4px; box-shadow: 0 6px 20px rgba(44, 5, 7, .35);
    flex: none;
}
.user-chip .avatar { overflow: hidden; }
.user-chip .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo { width: 150px; flex: none; text-align: center; }
.profile-photo .pp-frame {
    width: 118px; height: 118px; border-radius: 50%; margin: 0 auto; overflow: hidden;
    background: var(--grad-gold); color: var(--maroon-darkest);
    display: grid; place-items: center; font-size: 44px; font-weight: 800;
    border: 3px solid #fff; box-shadow: var(--shadow);
}
.profile-photo .pp-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------------------- Progres simpan */
.saving-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.saving-spin {
    width: 44px; height: 44px; border-radius: 50%; flex: none;
    border: 4px solid var(--line); border-top-color: var(--maroon-2);
    border-right-color: var(--gold);
    animation: sipSpin .9s linear infinite;
}
.saving-spin.done { animation: none; border-color: var(--ok); position: relative; }
.saving-spin.done::after { content: '✔'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ok); font-size: 20px; font-weight: 800; }
.saving-spin.fail { animation: none; border-color: var(--danger); position: relative; }
.saving-spin.fail::after { content: '!'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--danger); font-size: 22px; font-weight: 800; }
@keyframes sipSpin { to { transform: rotate(360deg); } }
.saving-count { font-size: 16px; font-weight: 800; color: var(--maroon-darkest); }
.saving-bar { height: 9px; margin-bottom: 14px; }
.saving-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.saving-item {
    display: flex; gap: 10px; align-items: flex-start;
    border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 9px 11px; background: #fff;
}
.saving-item .si-ico { width: 22px; text-align: center; font-weight: 800; color: var(--muted); }
.saving-item .si-main { flex: 1; min-width: 0; }
.saving-item .si-text { font-size: 12.6px; font-weight: 600; }
.saving-item .si-note { font-size: 11px; color: var(--muted); }
.saving-item .si-state { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
.saving-item.run { border-color: var(--gold); background: #FFFDF7; }
.saving-item.run .si-ico { color: var(--gold-deep-2); }
.saving-item.ok { border-color: #CDE7D8; background: #FAFEFC; }
.saving-item.ok .si-ico, .saving-item.ok .si-state { color: var(--ok); }
.saving-item.fail { border-color: #F0C6C6; background: #FFF9F9; }
.saving-item.fail .si-ico, .saving-item.fail .si-state { color: var(--danger); }

/* ---------------------------------------------------------------- Unduh ZIP */
[data-zip-opt] { display: none; }
[data-zip-opt].on { display: block; }


/* ---------------------------------------------------------------- Crop foto profil */
.crop-wrap {
    position: relative; width: 360px; max-width: 100%; margin: 0 auto;
    border-radius: 14px; overflow: hidden; background: #14100F;
    border: 1px solid var(--line); touch-action: none; cursor: grab;
}
.crop-wrap:active { cursor: grabbing; }
.crop-wrap canvas { display: block; width: 100%; height: auto; }
.crop-mask {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0 49.2%, rgba(20,16,15,.62) 50%);
    border-radius: 14px;
}
.crop-mask::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 64%; height: 64%;
    transform: translate(-50%, -50%); border: 2px dashed rgba(255,255,255,.85); border-radius: 50%;
}
.crop-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; margin-top: 16px; align-items: end; }
.crop-control label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 5px; color: var(--ink-soft); }
.crop-control input[type=range] { width: 100%; accent-color: var(--maroon); }
.crop-preview { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: var(--shadow); background: var(--grad-gold); }
.crop-preview canvas { border-radius: 50%; }
@media (max-width: 560px) {
    .crop-controls { grid-template-columns: 1fr; }
}

/* ==========================================================================
   HALAMAN MODE MAINTENANCE (pemeliharaan sistem) — tampil untuk semua pengguna
   kecuali Super Admin saat tombol Maintenance dihidupkan.
   ========================================================================== */
.mt-body {
    margin: 0; min-height: 100vh; display: grid; place-items: center; overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(1200px 700px at 12% -8%, #4A0C12 0%, #2C0507 45%, #1A0304 100%);
    color: #FFF7EC; padding: 28px 18px; position: relative;
}
.mt-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.mt-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.mt-blob.b1 { width: 460px; height: 460px; left: -120px; top: -140px; background: #931A21; animation: mtApung 16s ease-in-out infinite; }
.mt-blob.b2 { width: 400px; height: 400px; right: -110px; bottom: -130px; background: #C68A2E; animation: mtApung 19s ease-in-out infinite reverse; }
.mt-blob.b3 { width: 300px; height: 300px; right: 22%; top: 8%; background: #E5B869; opacity: .32; animation: mtApung 22s ease-in-out infinite; }
@keyframes mtApung {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(24px, -26px, 0) scale(1.08); }
}

.mt-wrap { position: relative; z-index: 1; width: 100%; max-width: 620px; }
.mt-card {
    position: relative; text-align: center; padding: 34px 30px 26px; border-radius: 22px;
    background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .07));
    border: 1px solid rgba(255, 255, 255, .24);
    backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .22);
    animation: mtMasuk .7s cubic-bezier(.2, .9, .3, 1.1) both;
}
@keyframes mtMasuk { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }

.mt-badge {
    display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
    color: #2C0507; background: linear-gradient(135deg, #F2D272, #E5B869); border-radius: 999px; padding: 6px 14px;
    box-shadow: 0 6px 18px rgba(229, 184, 105, .35);
}
.mt-ikon { position: relative; display: grid; place-items: center; width: 108px; height: 108px; margin: 22px auto 6px; }
.mt-emoji { font-size: 46px; line-height: 1; animation: mtGoyang 2.6s ease-in-out infinite; }
@keyframes mtGoyang {
    0%, 100% { transform: rotate(-7deg) translateY(0); }
    50% { transform: rotate(7deg) translateY(-5px); }
}
.mt-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid rgba(242, 210, 114, .55); box-shadow: 0 0 0 0 rgba(229, 184, 105, .5);
    animation: mtDenyut 2.4s ease-out infinite;
}
.mt-ring::after {
    content: ''; position: absolute; inset: 12px; border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .28); animation: sipSpin 14s linear infinite;
}
@keyframes mtDenyut {
    0% { box-shadow: 0 0 0 0 rgba(229, 184, 105, .5); }
    70% { box-shadow: 0 0 0 26px rgba(229, 184, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 184, 105, 0); }
}

.mt-judul { margin: 10px 0 8px; font-size: 27px; font-weight: 800; letter-spacing: -.4px; color: #FFFDF7; }
.mt-sub { margin: 0 auto; max-width: 480px; font-size: 13.5px; line-height: 1.75; color: rgba(255, 247, 236, .82); }
.mt-pesan {
    margin: 16px auto 0; max-width: 480px; font-size: 13px; line-height: 1.7; padding: 11px 14px;
    border-radius: 12px; background: rgba(255, 255, 255, .12); border: 1px dashed rgba(242, 210, 114, .5); color: #FFEFCF;
}
.mt-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; margin: 20px 0 8px; }
.mt-info-item {
    background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px; padding: 11px 12px; text-align: left;
}
.mt-info-label { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: rgba(255, 247, 236, .6); font-weight: 700; }
.mt-info-val { font-size: 12.8px; font-weight: 650; margin-top: 3px; color: #FFF9EF; overflow-wrap: anywhere; }
.mt-bar { position: relative; height: 5px; border-radius: 999px; margin: 20px auto 14px; max-width: 420px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.mt-bar > span {
    position: absolute; inset: 0 60% 0 0; border-radius: 999px;
    background: linear-gradient(90deg, #E5B869, #F2D272, #931A21); animation: mtJalan 2.6s ease-in-out infinite;
}
@keyframes mtJalan { 0% { left: -40%; right: 100%; } 50% { left: 30%; right: 30%; } 100% { left: 100%; right: -40%; } }
.mt-note { font-size: 12px; line-height: 1.7; color: rgba(255, 247, 236, .72); }
.mt-note strong { color: #F2D272; }

.mt-tombol-admin {
    margin-top: 18px; width: 100%; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px;
    padding: 12px 16px; border-radius: 12px; color: #2C0507;
    background: linear-gradient(135deg, #F2D272, #E5B869); border: 0;
    box-shadow: 0 10px 24px rgba(229, 184, 105, .3); transition: transform .15s ease, box-shadow .2s ease;
}
.mt-tombol-admin:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(229, 184, 105, .4); }
.mt-admin { margin-top: 16px; text-align: left; animation: mtMasuk .35s ease both; }
.mt-admin-note {
    font-size: 12px; line-height: 1.65; color: #FFEFCF; background: rgba(147, 26, 33, .3);
    border: 1px solid rgba(242, 210, 114, .35); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px;
}
.mt-admin .field label { color: rgba(255, 247, 236, .85); font-size: 12px; font-weight: 650; }
.mt-admin .field input {
    width: 100%; margin-top: 5px; padding: 11px 13px; border-radius: 11px; font: inherit; color: #FFF9EF;
    background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .22);
}
.mt-admin .field input::placeholder { color: rgba(255, 247, 236, .4); }
.mt-admin .btn { background: linear-gradient(135deg, #931A21, #C0303A); border: 0; color: #FFF7EC; }
.mt-foot { margin-top: 20px; font-size: 11px; color: rgba(255, 247, 236, .5); }

@media (max-width: 520px) {
    .mt-card { padding: 26px 18px 20px; border-radius: 18px; }
    .mt-judul { font-size: 22px; }
    .mt-emoji { font-size: 38px; }
}

/* Banner penanda mode maintenance untuk Super Admin (di dalam aplikasi) */
.banner-maintenance {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: linear-gradient(135deg, #FFF4E0, #FFE9C7); border: 1px solid #E5B869;
    border-left: 6px solid #931A21; color: #5A3A08; border-radius: 12px;
    padding: 11px 14px; font-size: 12.5px; font-weight: 600; margin: 14px 0 0;
}
.banner-maintenance .badge.danger { background: #931A21; color: #fff; }

/* Versi aplikasi di dalam menu pengguna (berubah setiap revisi) */
.user-menu .menu-versi {
    margin-top: 8px; padding: 8px 10px; border-top: 1px solid var(--line-soft);
    font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.5;
}

/* Riwayat versi pada Pengaturan → Info Aplikasi */
.riwayat-versi { display: grid; gap: 12px; margin-top: 4px; }
.rv-item {
    border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; background: #FFFDF9;
}
.rv-item.rv-terbaru { border-color: var(--maroon-2); box-shadow: 0 6px 18px rgba(147, 26, 33, .08); background: linear-gradient(150deg, #FFFDF7, #FFF5E8); }
.rv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-versi { font-weight: 800; font-size: 14px; color: var(--maroon-2); }
.rv-tgl { font-size: 11px; color: var(--muted); }
.rv-judul { font-size: 12.5px; font-weight: 650; margin-top: 6px; }
.rv-poin { margin: 6px 0 0; padding-left: 20px; font-size: 12px; line-height: 1.75; color: #4A4550; }

/* ==========================================================================
   Tombol ✏️ ubah deskripsi (hero) halaman — HANYA dirender untuk Super Admin.
   Pengguna biasa tidak melihat tombol ini sama sekali.
   ========================================================================== */
.hero-sub .hero-edit, .hero .hero-edit {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; margin-left: 6px; padding: 0; cursor: pointer;
    font-size: 12px; line-height: 1; vertical-align: middle;
    border-radius: 8px; border: 1px dashed var(--gold-deep-2);
    background: linear-gradient(135deg, #FFFDF7, #FFF3E2); color: var(--maroon-2);
    transition: transform .15s ease, box-shadow .2s ease;
}
.hero-sub .hero-edit:hover, .hero .hero-edit:hover {
    transform: translateY(-1px) scale(1.06); box-shadow: 0 6px 14px rgba(147, 26, 33, .16);
}

/* ==========================================================================
   Pagination tabel (Rekap Perjalanan Dinas & Daftar Pemeriksaan)
   Tombol navigasi (Sebelumnya/Berikutnya) muncul di bawah tabel — HANYA bila
   jumlah baris melebihi 5; di bawah itu tabel tampil utuh tanpa tombol.
   ========================================================================== */
.table-pager {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    justify-content: flex-end; margin-top: 14px; padding-top: 12px;
    border-top: 1px dashed var(--line-soft);
}
.table-pager:empty { display: none; }
.table-pager .btn[disabled] { opacity: .45; cursor: not-allowed; }
.table-pager-info { font-size: 12px; color: var(--muted); margin-right: auto; }
.table-pager-info strong { color: var(--maroon-2); }

/* ==========================================================================
   Email penyimpanan Google Drive (panel Super Admin) + modal pilihan folder
   ========================================================================== */
.drive-akun .table-wrap { margin-top: 4px; }
.drive-akun .aksi-cell { display: flex; gap: 6px; }
.drive-folder-item {
    border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px;
    background: #FFFDF9; margin-bottom: 12px;
}
.drive-folder-item:last-child { margin-bottom: 0; }
#modal-drive-folder .inline-note { border-style: solid; }

/* Panduan blokir OAuth (tambah email penyimpanan baru) — panel Email Penyimpanan */
.akun-panduan {
    border: 1px solid var(--line); border-left: 5px solid var(--maroon-2);
    border-radius: var(--radius-sm); background: #FFFDF7; padding: 10px 14px;
}
.akun-panduan > summary {
    cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--maroon-2); line-height: 1.6;
}
.akun-panduan > summary::marker { color: var(--maroon-2); }
.akun-panduan[open] > summary { margin-bottom: 6px; border-bottom: 1px dashed var(--line-soft); padding-bottom: 8px; }
.akun-panduan code { background: #FFF3E2; padding: 1px 5px; border-radius: 6px; }
