/* =========================================================
   SimKendaraan - Mobile App Style (PWA)
   ========================================================= */
:root {
    --primary: #3068d8;
    --primary-dark: #2555b8;
    --primary-light: #eaf1fd;
    --green: #2e9e5b;
    --red: #d64545;
    --orange: #d97a2a;
    --gray: #70757d;
    --bg: #f4f5f7;
    --card-bg: #ffffff;
    --text: #23262b;
    --text-muted: #767b83;
    --border: #e8e9ec;
    --radius: 12px;
    --topbar-h: 56px;
    --bottomnav-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0; padding: 0;
    color: var(--text);
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
    -webkit-font-smoothing: antialiased;
    /* Matikan gestur double-tap-to-zoom & beri respons sentuh lebih cepat
       (pinch-zoom sendiri sudah dikunci lewat meta viewport + app.js). */
    touch-action: manipulation;
    /* Jaga picker native (tanggal/jam/dropdown) tetap bertema terang,
       supaya tidak berubah warna/kontras aneh saat HP dalam dark mode. */
    color-scheme: light;
}

/* Gradasi lembut di belakang seluruh halaman aplikasi (bukan login).
   Card tetap solid putih di atasnya supaya data/teks tetap sangat mudah
   dibaca — ini cuma aksen warna di area kosong sekitar card. */
body {
    background: linear-gradient(160deg, #eef3fc 0%, #f4f5f7 38%, #fbf2f2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------------- Icon system (monokrom, mengikuti warna teks) ---------------- */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
    stroke: currentColor;
}
.btn .icon, .list-item-actions .icon { margin-right: 2px; }

/* Logo aplikasi (gambar lambang, bukan ikon garis monokrom) */
.app-logo { display: block; width: 100%; height: 100%; object-fit: contain; }

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: transparent;
    position: relative;
    padding-bottom: calc(var(--bottomnav-h) + 12px);
}

/* ---------------- Topbar ---------------- */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.app-topbar-title {
    font-size: 16.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-topbar-icon {
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: #fff;
    border-radius: 7px;
    padding: 2px;
}
.app-topbar-actions { display: flex; gap: 8px; }
.icon-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 17px;
    background: rgba(255,255,255,0.14);
}
.icon-btn:active { background: rgba(255,255,255,0.26); }

/* ---------------- Content ---------------- */
.app-content {
    padding: 14px;
}

/* ---------------- Bottom Nav ---------------- */
.app-bottomnav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    height: var(--bottomnav-h);
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 11px;
}
.nav-item .nav-icon { font-size: 19px; }
.nav-item.active { color: var(--primary); font-weight: 500; }

/* ---------------- Cards ---------------- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.card-title {
    font-size: 14.5px;
    font-weight: 500;
    margin: 0 0 10px;
}

/* ---------------- Home hero (Beranda) ---------------- */
.home-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: 0 10px 24px rgba(48,104,216,0.28);
}
.home-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.home-hero-greeting { font-size: 15.5px; }
.home-hero-date { font-size: 12.5px; opacity: 0.82; margin-top: 3px; }
.home-hero-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}
.home-hero-sub { font-size: 13px; margin: 14px 0 0; opacity: 0.95; line-height: 1.4; }

