/* ==========================================================================
   Arsip Invoice — PT. Mahkota Pamaton Jaya
   Warna dari logo: Merah #ED1C24, Navy #2E3192, Putih
   ========================================================================== */
:root {
    --red: #ED1C24;
    --red-600: #C8141B;
    --red-50: #FDECEC;
    --navy: #2E3192;
    --navy-700: #23266F;
    --navy-900: #171A4D;
    --navy-50: #ECEDF8;
    --ink: #1B1D33;
    --muted: #6B6F80;
    --line: #E3E5EE;
    --bg: #F5F6FA;
    --white: #fff;
    --green: #0F8A5F;
    --green-50: #E6F5EF;
    --amber: #B7791F;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(23, 26, 77, .06), 0 4px 16px rgba(23, 26, 77, .06);
    --sidebar: 264px;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar); flex: none; position: fixed; inset: 0 auto 0 0; z-index: 40;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%);
    color: #fff; display: flex; flex-direction: column;
    transition: transform .2s ease;
}
.sidebar::after { /* garis merah khas logo */
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 4px; background: var(--red);
}
.brand { padding: 20px 18px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-logo { width: 52px; height: 52px; background: #fff; border-radius: 12px; display: grid; place-items: center; padding: 5px; flex: none; }
.brand-logo img { width: 100%; height: auto; }
.brand-text strong { display: block; font-size: 13px; letter-spacing: .02em; }
.brand-text span { display: block; font-size: 11.5px; color: rgba(255,255,255,.65); }

.nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); padding: 14px 10px 6px; }
.nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
    color: rgba(255,255,255,.82); font-weight: 500; margin-bottom: 2px; position: relative;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: #fff; color: var(--navy); font-weight: 700; }
