/* ============================================================
   LPR - Garasi — Tema Modern VibeCoder
   ============================================================ */
:root {
    --ink: #1F1B3A;
    --muted: #635F82;
    --indigo: #4F46E5;
    --violet: #8B5CF6;
    --pink: #EC4899;
    --sky: #0EA5E9;
    --emerald: #10B981;
    --amber: #F59E0B;
    --rose: #F43F5E;
    --grad: linear-gradient(135deg, var(--indigo), var(--violet));
    --glass: rgba(255, 255, 255, 0.62);
    --glass-brd: rgba(255, 255, 255, 0.85);
    --line: rgba(99, 95, 130, 0.16);
    --radius: 16px;
    --shadow: 0 12px 34px rgba(79, 70, 229, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 500px at 8% -5%, rgba(139, 92, 246, 0.20), transparent 60%),
        radial-gradient(800px 520px at 100% 0%, rgba(236, 72, 153, 0.13), transparent 55%),
        radial-gradient(700px 600px at 55% 115%, rgba(79, 70, 229, 0.16), transparent 60%),
        radial-gradient(500px 400px at 90% 70%, rgba(14, 165, 233, 0.12), transparent 55%),
        #F3F0FF;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
}
.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
    display: flex;
    flex-direction: column;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-brd);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 20px 14px 16px;
    min-height: calc(100vh - 40px);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 8px 18px; }
.logo {
    width: 44px; height: 44px; border-radius: 13px;
    background: var(--grad);
    color: #fff; font-weight: 800; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
    letter-spacing: .5px;
}
.brand-t { font-weight: 800; font-size: 15.5px; line-height: 1.15; }
.brand-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.nav-group[open] { padding-bottom: 0; }
.nav-group-label {
    padding: 0;
    font-size: 10.5px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .9px;
    color: var(--muted);
}
.nav-group-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%;
    padding: 9px 12px 3px;
    background: none; border: none; cursor: pointer;
    font: inherit; text-align: left; color: inherit;
    border-radius: 10px;
    list-style: none;
    transition: background .15s;
}
.nav-group-toggle::-webkit-details-marker { display: none; }
.nav-group-toggle::marker { content: ''; display: none; }
.nav-group-toggle:hover { background: rgba(255, 255, 255, 0.55); }
.nav-chev {
    font-size: 11px; color: var(--muted);
    transition: transform .2s ease;
}
/* tertutup (native <details> tanpa [open]) → panah menghadap kanan */
.nav-group:not([open]) .nav-chev { transform: rotate(-90deg); }
.nav-group-body { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.nav-group:not([open]) .nav-group-body { display: none; }
.nav-item.nav-sub { padding-left: 20px; }
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10.5px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14px; font-weight: 600;
    transition: background .15s, transform .05s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.75); }
.nav-item.is-act {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.32);
}
.nav-ico { font-size: 17px; width: 22px; text-align: center; }
.side-foot {
    margin-top: auto; padding: 14px 10px 0;
    border-top: 1px solid var(--line);
    color: var(--muted); font-size: 11.5px; line-height: 1.5;
}