/* ---------------- Quick actions (Beranda) ---------------- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: var(--text);
}
.quick-action-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
}
.quick-action-label { font-size: 11px; font-weight: 500; text-align: center; }

/* ---------------- Stats grid (dashboard) ---------------- */
.stat-icon-badge {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    margin-bottom: 8px;
}
.stat-icon-badge.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-badge.green { background: #e5f7ec; color: var(--green); }
.stat-icon-badge.orange { background: #fdf0e3; color: var(--orange); }
.stat-icon-badge.purple { background: #f1ecfd; color: #7c5cff; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.stat-card .stat-icon { font-size: 20px; margin-bottom: 6px; display: block; color: var(--text-muted); }
.stat-card .stat-value { font-size: 19px; font-weight: 500; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid var(--border); }
.btn-gray { background: var(--border); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.fab {
    position: fixed;
    bottom: calc(var(--bottomnav-h) + 16px);
    right: calc(50% - 240px + 16px);
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    font-weight: 400;
    box-shadow: 0 3px 8px rgba(48,104,216,0.32);
    z-index: 40;
}
.fab .icon { width: 22px; height: 22px; }
@media (max-width: 480px) {
    .fab { right: 16px; }
}

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 14px; min-width: 0; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}
.form-control, select.form-control, textarea.form-control {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    /* Min. 16px: di bawah ini Safari/iOS otomatis nge-zoom halaman saat
       input difokus, walau viewport sudah dikunci -- jadi ini bukan cuma
       soal keterbacaan, tapi juga bagian dari "anti-zoom". */
    font-size: 16px;
    color: var(--text);
    font-family: inherit;
    line-height: 1.3;
}
.form-control:focus { outline: none; border-color: var(--primary); }

/* form-row dua kolom (mis. Tanggal Berangkat/Kembali, Tanggal & Jenis
   Biaya, Odometer Awal/Akhir). Input tanggal/jam NATIVE bawaan browser
   HP (terutama Android -- beda-beda tiap merk/skin: Samsung, Xiaomi,
   dll) tidak bisa diseragamkan lebarnya lewat CSS, dan kalau dipaksa
   berdampingan di layar sempit hasilnya sering berantakan/terpotong
   walau sudah diberi min-width:0. Solusi yang pasti aman: di HP,
   form-row DITUMPUK jadi satu kolom penuh (setiap input dapat lebar
   penuh kartu) -- baru di layar besar (tablet/desktop, >=900px, sudah
   ada banyak ruang) ditampilkan berdampingan. */
.form-row { display: flex; flex-direction: column; gap: 14px; }
.form-row .form-group { flex: 1; min-width: 0; }
textarea.form-control { resize: vertical; min-height: 70px; }

/* Samakan tampilan dropdown (select) di semua HP/browser -- browser
   bawaan Android/iOS punya gaya panah & padding yang beda-beda, jadi
   kita pakai panah kustom sendiri supaya konsisten dengan desain app. */
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767b83' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
}

/* Samakan tampilan input tanggal/jam native, dan pastikan ikon kalender/
   jam bawaan browser tidak "menabrak" panah/padding di atas. */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    min-width: 0;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
    text-align: left;
}

/* ---------------- List items ---------------- */
.list-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.list-item-main { flex: 1; min-width: 0; }
.list-item-title { font-weight: 500; font-size: 14.5px; }
.list-item-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.list-item-value { font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.list-item-actions { display: flex; gap: 6px; }

/* ---------------- Badges ---------------- */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-gray { background: #e5e7eb; color: #4b5563; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }

/* ---------------- Alerts / Toast ---------------- */
.alert {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 14px;
}
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #dcfce7; color: #15803d; }
.alert-warning { background: #ffedd5; color: #9a3412; }
.toast {
    margin: 10px 14px 0;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
}
.toast-success { background: #dcfce7; color: #15803d; }
.toast-error { background: #fee2e2; color: #b91c1c; }

/* ---------------- Vehicle picker (grid kartu, bukan tab yang di-scroll) ---------------- */
.vehicle-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.vehicle-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
}
.vehicle-chip-icon { font-size: 18px; }
.vehicle-chip-label { font-size: 12px; font-weight: 500; line-height: 1.2; word-break: break-word; color: var(--text); }
.vehicle-chip-model { font-size: 10.5px; font-weight: 400; line-height: 1.2; color: var(--text-muted); word-break: break-word; }
.vehicle-chip.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.vehicle-chip.active .vehicle-chip-label { color: var(--primary); }
.vehicle-chip.active .vehicle-chip-model { color: var(--primary); opacity: 0.75; }

/* ---------------- Tabs / Segmented ---------------- */
.segmented {
    display: flex;
    background: #e9eaed;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 14px;
    overflow-x: auto;
}
.segmented a {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    color: var(--text-muted);
    white-space: nowrap;
}
.segmented a.active { background: #fff; color: var(--primary); }

/* ---------------- Empty state ---------------- */
.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 38px; margin-bottom: 10px; display: inline-block; color: #c3c7ce; }

/* ---------------- Section header ---------------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.section-header h2 { font-size: 14.5px; margin: 0; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.section-header h2 .icon { color: var(--text-muted); }
.section-header a { font-size: 12.5px; color: var(--primary); font-weight: 500; }

/* ---------------- Detail table ---------------- */
.detail-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.detail-table tr td { padding: 8px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.detail-table tr td:first-child { color: var(--text-muted); width: 42%; }
.detail-table tr:last-child td { border-bottom: none; }

/* ---------------- Auth page ----------------
   Tanpa "kotak" kartu — form langsung di atas foto latar,
   dibantu lapisan gradasi gelap (scrim) di bawah supaya teks
   tetap terbaca. Ganti assets/img/auth-bg.jpg dengan foto lain
   kapan saja (rasio potret, mis. 1200x2000) untuk mengganti latar.
------------------------------------------------- */
.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0b1224 url('../img/auth-bg.jpg') center center / cover no-repeat;
    position: relative;
}
.auth-body::before {
    /* scrim gelap dari bawah supaya form & teks tetap kontras di atas foto */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(6,10,26,0.15) 0%,
        rgba(6,10,26,0.20) 35%,
        rgba(6,10,26,0.55) 65%,
        rgba(6,10,26,0.88) 100%);
    z-index: 0;
}
.auth-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 28px 18px;
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 0 auto;
}
.auth-brand { text-align: center; padding-top: 6vh; }
.auth-logo {
    width: 84px; height: 84px;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    overflow: hidden;
    padding: 8px;
}
.auth-title { text-align: center; font-size: 24px; margin: 0 0 4px; font-weight: 500; color: #fff; letter-spacing: 0.2px; }
.auth-subtitle { text-align: center; font-size: 13.5px; color: rgba(255,255,255,0.72); margin: 0; }

.auth-form-area { padding-bottom: 6px; }
.auth-form { margin-top: 6px; }

/* Input tanpa kotak/border penuh — hanya garis bawah, transparan di atas foto */
.form-group-plain label {
    color: rgba(255,255,255,0.78);
    font-weight: 400;
}
.form-control-plain {
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 0;
    color: #fff;
    padding: 10px 2px;
}
.form-control-plain::placeholder { color: rgba(255,255,255,0.45); }
.form-control-plain:focus { border-bottom-color: #fff; }

.auth-submit {
    border-radius: 999px;
    margin-top: 6px;
    box-shadow: 0 8px 24px rgba(48,104,216,0.45);
}
.auth-hint { text-align: center; font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 18px; }
.auth-copyright { text-align: center; font-size: 11px; color: rgba(255,255,255,0.45); margin: 0; }

/* ---------------- Menu grid (halaman "Lainnya") ---------------- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.menu-tile {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px 6px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.menu-tile .menu-icon { font-size: 23px; display: block; margin-bottom: 8px; color: var(--primary); }
.menu-tile .menu-label { font-size: 12px; font-weight: 500; color: var(--text); }

/* =========================================================
   Desktop / Admin Panel Layout
   Di HP (layar < 900px): tampilan PWA (topbar + bottom nav).
   Di laptop/desktop (layar >= 900px): tampilan ala admin panel
   dengan sidebar menu di kiri.
   ========================================================= */

/* Sidebar disembunyikan secara default (mode HP) */
.app-sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: #ffffff;
    color: var(--text);
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid var(--border);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}
.sidebar-brand-icon { width: 26px; height: 26px; display: inline-flex; flex-shrink: 0; }
.sidebar-menu {
    flex: 1;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text-muted);
}
.sidebar-icon { font-size: 17px; width: 20px; text-align: center; }
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
}
.sidebar-user { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
}
.sidebar-logout:hover { background: var(--border); color: var(--text); }

@media (min-width: 900px) {
    .app-sidebar { display: flex; }

    .app-shell {
        max-width: none;
        margin-left: 240px;
        padding-bottom: 0;
        min-height: 100vh;
    }

    /* Bottom nav ala Android tidak relevan lagi di desktop */
    .app-bottomnav { display: none; }

    /* Topbar tetap ada tapi berperan sebagai header halaman ala admin panel */
    .app-topbar {
        padding: 0 28px;
        height: 60px;
        background: #fff;
        color: var(--text);
        box-shadow: 0 1px 0 var(--border);
    }
    .app-topbar-title { font-size: 17px; font-weight: 500; }
    .app-topbar-icon { display: none; }
    .app-topbar .icon-btn { background: var(--bg); color: var(--text-muted); }
    .app-topbar .icon-btn:active { background: var(--border); }

    .app-content {
        max-width: 1100px;
        margin: 0 auto;
        padding: 28px;
        width: 100%;
    }

    /* Statistik & grid menu tampil lebih lega di layar lebar */
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .menu-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }

    .card, .list-item, .stat-card, .menu-tile { border-radius: 10px; }

    /* Tombol tambah (+) mengambang menyesuaikan posisi karena tidak ada bottom nav */
    .fab {
        bottom: 32px;
        right: 32px;
        box-shadow: 0 4px 12px rgba(48,104,216,0.3);
    }

    /* Layar lebar (tablet/desktop): baru di sini form-row berdampingan
       2 kolom -- ruangnya sudah cukup lega untuk input tanggal/jam native. */
    .form-row { flex-direction: row; gap: 16px; }

    /* Auth (login) tetap center seperti biasa, tidak perlu diubah */
}

/* Layar sangat lebar (>=1280px): beri sedikit lagi ruang & kolom */
@media (min-width: 1280px) {
    .app-content { max-width: 1200px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.w-100 { width: 100%; }

/* =========================================================
   Menu Laporan
   ========================================================= */
.report-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}
.report-filter-form .form-group { margin-bottom: 0; flex: 1 1 140px; min-width: 130px; }
.report-filter-form .form-group label { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.report-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }

.report-print-head, .report-print-foot { display: none; }

.report-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.report-table th, .report-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.report-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); font-weight: 700; background: #f7f9fc; white-space: nowrap; }
.report-table td.num, .report-table th.num { text-align: right; }
.report-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: none; background: #f7f9fc; }
.report-table tbody tr:hover { background: #fafbfe; }

.report-hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.report-hub-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 14px;
    text-decoration: none;
    color: var(--text);
}
.report-hub-card .report-hub-icon { color: var(--primary); margin-bottom: 8px; display: block; }
.report-hub-card .report-hub-title { font-size: 13.5px; font-weight: 600; margin: 0 0 3px; }
.report-hub-card .report-hub-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

@media (min-width: 900px) {
    .report-hub-grid { grid-template-columns: repeat(3, 1fr); }
}

@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .app-sidebar, .app-topbar, .app-bottomnav, .no-print, .fab, .toast { display: none !important; }
    .app-shell, .app-content { margin: 0 !important; padding: 0 !important; max-width: 100% !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; border: 1px solid #e5e9f0 !important; }

    /* Kop surat laporan: logo bulat + nama perusahaan, lalu judul laporan
       dengan garis bawah tebal warna brand -- supaya hasil cetak terasa
       seperti dokumen resmi, bukan sekadar screenshot tabel di layar. */
    .report-print-head { display: block !important; margin-bottom: 16px; }
    .report-print-letterhead {
        display: flex;
        align-items: center;
        gap: 12px;
        background: #204d9e;
        color: #fff;
        padding: 14px 18px;
        border-radius: 10px;
        margin-bottom: 14px;
    }
    .report-print-logo {
        flex: 0 0 auto;
        width: 40px; height: 40px;
        border-radius: 50%;
        background: rgba(255,255,255,0.18);
        border: 1.5px solid rgba(255,255,255,0.6);
        display: flex; align-items: center; justify-content: center;
        font-weight: 800; font-size: 14px; color: #fff;
    }
    .report-print-company { font-size: 15px; font-weight: 800; margin: 0; color: #fff; }
    .report-print-contact { font-size: 10px; margin: 2px 0 0; color: #dbe6fb; }
    .report-print-titlebar {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        padding-bottom: 8px;
        border-bottom: 2px solid #204d9e;
    }
    .report-print-titlebar h1 { font-size: 16px; margin: 0; color: #1c2333; }
    .report-print-titlebar p { font-size: 11px; color: #6b7280; margin: 0; white-space: nowrap; }

    /* Ringkasan angka jadi satu baris kompak, bukan kartu grid besar */
    .stats-grid { display: flex !important; gap: 10px; margin: 14px 0 !important; }
    .stat-card { flex: 1; border: 1px solid #e5e9f0 !important; box-shadow: none !important; padding: 8px 10px !important; }
    .stat-card .stat-icon { display: none !important; }
    .stat-card .stat-value { font-size: 14px !important; }
    .stat-card .stat-label { font-size: 9px !important; }

    .section-header { margin-top: 14px !important; }

    /* Tabel: header berulang tiap halaman, baris tidak terpotong, warna
       header & garis dipertegas supaya tetap jelas di atas kertas. */
    .report-table-wrap { overflow: visible !important; }
    .report-table { font-size: 10px; width: 100% !important; table-layout: auto; white-space: normal; }
    .report-table th, .report-table td { padding: 5px 6px; white-space: normal; word-break: break-word; }
    .report-table th { white-space: nowrap; }
    .report-table .badge { white-space: nowrap; display: inline-block; }
    .report-table thead { display: table-header-group; }
    .report-table tr { page-break-inside: avoid; }
    .report-table th { background: #eaf1fd !important; color: #204d9e !important; border-bottom: 1.5px solid #c7d7f5 !important; }
    .report-table th, .report-table td { border-color: #d8dde6 !important; }
    .report-table tbody tr:nth-child(even) { background: #f7f9fc !important; }
    .report-table tfoot td { background: #eaf1fd !important; color: #204d9e !important; }
    .badge { border: 1px solid rgba(0,0,0,0.08); }

    .report-print-foot {
        display: block !important;
        margin-top: 18px;
        font-size: 9.5px;
        color: #888;
        text-align: center;
        border-top: 1px dashed #ddd;
        padding-top: 8px;
    }

    @page { margin: 1.2cm; }
}

/* ===== Grafik dashboard (SKCharts) ===== */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 4px;
}
@media (min-width: 700px) {
    .charts-grid { grid-template-columns: 1fr 1fr; }
}
.chart-card { position: relative; }
.chart-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.chart-mount { position: relative; width: 100%; }
.sk-chart-bar { transition: opacity 0.12s ease; }
.sk-chart-bar.is-active { opacity: 0.8; }
.sk-chart-hit { cursor: pointer; }
.sk-chart-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    background: var(--text);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 9px;
    border-radius: 6px;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    opacity: 0;
    transition: opacity 0.1s ease;
}
.sk-chart-tooltip.is-visible { opacity: 1; }
.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    color: var(--text-muted);
    font-size: 12.5px;
    text-align: center;
}