.nav a.active .co-badge { background: var(--red); color: #fff; }
.co-badge {
    width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none;
    background: rgba(255,255,255,.12); font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
}
.co-name { line-height: 1.25; font-size: 13px; }
.co-name small { display: block; font-size: 10.5px; font-weight: 500; opacity: .7; }
.nav a .tag-main { font-size: 9px; font-weight: 800; background: var(--red); color: #fff; padding: 1px 6px; border-radius: 99px; letter-spacing: .04em; }

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.me { display: flex; align-items: center; gap: 10px; color: #fff; padding: 6px; border-radius: 10px; }
.me:hover { background: rgba(255,255,255,.08); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.me-info { flex: 1; min-width: 0; line-height: 1.25; }
.me-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-info span { font-size: 11px; color: rgba(255,255,255,.6); }
.logout-btn { background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; padding: 8px; border-radius: 8px; }
.logout-btn:hover { background: rgba(237,28,36,.25); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center;
    padding: 0 28px; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; font-weight: 700; }
.crumb { font-size: 12px; color: var(--muted); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px; cursor: pointer; color: var(--ink); }
.content { padding: 24px 28px 48px; flex: 1; }
.backdrop { display: none; }

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15,17,40,.45); z-index: 30; }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .topbar, .content { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Components ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-body { padding: 20px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
    border-radius: 9px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 13px;
    cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-600); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-danger-ghost { background: #fff; border-color: #F5C2C4; color: var(--red-600); }
.btn-danger-ghost:hover { background: var(--red-50); color: var(--red-600); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.btn-excel { background: #fff; border-color: #BFE3D3; color: var(--green); }
.btn-excel:hover { background: var(--green-50); color: var(--green); }
.btn-pdf { background: #fff; border-color: #F5C2C4; color: var(--red-600); }
.btn-pdf:hover { background: var(--red-50); color: var(--red-600); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
    width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
    font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; }
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(46,49,146,.12); }
.input.is-invalid { border-color: var(--red); }
.err { color: var(--red-600); font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 13px; }
.input-prefix .input { padding-left: 38px; }
.input-sm { height: 34px; font-size: 13px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.alert-success { background: var(--green-50); color: #0B6B4A; border: 1px solid #BFE3D3; }
.alert-error { background: var(--red-50); color: var(--red-600); border: 1px solid #F5C2C4; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--navy-50); color: var(--navy); white-space: nowrap; }
.badge-muted { background: #F0F1F5; color: var(--muted); }
.badge-red { background: var(--red-50); color: var(--red-600); }
.badge-green { background: var(--green-50); color: var(--green); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 2px; letter-spacing: -.02em; }
.stat .v.red { color: var(--red); }
.stat .v.navy { color: var(--navy); }

.co-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.co-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy); }
.co-card.primary::before { background: var(--red); }
.co-card-top { display: flex; align-items: center; gap: 12px; }
.co-card .co-badge { background: var(--navy); color: #fff; width: 42px; height: 42px; border-radius: 10px; font-size: 13px; }
.co-card.primary .co-badge { background: var(--red); }
.co-card h3 { font-size: 15.5px; }
.co-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-metrics div { background: var(--bg); border-radius: 9px; padding: 10px 12px; }
.co-metrics .k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.co-metrics .v { font-weight: 800; font-size: 15px; }

/* ---------- Toolbar & filter ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.toolbar .left, .toolbar .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { position: relative; min-width: 260px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 36px; height: 38px; }
.filters { display: none; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #FAFBFD; }
.filters.show { display: block; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--navy-50); color: var(--navy); border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 12px; font-weight: 600; }
.chip a { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--navy); }
.chip a:hover { background: var(--navy); color: #fff; }
.count-dot { background: var(--red); color: #fff; border-radius: 99px; font-size: 10.5px; padding: 0 6px; line-height: 17px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
    text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
    padding: 11px 14px; background: #FAFBFD; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl th a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.tbl th a:hover, .tbl th a.sorted { color: var(--navy); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:hover { background: #FAFBFF; }
.tbl tfoot td { background: var(--red-50); font-weight: 800; color: var(--red-600); border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.barang { max-width: 320px; }
.barang .line-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-txt { font-size: 12px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.file-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.ft { font-size: 9.5px; font-weight: 800; padding: 2px 5px; border-radius: 4px; color: #fff; background: var(--navy); letter-spacing: .03em; }
.ft.pdf { background: var(--red); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .icon { width: 42px; height: 42px; color: #C5C8D6; margin-bottom: 8px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }

.pagination { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12.5px; color: var(--ink); }
.pagination a:hover { border-color: var(--navy); color: var(--navy); }
.pagination .active span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination .disabled span { color: #C5C8D6; }

/* ---------- Upload ---------- */
.drop {
    border: 2px dashed #CDD0E0; border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; background: #FAFBFD;
    transition: border-color .15s, background .15s; position: relative;
}
.drop:hover, .drop.drag { border-color: var(--navy); background: var(--navy-50); }
.drop.is-invalid { border-color: var(--red); background: var(--red-50); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .icon { width: 34px; height: 34px; color: var(--navy); }
.drop strong { display: block; margin-top: 6px; }
.drop-file { display: none; align-items: center; gap: 10px; text-align: left; }
.drop.has-file .drop-empty { display: none; }
.drop.has-file .drop-file { display: flex; }
.drop-file img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } }
.preview { background: #2B2D42; border-radius: 0 0 var(--radius) var(--radius); min-height: 560px; display: grid; place-items: center; }
.preview iframe { width: 100%; height: 75vh; border: 0; border-radius: 0 0 var(--radius) var(--radius); background: #fff; }
.preview img { max-width: 100%; max-height: 75vh; display: block; }
dl.meta { margin: 0; display: grid; grid-template-columns: 130px 1fr; }
dl.meta dt, dl.meta dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; }
dl.meta dt { color: var(--muted); font-weight: 600; font-size: 12.5px; }
dl.meta dd { font-weight: 500; white-space: pre-line; }
.price-big { font-size: 24px; font-weight: 800; color: var(--red); letter-spacing: -.02em; }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15,17,40,.5); }
.dlg-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.dlg-head h3 { font-size: 15px; }
.dlg-body { padding: 20px; display: grid; gap: 14px; }
.dlg-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #FAFBFD; border-radius: 0 0 14px 14px; }
.switch { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-art {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color: #fff; padding: 48px; display: flex; flex-direction: column;
    justify-content: space-between; position: relative; overflow: hidden;
}
.login-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--red); right: -180px; bottom: -200px; opacity: .95; }
.login-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--red); }
.login-art > * { position: relative; z-index: 1; }
.login-art h2 { font-size: 34px; font-weight: 800; max-width: 420px; letter-spacing: -.02em; }
.login-art p { color: rgba(255,255,255,.75); max-width: 400px; }
.login-co { display: flex; gap: 10px; flex-wrap: wrap; }
.login-co span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.login-form { display: grid; place-items: center; padding: 32px; background: #fff; }
.login-box { width: min(380px, 100%); }
.login-box .logo { width: 110px; margin-bottom: 18px; }
.login-box h1 { font-size: 24px; font-weight: 800; }
@media (max-width: 860px) { .login-page { grid-template-columns: 1fr; } .login-art { display: none; } }

.mb-0 { margin-bottom: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mb-3 { margin-bottom: 16px; }
.flex { display: flex; } .gap-2 { gap: 8px; } .items-center { align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.input.input-sm, select.input.input-sm { height: 34px; font-size: 13px; }
.topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .topbar h1 { font-size: 15px; } .topbar .btn { padding: 0 11px; } .search { min-width: 0; flex: 1; } }

/* ---------- Revisi: grup dropdown ---------- */
.grup-new { display: flex; gap: 8px; margin-top: 8px; }
.grup-new .input { flex: 1; min-width: 0; }
.grup-new .btn { height: 40px; }

/* ---------- Revisi: form footer ---------- */
.form-foot { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.form-foot-btns { display: flex; gap: 8px; flex-direction: row-reverse; }

/* ---------- Revisi: mobile ---------- */
.break { white-space: nowrap; }
img, svg, input, select, textarea { max-width: 100%; }
.field, .grid > * { min-width: 0; }

@media (max-width: 720px) {
    .hide-m { display: none !important; }
    .content { padding-top: 16px; }
    .stats { grid-template-columns: 1fr; gap: 8px; }
    .stat { padding: 11px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 12px; }
    .stat .v { font-size: 17px; margin: 0; }
    .stat .hint { flex-basis: 100%; }
    .card-head, .card-body, .filters, .chips, .table-foot { padding-left: 14px; padding-right: 14px; }
    .card-body { padding-top: 16px; padding-bottom: 16px; }

    /* toolbar daftar invoice */
    .inv-toolbar, .inv-toolbar .left, .inv-toolbar .right { width: 100%; }
    .inv-toolbar .left { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .inv-toolbar .search { grid-column: 1 / -1; min-width: 0; }
    .inv-toolbar .right { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .inv-toolbar .right .btn { height: 38px; }
    .filters-grid { grid-template-columns: 1fr 1fr; }
    .filters-grid > .flex { grid-column: 1 / -1; }
    .filters-grid > .flex .btn { flex: 1; }
    .table-foot { justify-content: center; }

    /* form */
    .form-foot { flex-direction: column; align-items: stretch; gap: 10px; }
    .form-foot > .hint { text-align: center; }
    .form-foot-btns { flex-direction: column; }
    .form-foot .form-foot-btns .btn { width: 100%; height: 44px; flex: none; }
    .drop { padding: 18px 12px; }

    /* detail */
    .preview { min-height: 300px; }
    .preview iframe { height: 60vh; }
    dl.meta { grid-template-columns: 100px 1fr; }
    dl.meta dd { word-break: break-word; }
    .card-head h2 { max-width: 100% !important; }

    /* dialog */
    .dlg-foot .btn { flex: 1; }

    /* ===== tabel -> kartu ===== */
    .tbl-inv, .tbl-dash, .tbl-stack { display: block; }
    .tbl-inv thead, .tbl-dash thead, .tbl-stack thead { display: none; }
    .tbl-inv tbody, .tbl-dash tbody, .tbl-stack tbody, .tbl-inv tfoot { display: block; }
    .table-wrap:has(.tbl-inv), .table-wrap:has(.tbl-dash), .table-wrap:has(.tbl-stack) { overflow: visible; }
    .tbl-inv tr, .tbl-dash tr, .tbl-stack tr { display: block; border-bottom: 1px solid var(--line); padding: 12px 14px; }
    .tbl-inv tbody tr:hover, .tbl-dash tbody tr:hover { background: none; }
    .tbl-inv td, .tbl-dash td, .tbl-stack td { display: block; border: 0; padding: 0; text-align: left; }
    .tbl-inv .barang, .tbl-dash .barang { max-width: none; }

    .tbl-inv tbody tr:not(.empty-row), .tbl-dash tbody tr:not(.empty-row) {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px;
    }
    .tbl-inv .c-no { display: none; }
    .tbl-inv .c-tgl, .tbl-dash .c-tgl { grid-column: 1; grid-row: 1; font-size: 12px; color: var(--muted); align-self: center; }
    .tbl-inv .c-harga, .tbl-dash .c-harga { grid-column: 2; grid-row: 1; text-align: right; color: var(--red); font-size: 15px; }
    .tbl-inv .c-toko, .tbl-dash .c-toko { grid-column: 1 / -1; font-size: 14.5px; }
    .tbl-inv .c-grup { grid-column: 1 / -1; }
    .tbl-inv .c-barang, .tbl-dash .c-barang { grid-column: 1 / -1; color: #3A3D55; }
    .tbl-inv .c-file, .tbl-dash .c-co { grid-column: 1; align-self: center; margin-top: 4px; order: 10; }
    .tbl-dash .c-aksi, .tbl-inv .c-aksi { order: 11; }
    .tbl-inv .c-aksi, .tbl-dash .c-aksi { grid-column: 2; margin-top: 4px; }
    .tbl-inv .c-file .file-link { height: 32px; }

    .tbl-inv .empty-row td, .tbl-dash .empty-row td { padding: 0; }
    .empty-row { padding: 0 !important; }
    .tbl-inv tfoot tr { display: flex !important; justify-content: space-between; gap: 10px; background: var(--red-50); padding: 12px 14px; }
    .tbl-inv tfoot td { background: none; font-size: 12.5px; }
    .tbl-inv tfoot td.r:first-child { text-align: left; }

    /* tabel user */
    .tbl-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; column-gap: 10px; }
    .tbl-stack .c-head { grid-column: 1; grid-row: 1; }
    .tbl-stack .c-aksi { grid-column: 2; grid-row: 1; }
    .tbl-stack td[data-label] { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
    .tbl-stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 12px; flex: none; }
    .tbl-stack td.break { white-space: normal; word-break: break-all; text-align: right; }
}

@media (max-width: 420px) {
    .topbar { gap: 10px; }
    .topbar > .btn-ghost .btn-text { display: none; }
    .topbar > .btn-ghost { width: 40px; padding: 0; }
    .topbar .btn-primary { padding: 0 12px; }
    .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .co-card-top { flex-wrap: wrap; }
    .co-metrics { grid-template-columns: 1fr; }
    .filters-grid { grid-template-columns: 1fr; }
}

/* ---------- Verifikasi email ---------- */
.verify-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); }
.verify-card { width: min(420px, 100%); padding: 32px 28px; text-align: center; border-top: 5px solid var(--red); }
.verify-card h1 { font-size: 21px; margin-top: 4px; }
.verify-card p { margin: 10px 0 22px; }
.verify-logo { width: 84px; margin-bottom: 14px; }
.verify-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; }
.verify-icon .icon { width: 28px; height: 28px; stroke-width: 2.5; }
.verify-icon.ok { background: var(--green-50); color: var(--green); }
.verify-icon.fail { background: var(--red-50); color: var(--red); }
.alert-info { background: var(--navy-50); color: var(--navy); border: 1px solid #CFD1EE; }
.badge-amber { background: #FDF3E1; color: var(--amber); }
.resend-box { margin-top: 14px; padding: 12px; border: 1px dashed #CFD1EE; border-radius: 10px; background: #FAFBFF; text-align: center; }