.main { min-width: 0; }
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-brd);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 14px 20px;
    margin-bottom: 20px;
}
.tb-title { font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.tb-title .crumb { color: var(--muted); }
.tb-title .sep { color: #c7c3e0; }
.tb-user { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tb-date { font-size: 13px; color: var(--muted); }
.chip-user { display: flex; align-items: center; gap: 10px; }
.ava {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}
.cu-txt { display: flex; flex-direction: column; line-height: 1.2; }
.cu-name { font-weight: 700; font-size: 13.5px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-role { font-size: 11px; color: var(--muted); }
.cu-role.is-admin { color: var(--violet); font-weight: 700; }

/* ---------- Page ---------- */
.page { display: flex; flex-direction: column; gap: 24px; padding-bottom: 30px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -0.3px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-brd);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-h h2 { margin: 0; font-size: 16.5px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.card-h .hint { font-size: 12.5px; color: var(--muted); }
.card-body { min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2-1 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1100px) { .grid-4, .grid-3, .grid-2, .grid-2-1 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2, .grid-2-1 { grid-template-columns: 1fr; } }

/* stat cards */
.stat {
    display: flex; flex-direction: column; gap: 6px;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-brd);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}
.stat .st-label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; display: flex; justify-content: space-between; align-items: center; }
.stat .st-num { font-size: 25px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; word-break: break-word; }
.stat .st-num.saldo-neg { color: var(--rose); }
.stat .st-num.saldo-pos { color: var(--emerald); }
.stat .st-num.saldo-nol { color: var(--ink); }
.stat .st-sub { font-size: 12px; color: var(--muted); }
.st-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: rgba(255,255,255,.8); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px;
    border-radius: 11px;
    font-size: 13.5px; font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    cursor: pointer;
    transition: filter .15s, transform .05s, box-shadow .15s;
    white-space: nowrap;
}
.btn:hover { filter: brightness(0.97); box-shadow: 0 6px 14px rgba(79,70,229,.14); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 8px 18px rgba(79,70,229,.32); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-danger { background: #FEE2E2; color: var(--rose); border: 1px solid rgba(244,63,94,.25); }
.btn-ghost { background: transparent; border: 1px dashed rgba(99,95,130,.4); color: var(--muted); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-logout { padding: 7px 12px; font-size: 12.5px; background: rgba(255,255,255,.7); }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 9px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.8);
    font-size: 14px; text-decoration: none; cursor: pointer;
    transition: all .15s;
}
.icon-btn:hover { background: var(--grad); color: #fff; border-color: transparent; }
.icon-btn.is-danger:hover { background: var(--rose); }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.tbl th {
    text-align: left; padding: 10px 12px;
    font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    color: var(--muted); font-weight: 800;
    border-bottom: 1.5px solid var(--line);
    background: rgba(255,255,255,.5);
    white-space: nowrap;
}
.tbl td { padding: 10.5px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.55); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .cnt { text-align: center; }
.tbl .acts { white-space: nowrap; display: flex; gap: 6px; }
.tbl tfoot td { font-weight: 800; border-top: 2px solid var(--line); background: rgba(139,92,246,.07); font-size: 14px; }
.mono-num { font-variant-numeric: tabular-nums; }

/* badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.b-ok   { background: #D1FAE5; color: #047857; }
.b-warn { background: #FEF3C7; color: #B45309; }
.b-danger { background: #FEE2E2; color: #BE123C; }
.b-info { background: #E0E7FF; color: #4338CA; }
.b-muted{ background: rgba(99,95,130,.12); color: var(--muted); }
.b-lunas{ background: #D1FAE5; color: #047857; }
.b-tempo{ background: #FEF3C7; color: #B45309; }

/* status kedaluarsa cell */
.st-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.st-ok::before { background: var(--emerald); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.st-warn::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.st-danger::before { background: var(--rose); box-shadow: 0 0 0 3px rgba(244,63,94,.18); }
.st-none::before { background: #c4c1d8; }
.st-ok { color: #047857; } .st-warn { color: #B45309; } .st-danger { color: #BE123C; } .st-none { color: var(--muted); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field > label .req { color: var(--rose); }
.field .help { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=email],
input[type=month], select, textarea {
    width: 100%;
    padding: 10px 13px;
    font: inherit; font-size: 14px;
    color: var(--ink);
    background: rgba(255,255,255,.78);
    border: 1.5px solid rgba(99,95,130,.22);
    border-radius: 11px;
    outline: none;
    transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
    background: #fff;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input[readonly] { background: rgba(99,95,130,.08); }
.field .preview { font-weight: 800; font-size: 17px; color: var(--indigo); min-height: 22px; }

.input-group { display: flex; align-items: center; }
.input-group .ig-pre {
    padding: 10px 12px; border-radius: 11px 0 0 11px;
    background: var(--grad); color: #fff;
    font-size: 13px; font-weight: 700;
    border: 1.5px solid transparent;
}
.input-group input { border-radius: 0 11px 11px 0; }
.rupiah-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* file upload bon */
.bon-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bon-thumb { max-width: 170px; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(79,70,229,.12); display: block; }
input[type=file] { font-size: 13px; }
input[type=file]::file-selector-button {
    font: inherit; font-weight: 700; border: none;
    background: var(--grad); color: #fff;
    padding: 8px 14px; border-radius: 9px; margin-right: 12px; cursor: pointer;
}
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--indigo); }

/* Work Order di dashboard: ikon berkedip */
@keyframes woBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .25; transform: scale(.85); }
}
.wo-blink { display: inline-block; animation: woBlink 1.15s infinite ease-in-out; }
.wo-card-head { display: flex; align-items: center; gap: 10px; }
.wo-row {
    display: flex; align-items: flex-start; gap: 13px;
    padding: 12px 2px; border-bottom: 1px dashed var(--line);
}
.wo-row:last-child { border-bottom: none; }
.wo-row .w-ico { flex: 0 0 auto; font-size: 21px; width: 40px; height: 40px; border-radius: 11px; background: #fff; box-shadow: 0 4px 10px rgba(79,70,229,.14); display: flex; align-items: center; justify-content: center; }
.wo-row .w-main { flex: 1; min-width: 0; }
.wo-row .w-t1 { font-weight: 800; font-size: 13.5px; line-height: 1.35; }
.wo-row .w-t2 { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.wo-row .w-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wo-remind { font-size: 12px; color: #B45309; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.wo-overdue { border-left: 3px solid var(--rose); padding-left: 12px; background: linear-gradient(90deg, rgba(244,63,94,.06), transparent); }
.perm-sep {
    margin-top: 6px; padding: 8px 2px 2px;
    font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
    color: var(--muted);
}
.radio-row { display: flex; gap: 20px; align-items: center; padding-top: 6px; }
.radio-row label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.radio-row input[type=radio] { width: 17px; height: 17px; accent-color: var(--indigo); }
.radio-mini { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.radio-mini label { display: inline-flex; gap: 3px; align-items: center; font-size: 12px; margin-right: 3px; cursor: pointer; font-weight: 600; }
.radio-mini input[type=radio] { width: 14px; height: 14px; accent-color: var(--indigo); margin: 0; }

/* checkbox hak akses menu */
.perm-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.perm-item {
    display: flex; align-items: center; gap: 9px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--line);
    padding: 9px 12px;
    border-radius: 11px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: border .15s, box-shadow .15s;
}
.perm-item:hover { border-color: rgba(79,70,229,.5); box-shadow: 0 3px 10px rgba(79,70,229,.1); }
.perm-item:has(input:checked) { border-color: var(--indigo); background: #EEF2FF; }
.perm-ico { font-size: 15px; }
.perm-group.is-off { opacity: .55; }
.perm-group.is-off .perm-item { pointer-events: none; background: rgba(99,95,130,.06); border-style: dashed; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; border: 1px solid transparent; }
.alert-ok   { background: #D1FAE5; color: #065F46; border-color: rgba(16,185,129,.3); }
.alert-err  { background: #FEE2E2; color: #9F1239; border-color: rgba(244,63,94,.3); }
.alert-info { background: #E0E7FF; color: #3730A3; border-color: rgba(79,70,229,.25); }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.toolbar .field { min-width: 140px; }
.toolbar .field.grow { flex: 1; min-width: 180px; }
.toolbar-spacer { flex: 1; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; }
.pg {
    min-width: 32px; height: 32px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; border: 1px solid var(--line);
    background: rgba(255,255,255,.85); color: var(--ink);
    font-size: 13px; font-weight: 700; text-decoration: none;
}
.pg:hover { background: #fff; box-shadow: 0 4px 10px rgba(79,70,229,.15); }
.pg.is-act { background: var(--grad); color: #fff; border-color: transparent; }
.pg.is-dis { opacity: .4; pointer-events: none; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.list-foot .info { font-size: 12.5px; color: var(--muted); }
.totalbar { display: flex; justify-content: flex-end; padding: 14px 18px; background: rgba(139,92,246,.08); border-radius: 12px; }
.totalbar .tt { font-weight: 800; font-size: 14.5px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.totalbar .tt .ttl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.totalbar .tt .val { font-size: 20px; }

/* ---------- Empty state ---------- */
.empty-state {
    padding: 42px 20px; text-align: center;
    color: var(--muted); font-size: 14px; font-weight: 600;
}
.empty-ico { font-size: 40px; margin-bottom: 10px; }

/* ---------- Modal ---------- */
.modal-veil {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(31, 27, 58, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-veil[hidden] { display: none; }
.modal-box {
    position: relative;
    max-width: 560px; width: 100%; max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 30px 70px rgba(31,27,58,.4);
    animation: pop .18s ease;
}
.modal-box.is-lg { max-width: 1200px; width: min(1200px, 100%); }
.modal-x {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 32px; height: 32px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; color: var(--muted);
    cursor: pointer; font-size: 13px;
}
.modal-x:hover { background: #FEE2E2; color: var(--rose); }
.modal-body { min-width: 0; }
.modal-body .modal-title { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.modal-body .modal-sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ringkasan (recap) */
.recap { display: flex; flex-direction: column; gap: 14px; }
.recap .rrow { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.recap .rrow:last-child { border-bottom: none; padding-bottom: 0; }
.recap .rrow b { text-align: right; font-variant-numeric: tabular-nums; }
.recap .rlabel { color: var(--muted); font-weight: 600; }
.recap .big { font-size: 20px; font-weight: 800; }
.recap .bon-wrap { text-align: center; background: #F6F4FF; border-radius: 14px; padding: 14px; }
.bon-img { max-width: 100%; max-height: 66vh; border-radius: 10px; box-shadow: 0 10px 26px rgba(31,27,58,.25); }

/* chart area */
.chart-box { position: relative; height: 320px; }
.chart-box.sm { height: 240px; }
.chart-wrap canvas { max-width: 100%; }

/* doc warning list */
.warn-list { display: flex; flex-direction: column; }
.warn-row {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 4px; border-bottom: 1px dashed var(--line);
    font-size: 13.5px;
}
.warn-row:last-child { border-bottom: none; }
.warn-row .w-ico { font-size: 20px; width: 34px; height: 34px; display:flex; align-items:center; justify-content:center; background:#fff; border-radius:10px; box-shadow:0 3px 8px rgba(79,70,229,.12); flex:0 0 auto;}
.warn-row .w-main { flex: 1; min-width: 0; }
.warn-row .w-t1 { font-weight: 800; font-size: 13px; }
.warn-row .w-t2 { font-size: 12px; color: var(--muted); }
.warn-row .w-date { text-align: right; font-weight: 700; font-size: 12.5px; white-space: nowrap; }

.login-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.login-card {
    width: 100%; max-width: 410px;
    background: var(--glass);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--glass-brd);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(79, 70, 229, 0.25);
    padding: 38px 34px 30px;
}
.login-card .logo-lg { display:flex; justify-content:center; margin-bottom: 14px; }
.login-card .logo-lg .logo { width: 62px; height: 62px; border-radius: 18px; font-size: 22px; }
.login-card h1 { text-align:center; font-size: 21px; margin: 0 0 3px; letter-spacing: -.3px; }
.login-card .lg-sub { text-align:center; color: var(--muted); font-size: 12.5px; margin-bottom: 24px; }
.login-card .field { margin-bottom: 15px; }
.login-card .form-actions { margin-top: 18px; }
.login-card .form-actions .btn { width: 100%; padding: 12px; font-size: 14.5px; }
.login-card .lg-foot { text-align:center; margin-top: 18px; color: var(--muted); font-size: 11.5px; }

/* nav mobile (chips) vs desktop */
.nav-desk { display: flex; }
.nav-mob { display: none; }
.nav-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-size: 13px; font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.nav-chip.is-act { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(79,70,229,.3); }

/* Baris atas dashboard */
.grid > * { min-width: 0; } /* cegah isi (mis. tabel) memaksa kolom melebar */
.list-scroll { max-height: 400px; overflow-y: auto; padding-right: 4px; }
.list-scroll::-webkit-scrollbar { width: 8px; }
.list-scroll::-webkit-scrollbar-thumb { background: rgba(99, 95, 130, .25); border-radius: 8px; }

/* Barcode tampil ukuran asli */
.barcode-full { background: #fff; border-radius: 12px; padding: 16px; overflow: auto; max-height: 78vh; text-align: center; }
.barcode-full img { width: auto; height: auto; max-width: none; }

@media (max-width: 1100px) {
}

@media (max-width: 920px) {
    .layout { grid-template-columns: 1fr; padding: 10px; gap: 12px; }
    .main { min-width: 0; }
    .sidebar {
        position: static; min-height: 0;
        padding: 12px; gap: 8px;
        flex-direction: column; align-items: stretch;
        border-radius: 16px;
    }
    .brand { padding: 2px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
    .brand-t { font-size: 15px; }
    .brand-s { display: none; }
    .nav-desk { display: none; }
    .nav-mob { display: flex; flex-direction: row; flex-wrap: wrap; gap: 7px; }
    .side-foot { display: none; }
    .tb-date { display: none; }
    .topbar { padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; }
    .tb-title { font-size: 13.5px; }
    .cu-name { max-width: 120px; }
    .page { gap: 14px; padding-bottom: 20px; }
    .page-head h1 { font-size: 19px; }
    .page-head .sub { font-size: 12.5px; }
    .card { padding: 16px; border-radius: 14px; }
    .card-h h2 { font-size: 15px; }
    .form-grid { gap: 12px; }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4, .grid-2-1, .form-grid { grid-template-columns: 1fr; }
    .stat { padding: 13px 15px; }
    .stat .st-num { font-size: 21px; }
    .tbl th, .tbl td { padding: 8px 9px; font-size: 12.5px; }
    .toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
    .toolbar .field, .toolbar .field.grow { min-width: 0; width: 100%; }
    .toolbar .field > label { font-size: 12px; }
    .toolbar .btn { width: 100%; }
    .head-actions { width: 100%; }
    .head-actions .btn { flex: 1 1 auto; justify-content: center; }
    input[type=text], input[type=password], input[type=date], input[type=number], input[type=email],
    input[type=month], select, textarea { font-size: 16px; } /* cegah zoom otomatis iOS */
    .form-actions .btn { flex: 1; justify-content: center; }
    .list-foot { flex-direction: column; align-items: flex-start; }
    .list-foot .pager { align-self: center; }
    .alert { font-size: 12.5px; padding: 10px 13px; }
    .totalbar { padding: 11px 13px; }
    .warn-row { gap: 10px; padding: 9px 2px; }
    .warn-row .w-t1 { font-size: 12.5px; }
    .login-body { padding: 14px; }
    .login-card { padding: 26px 20px 22px; border-radius: 20px; }
    .perm-box { grid-template-columns: 1fr 1fr; }
    .modal-veil { padding: 10px; align-items: flex-end; }
    .modal-box { padding: 20px 16px; border-radius: 18px 18px 0 0; max-height: 92vh; }
    .wo-row { flex-wrap: wrap; }
    .wo-row .w-acts { width: 100%; justify-content: flex-end; }
    .chart-box { height: 240px; }
    .page-head .head-actions { margin-top: 4px; }
}
@media (max-width: 400px) {
    .perm-box { grid-template-columns: 1fr; }
}
