/* ============================================================
   Pengadaan FMIPA UNS — tampilan standar aplikasi MIPA
   Gaya "Lembut Hangat" (eip-contracts ADR 0012):
   Manrope, latar mint, kartu putih mengambang, aksen oranye.
   ============================================================ */

:root {
    --page: #eef4f3;
    --card: #ffffff;
    --stripe: #f6faf9;
    --text: #1f2a33;
    --muted: #5f6b75;
    --line: #d6e0e3;
    --line-soft: #e7eeef;

    --blue: #2f6690;
    --blue-600: #24557a;
    --blue-700: #1f4664;
    --blue-50: #eef4f9;
    --green: #3a8f7b;
    --green-50: #eef8f4;
    --green-700: #1d6145;
    --orange: #d9773a;
    --orange-600: #b5651d;
    --orange-50: #fdf5ee;
    --red: #c4574a;
    --red-50: #fdf2f1;
    --red-700: #9b2c22;
    --dark: #1f3b4d;
    --nav-active: #e3eef6;
    --nav-active-text: #24557a;

    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 9px;
    --shadow: 0 1px 2px rgba(20, 50, 60, 0.05), 0 6px 20px rgba(20, 50, 60, 0.05);
    --shadow-hover: 0 10px 28px rgba(20, 50, 60, 0.11);
    --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); }
img { max-width: 100%; }
svg { display: block; }
:focus-visible {
    outline: 3px solid rgba(47, 102, 144, 0.35);
    outline-offset: 2px;
    border-radius: 6px;
}
::selection { background: #cfe2f1; color: var(--dark); }

.skip-link {
    position: absolute;
    left: 12px;
    top: -80px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--dark);
    color: #fff;
    font-weight: 700;
    transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ============================================================
   Kerangka aplikasi
   ============================================================ */

.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-overlay { display: none; }

.app-shell {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 240px;
    flex: 0 0 240px;
    height: calc(100vh - 32px);
    padding: 18px;
    overflow-y: auto;
    background: var(--card);
    border-radius: 22px;
    box-shadow: var(--shadow);
    scrollbar-width: thin;
    scrollbar-color: rgba(141, 157, 165, 0.45) transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(141, 157, 165, 0.45); border-radius: 999px; }

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 13px;
    background: var(--orange);
    color: #fff;
    box-shadow: 0 5px 14px rgba(217, 119, 58, 0.28);
}
.brand__mark svg { width: 21px; height: 21px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__text strong { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.brand__text small { margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }

.sidebar__close { display: none; }

.nav { display: flex; flex-direction: column; gap: 17px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
    margin: 0 0 4px;
    padding: 0 10px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8d9da5;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 11px;
    color: #3f4b54;
    font-size: 13.5px;
    font-weight: 650;
    transition: background 0.16s ease, color 0.16s ease;
}
.nav-link svg { width: 18px; height: 18px; flex: 0 0 18px; color: #7b8b94; transition: color 0.16s ease; }
.nav-link:hover { background: #f3f7f6; color: var(--dark); }
.nav-link:hover svg { color: var(--blue); }
.nav-link.is-active { background: var(--nav-active); color: var(--nav-active-text); font-weight: 800; }
.nav-link.is-active svg { color: var(--blue); }
.nav-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--orange);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.sidebar__foot { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.user-card { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.avatar--sm { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 12px; }
.user-card__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-card__text strong { font-size: 12.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card__text small { margin-top: 1px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ============================================================
   Bilah atas
   ============================================================ */

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 4px;
}
.topbar__text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.topbar__greet { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.topbar__date { font-size: 14px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.menu-btn {
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
    background: var(--card);
    color: var(--dark);
    box-shadow: var(--shadow);
    cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn:hover { color: var(--blue); }

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 13px;
    border-radius: 12px;
    background: var(--card);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(20, 50, 60, 0.04);
    transition: color 0.15s ease, background 0.15s ease;
}
.topbar-link svg { width: 15px; height: 15px; }
.topbar-link:hover { background: #fff; color: var(--blue); }

.pop { position: relative; }
.pop > summary { list-style: none; cursor: pointer; }
.pop > summary::-webkit-details-marker { display: none; }
.account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 10px 0 5px;
    border-radius: 13px;
    background: var(--card);
    box-shadow: 0 1px 2px rgba(20, 50, 60, 0.04);
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text);
}
.account-btn .avatar { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; font-size: 12px; }
.pop-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    width: 300px;
    max-width: calc(100vw - 32px);
    padding: 16px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 20px 48px rgba(20, 50, 60, 0.2);
}
.pop-panel__head { display: flex; align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.pop-panel__head strong { display: block; font-size: 14px; font-weight: 800; }
.pop-panel__head span { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pop-panel__meta { display: flex; flex-direction: column; gap: 7px; padding: 12px 0; font-size: 12.5px; margin: 0; }
.pop-panel__meta div { display: flex; justify-content: space-between; gap: 14px; }
.pop-panel__meta dt { color: var(--muted); }
.pop-panel__meta dd { margin: 0; font-weight: 700; text-align: right; }
.pop-panel__actions { display: flex; flex-direction: column; gap: 6px; }

/* Tombol & panel "Aplikasi" — disamakan dengan EIP Core & STRAP. */
.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border-radius: 16px;
    background: #1f3b4d;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.app-btn svg { width: 16px; height: 16px; }
.app-btn:hover { background: #1e293b; }
.pop-panel.app-panel { width: 440px; padding: 16px; border-radius: 24px; }
.app-panel__head { display: flex; flex-direction: column; padding: 0 4px 12px; }
.app-panel__head strong { font-size: 15px; font-weight: 800; color: #0f172a; }
.app-panel__head span { font-size: 12px; color: #64748b; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.app-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; color: #0f172a; text-decoration: none; }
.app-item:hover { background: #f8fafc; }
.app-item.is-kini { background: #f1f5f9; }
.app-item__ikon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 16px; color: #fff; display: flex; align-items: center; justify-content: center; }
.app-item__ikon svg { width: 18px; height: 18px; }
.app-item__teks { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.app-item__teks strong { font-size: 14px; font-weight: 700; }
.app-item__teks span { font-size: 12px; color: #64748b; }
@media (max-width: 680px) {
    .pop-panel.app-panel { width: auto; }
}
@media (max-width: 640px) {
    .app-btn { padding: 0 13px; }
    .app-btn__label { display: none; }
}

/* ============================================================
   Konten & judul halaman
   ============================================================ */

.main { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; min-width: 0; }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 4px 4px 0;
}
.page-head__text { min-width: 0; max-width: 760px; }
.eyebrow {
    margin: 0 0 5px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange-600);
}
.page-head h1 {
    margin: 0;
    font-size: clamp(23px, 2.4vw, 27px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
}
.page-head .lede { margin: 7px 0 0; max-width: 68ch; font-size: 13.5px; color: var(--muted); }
.page-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.page-head__actions .select { background-color: var(--card); border-color: var(--line); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
}
.back-link:hover { color: var(--blue); }
.back-link svg { width: 14px; height: 14px; }

/* ============================================================
   Kartu
   ============================================================ */

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
}
.card--flush { padding: 0; overflow: hidden; }
.card--soft { background: var(--blue-50); box-shadow: none; }
.card--note { background: var(--orange-50); box-shadow: none; }
.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.card__title { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.012em; color: var(--text); }
.card__sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.card__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ============================================================
   Statistik
   ============================================================ */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 17px 18px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
}
.stat__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    background: var(--blue-50);
    color: var(--blue);
}
.stat__icon svg { width: 19px; height: 19px; }
.stat__icon--green { background: var(--green-50); color: var(--green); }
.stat__icon--orange { background: var(--orange-50); color: var(--orange-600); }
.stat__icon--red { background: var(--red-50); color: var(--red-700); }
.stat__body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.stat__label { margin: 0; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.stat__value {
    margin: 1px 0 0;
    font-size: clamp(18px, 1.9vw, 22px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.stat__value small { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.stat__meta { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.stat__meta strong { color: var(--text); font-weight: 700; }

/* Angka ringkas tanpa kartu (dipakai di kepala detail) */
.fact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--stripe);
    min-width: 120px;
}
.fact span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.fact strong { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fact--dark { background: var(--dark); }
.fact--dark span { color: rgba(255, 255, 255, 0.65); }
.fact--dark strong { color: #fff; }

/* ============================================================
   Tombol, chip, tautan aksi
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
    box-shadow: 0 3px 10px rgba(47, 102, 144, 0.2);
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--blue-600); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--dark { background: var(--dark); box-shadow: 0 3px 10px rgba(31, 59, 77, 0.2); }
.btn--dark:hover { background: #162f3f; }
.btn--outline,
.btn-outline {
    background: var(--card);
    border-color: var(--line);
    color: var(--text);
    box-shadow: none;
}
.btn--outline:hover,
.btn-outline:hover { background: #f4f8f7; border-color: #b9c9ce; color: var(--dark); }
.btn--ghost {
    background: transparent;
    color: var(--muted);
    box-shadow: none;
}
.btn--ghost:hover { background: #f0f5f4; color: var(--text); }
.btn--danger,
.btn-danger { background: var(--red); box-shadow: 0 3px 10px rgba(196, 87, 74, 0.2); }
.btn--danger:hover,
.btn-danger:hover { background: var(--red-700); color: #fff; }
.btn--sm,
.btn-sm { min-height: 32px; padding: 6px 11px; border-radius: 9px; font-size: 12px; box-shadow: none; }
.btn--sm svg { width: 14px; height: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #7b8b94;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--blue-50); color: var(--blue); }
.icon-btn--danger:hover { background: var(--red-50); color: var(--red-700); }
.row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; flex-wrap: nowrap; }

.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.action-pill svg { width: 13px; height: 13px; }
.action-pill:hover { background: var(--blue-50); border-color: #bfd5e6; color: var(--blue-600); }
.action-pill--ok { border-color: #bfe3d4; color: var(--green-700); }
.action-pill--ok:hover { background: var(--green-50); border-color: var(--green); color: var(--green-700); }
.action-pill--danger { border-color: #f2c5bf; color: var(--red-700); }
.action-pill--danger:hover { background: var(--red-50); border-color: var(--red); color: var(--red-700); }

/* ============================================================
   Tab halaman & filter
   ============================================================ */

.tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 2px rgba(20, 50, 60, 0.04);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover { background: #f0f5f4; color: var(--text); }
.tab.is-active { background: var(--dark); color: #fff; font-weight: 800; }
.tab.is-active:hover { color: #fff; }
.tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(95, 107, 117, 0.12);
    font-size: 10.5px;
    font-weight: 800;
}
.tab.is-active .tab__count { background: rgba(255, 255, 255, 0.18); color: #fff; }

.filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.filters .field { margin: 0; }
.filters .input,
.filters .select { min-width: 150px; }
.filters .input--search { min-width: 240px; }
.filters__spacer { margin-left: auto; }

.chip-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 33px;
    padding: 6px 13px;
    border-radius: 10px;
    background: var(--stripe);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.chip:hover { background: #e9f1ef; }
.chip.is-active { background: var(--dark); color: #fff; }
.chip__count { font-size: 11px; font-weight: 800; opacity: 0.7; }

/* ============================================================
   Tabel
   ============================================================ */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(141, 157, 165, 0.45) transparent;
    -webkit-overflow-scrolling: touch;
}
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(141, 157, 165, 0.45); border-radius: 999px; }

table.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 13px;
    color: var(--text);
}
.table th {
    padding: 2px 14px 6px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: #7b8b94;
    white-space: nowrap;
}
.table td {
    padding: 13px 14px;
    vertical-align: middle;
    background: var(--stripe);
    border-bottom: 0;
}
.table tbody tr:nth-child(even) td { background: #fbfdfc; }
.table tbody tr:hover td { background: var(--blue-50); }
.table td:first-child { border-radius: 12px 0 0 12px; }
.table td:last-child { border-radius: 0 12px 12px 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .no-wrap { white-space: nowrap; }
.table .cell-title { display: block; font-weight: 750; color: var(--text); }
.table .cell-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.table .cell-dim { color: var(--muted); }
.table .actions { text-align: right; width: 1%; white-space: nowrap; }
.table tfoot td,
.table tfoot th {
    background: transparent;
    padding-top: 11px;
    font-weight: 800;
    color: var(--text);
}
.table tfoot th {
    font-size: 11.5px;
    letter-spacing: 0.03em;
    text-transform: none;
}
.table--compact td { padding-top: 10px; padding-bottom: 10px; }

.row-click tbody tr { cursor: pointer; }
.row-click tbody tr td:first-child a { font-weight: 750; }

/* Bilah mini di dalam sel */
.cell-bar { display: flex; align-items: center; gap: 9px; justify-content: flex-end; }
.cell-bar .bar { width: 84px; flex: 0 0 84px; }
.cell-bar__value { min-width: 44px; text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================================
   Label status
   ============================================================ */

.tag,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    text-transform: none;
}
.tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}
.tag--none::before { display: none; }
.tag--blue,
.badge-diajukan,
.badge-berjalan,
.badge-dikirim { background: #e2edf7; color: #1f4f7a; }
.tag--green,
.badge-baik,
.badge-disetujui,
.badge-selesai,
.badge-sudah_final,
.badge-aktif { background: #dff1e9; color: #1d6145; }
.tag--orange,
.badge-belum_final { background: #fcecdf; color: #94481a; }
.tag--red,
.badge-ditolak,
.badge-rusak_berat { background: #fbe5e2; color: #9b2c22; }
.tag--gray,
.badge-hilang,
.badge-rusak_ringan { background: #e9eef0; color: #55616b; }
.tag--violet { background: #ebe8f6; color: #4b4180; }

.role-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 7px;
    background: var(--stripe);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}
.role-tag--admin { background: var(--orange-50); color: var(--orange-600); }

.code-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 7px;
    background: var(--stripe);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mono-num { font-variant-numeric: tabular-nums; letter-spacing: -0.005em; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ============================================================
   Formulir
   ============================================================ */

.form { display: flex; flex-direction: column; gap: 18px; }
.form-section { display: flex; flex-direction: column; gap: 13px; }
.form-section + .form-section { padding-top: 18px; border-top: 1px solid var(--line-soft); }
.form-section__head { display: flex; flex-direction: column; gap: 2px; }
.form-section__head h2 { margin: 0; font-size: 14px; font-weight: 800; }
.form-section__head p { margin: 0; font-size: 12.5px; color: var(--muted); }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label,
.form-group > label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #3f4b54;
}
.field > label .optional { font-weight: 600; color: var(--muted); }
.input,
.select,
.textarea,
.field input,
.field select,
.field textarea,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: #f1f6f5;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.4;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.input,
.select,
.field input,
.field select,
.form-group input,
.form-group select { height: 42px; }
.textarea,
.field textarea,
.form-group textarea { min-height: 92px; resize: vertical; }
.select,
.field select,
.form-group select { appearance: none; padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6b75' stroke-width='2.2' 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 12px center;
}
.input:hover,
.select:hover,
.textarea:hover,
.field input:hover,
.field select:hover,
.field textarea:hover { background: #ecf3f1; }
.input:focus,
.select:focus,
.textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    background: #fff;
    border-color: #9fc1d6;
    box-shadow: 0 0 0 3px rgba(47, 102, 144, 0.12);
}
.input::placeholder,
.textarea::placeholder,
.field input::placeholder,
.field textarea::placeholder { color: #94a3a8; }
.input:disabled,
.select:disabled,
.textarea:disabled,
.field input:disabled,
.field select:disabled,
.field textarea:disabled { color: var(--muted); background: #eef2f2; }
.field__help,
.form-group .help {
    margin: 0;
    font-size: 11.5px;
    color: var(--muted);
}
.field__help a { font-weight: 700; }
.field__error,
.form-error { margin: 0; font-size: 11.5px; font-weight: 700; color: var(--red-700); }
.input[aria-invalid='true'] { border-color: #e2a49b; background: #fdf6f5; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}
.form-actions__note { margin-right: auto; font-size: 11.5px; color: var(--muted); }

.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--blue); }
input[type='file'] { padding: 8px; font-size: 12.5px; }
input[type='file']::file-selector-button {
    margin-right: 10px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

/* ============================================================
   Panel lipat (review / pengaturan)
   ============================================================ */

.disclosure { border-radius: var(--radius); }
.disclosure > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.18s ease;
}
.disclosure[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.disclosure__body { padding-top: 14px; }

.review-panel { border-radius: var(--radius); }
.review-panel > summary {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    list-style: none;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--blue);
}
.review-panel > summary::-webkit-details-marker { display: none; }
.review-panel > summary::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}
.review-panel[open] > summary::before { transform: rotate(45deg); }
.review-panel__body { padding-top: 12px; }

/* ============================================================
   Bilah progres
   ============================================================ */

.bar { position: relative; height: 8px; width: 100%; overflow: hidden; border-radius: 999px; background: #e6eeec; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width 0.35s ease; }
.bar--green > span { background: var(--green); }
.bar--orange > span { background: var(--orange); }
.bar--red > span { background: var(--red); }
.bar--thin { height: 6px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(80px, 1fr) 48px; align-items: center; gap: 12px; }
.bar-row + .bar-row { margin-top: 11px; }
.bar-row__label { font-size: 12px; font-weight: 650; color: var(--muted); }
.bar-row__value { font-size: 12px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

.meter-block { display: flex; flex-direction: column; gap: 7px; }
.meter-block__head { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.meter-block__head span { color: var(--muted); font-weight: 650; }
.meter-block__head strong { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ============================================================
   Peringatan, kosong, paginasi
   ============================================================ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 13px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
}
.alert svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.alert--ok { background: var(--green-50); color: var(--green-700); }
.alert--info { background: var(--blue-50); color: var(--blue-700); }
.alert--warn { background: var(--orange-50); color: #7a3b17; }
.alert--error { background: var(--red-50); color: var(--red-700); }
.alert strong { font-weight: 800; }
.alert a { font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

.alert-success { background: var(--green-50); color: var(--green-700); padding: 12px 14px; border-radius: 13px; font-size: 12.5px; font-weight: 600; }
.alert-error { background: var(--red-50); color: var(--red-700); padding: 12px 14px; border-radius: 13px; font-size: 12.5px; font-weight: 600; }

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 42px 20px;
    text-align: center;
    color: var(--muted);
}
.empty__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--stripe);
    color: #8d9da5;
}
.empty__icon svg { width: 22px; height: 22px; }
.empty strong { font-size: 14px; font-weight: 800; color: var(--text); }
.empty p { margin: 0; max-width: 44ch; font-size: 12.5px; }
.empty-state { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.pagination { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 16px; list-style: none; padding: 0; }
.pagination svg { width: 15px; height: 15px; }
.pagination a,
.pagination > span,
.pagination span > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 33px;
    height: 33px;
    padding: 0 10px;
    border-radius: 9px;
    background: var(--stripe);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
}
.pagination a:hover { background: var(--nav-active); color: var(--nav-active-text); }
.pagination span[aria-current='page'] > span { background: var(--dark); color: #fff; }
.pagination [aria-disabled='true'] > span { opacity: 0.38; }

/* ============================================================
   Detail paket & daftar mini
   ============================================================ */

.meta-list { display: flex; flex-wrap: wrap; gap: 7px; }
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--stripe);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
}
.meta-pill svg { width: 13px; height: 13px; }
.meta-pill strong { color: var(--text); font-weight: 800; }

.note {
    padding: 13px 15px;
    border-radius: 12px;
    background: var(--stripe);
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.6;
}
.note--warn { background: var(--orange-50); color: #6b3416; }
.note--info { background: var(--blue-50); color: var(--blue-700); }

.mini-list { display: flex; flex-direction: column; }
.mini-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 13px;
}
.mini-list__row:last-child { border-bottom: 0; }
.mini-list__row strong { font-weight: 750; }
.mini-list__row span { color: var(--muted); font-size: 12px; }

.group-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
.group-summary::-webkit-details-marker { display: none; }
.group-summary__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.group-summary__text strong { font-size: 14px; font-weight: 800; }
.group-summary__text span { font-size: 12px; color: var(--muted); }
.group-summary__total { margin-left: auto; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.group-summary__chevron { width: 16px; height: 16px; color: var(--muted); transition: transform 0.18s ease; }
details[open] .group-summary__chevron { transform: rotate(180deg); }

/* ============================================================
   Halaman masuk
   ============================================================ */

.guest-body {
    background:
        radial-gradient(circle at 15% 15%, rgba(217, 119, 58, 0.10), transparent 42%),
        radial-gradient(circle at 85% 80%, rgba(58, 143, 123, 0.12), transparent 45%),
        var(--page);
}
.guest-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 0;
    width: min(980px, calc(100% - 32px));
    min-height: 560px;
    margin: 6vh auto;
    border-radius: 26px;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 24px 70px rgba(20, 50, 60, 0.16);
}
.guest-mark {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 54px 48px;
    overflow: hidden;
    background: linear-gradient(150deg, var(--dark) 0%, #24506a 58%, var(--blue) 100%);
    color: #fff;
}
.guest-mark::before,
.guest-mark::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.guest-mark::before {
    width: 320px;
    height: 320px;
    top: -130px;
    right: -110px;
    background: radial-gradient(circle, rgba(217, 119, 58, 0.34), transparent 68%);
}
.guest-mark::after {
    width: 260px;
    height: 260px;
    bottom: -140px;
    left: -80px;
    background: radial-gradient(circle, rgba(58, 143, 123, 0.32), transparent 68%);
}
.guest-mark > * { position: relative; z-index: 1; }
.guest-mark__brand { display: flex; align-items: center; gap: 11px; }
.guest-mark__brand .brand__mark { background: var(--orange); }
.guest-mark__brand strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
.guest-mark__brand small { display: block; font-size: 11.5px; opacity: 0.72; }
.guest-mark__code {
    width: fit-content;
    padding: 4px 11px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #f5c84a;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.guest-mark h1 {
    margin: 4px 0 0;
    font-size: clamp(30px, 4vw, 40px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.035em;
}
.guest-mark p { margin: 0; max-width: 36ch; color: rgba(255, 255, 255, 0.78); font-size: 13.5px; line-height: 1.7; }
.guest-mark__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12.5px;
    font-weight: 700;
    width: fit-content;
}
.guest-mark__back:hover { color: #fff; }
.guest-panel { display: flex; align-items: center; justify-content: center; padding: 46px 44px; }
.guest-panel__inner { width: 100%; max-width: 360px; }
.guest-panel h2 { margin: 0 0 5px; font-size: 24px; font-weight: 800; letter-spacing: -0.025em; }
.guest-panel .subtitle { margin: 0 0 24px; font-size: 13px; color: var(--muted); }
.guest-panel .form-group { margin-bottom: 14px; }
.guest-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.guest-divider::before,
.guest-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

/* ============================================================
   Responsif
   ============================================================ */

@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .app-shell { padding: 12px; gap: 12px; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 60;
        width: min(290px, 86vw);
        height: 100vh;
        border-radius: 0 22px 22px 0;
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        box-shadow: 20px 0 50px rgba(20, 50, 60, 0.24);
    }
    .nav-toggle:checked ~ .app-shell .sidebar { transform: translateX(0); }
    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(17, 35, 45, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
    }
    .nav-toggle:checked ~ .nav-overlay { opacity: 1; pointer-events: auto; }
    .sidebar__close {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        margin-left: auto;
        border-radius: 10px;
        background: var(--stripe);
        color: var(--muted);
        cursor: pointer;
    }
    .sidebar__close:hover { background: var(--red-50); color: var(--red-700); }
    .sidebar__close svg { width: 17px; height: 17px; }
    .brand { flex: 1; }
    .menu-btn { display: grid; }
    .workspace { width: 100%; }
    .topbar { padding: 0; }
    .topbar__date { font-size: 13.5px; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .guest-shell { grid-template-columns: 1fr; min-height: 0; margin: 16px auto; }
    .guest-mark { padding: 34px 30px; }
    .guest-mark p { max-width: 52ch; }
    .guest-panel { padding: 34px 30px; }
}

@media (max-width: 680px) {
    body { font-size: 13.5px; }
    .app-shell { padding: 10px; gap: 10px; }
    .main { gap: 12px; }
    .card { padding: 16px; border-radius: 16px; }
    .card--flush { padding: 0; }
    .page-head { gap: 12px; padding: 2px 2px 0; }
    .page-head__actions { width: 100%; flex-wrap: nowrap; }
    .page-head__actions > * { flex: 1 1 0; min-width: 0; }
    .page-head__actions .btn { width: 100%; overflow: hidden; }
    .page-head__actions > form { display: flex; }
    .page-head__actions > form .btn { width: 100%; }
    .stat { padding: 14px; gap: 10px; }
    .stat__icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
    .stat__value { font-size: 18px; }
    .topbar-link { display: none; }
    .topbar__greet { font-size: 12px; }
    .topbar__date { font-size: 12px; }
    .account-btn__name { display: none; }
    .form-row,
    .form-row--3 { grid-template-columns: 1fr; gap: 13px; }
    .filters { gap: 7px; }
    .filters .field { flex: 1 1 140px; }
    .filters .field:has(.input--search) { flex-basis: 100%; }
    .filters .input,
    .filters .select { min-width: 0; }
    .filters__spacer { margin-left: 0; }
    .bar-row { grid-template-columns: 112px minmax(60px, 1fr) 42px; gap: 9px; }
    .tab { padding: 8px 11px; font-size: 12px; }
    .table { min-width: 680px; }
    .table th { padding-left: 11px; padding-right: 11px; }
    .table td { padding: 12px 11px; }
    .table td:first-child { border-radius: 10px 0 0 10px; }
    .table td:last-child { border-radius: 0 10px 10px 0; }
    .empty { padding: 32px 14px; }
    .guest-mark { padding: 28px 24px; }
    .guest-panel { padding: 28px 24px; }
    .pop-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-width: none; }
}

@media (max-width: 680px) {
    .table--stack { min-width: 0; display: block; border-spacing: 0; }
    .table--stack thead { display: none; }
    .table--stack tbody,
    .table--stack tr,
    .table--stack td { display: block; width: 100%; }
    .table--stack tr {
        margin-bottom: 8px;
        padding: 8px 14px;
        border-radius: 14px;
        background: var(--stripe);
    }
    .table--stack tr:nth-child(even) { background: #fbfdfc; }
    .table--stack td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        padding: 7px 0;
        border-radius: 0 !important;
        background: transparent !important;
        text-align: right;
    }
    .table--stack td::before {
        content: attr(data-label);
        flex: 0 0 92px;
        padding-top: 2px;
        text-align: left;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #7b8b94;
    }
    .table--stack td:first-child {
        display: block;
        padding-top: 4px;
        padding-bottom: 9px;
        text-align: left;
    }
    .table--stack td:first-child::before { display: none; }
    .table--stack td.actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 3px;
        padding-top: 9px;
        border-top: 1px solid var(--line-soft);
    }
    .table--stack td.actions::before { display: none; }
    .table--stack td.actions .row-actions { margin-left: auto; }
    .table--stack .cell-sub { text-align: left; }
    .table--stack .cell-value {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
        min-width: 0;
        text-align: right;
    }
}

@media (max-width: 430px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat-grid--2 { grid-template-columns: 1fr; }
    .fact { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Cetak: tanpa menu, kartu tetap terbaca. */
@media print {
    .sidebar, .topbar, .page-head__actions, .tabs, .btn, .icon-btn { display: none !important; }
    .app-shell { display: block; padding: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    body { background: #fff; }
}

/* ============================================================
   Logistik BHP — penyesuaian aksen aplikasi
   Standar tampilan aplikasi MIPA (eip-contracts ADR 0012).
   Aksen identitas: teal Persediaan #2e8a8a, primer tetap biru baja.
   ============================================================ */

:root {
    --app: #2e8a8a;
    --app-700: #1d5c5c;
    --app-50: #eef7f7;
}

.brand__mark { background: var(--app); }
.guest-mark__brand .brand__mark { background: var(--app); }
.eyebrow { color: var(--app-700); }

.btn i { font-size: 16px; line-height: 1; }
.btn--sm i { font-size: 14px; }
.icon-btn i { font-size: 16px; }
.stat__icon i { font-size: 19px; }
.stat__icon--teal { background: var(--app-50); color: var(--app-700); }
.nav-link i { font-size: 18px; flex: 0 0 18px; color: #7b8b94; transition: color 0.16s ease; }
.nav-link:hover i { color: var(--blue); }
.nav-link.is-active i { color: var(--blue); }
.nav-link--soon { opacity: 0.5; cursor: default; }
.nav-link--soon:hover { background: transparent; color: var(--muted); }
.nav-badge--soon { background: #e9eef0; color: #55616b; font-size: 10px; letter-spacing: 0.04em; }

.grid-main {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
@media (max-width: 1080px) {
    .grid-main { grid-template-columns: 1fr; }
}

/* Sidebar Logistik lebih padat: menu transaksi + stok cukup banyak. */
.sidebar .nav { gap: 9px; }
.sidebar .nav-group { gap: 1px; }
.sidebar .nav-label { margin-bottom: 2px; }
.sidebar .nav-link { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.sidebar__foot { padding-top: 10px; }

/* Baris daftar ringkas: judul dan keterangan menumpuk rapi. */
.mini-list__row > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

/* Baris filter ringkas: kontrol tidak memakan satu baris penuh. */
.filters > .input,
.filters > .select { width: auto; flex: 1 1 170px; max-width: 260px; }
.filters > .input--search { flex: 1 1 260px; max-width: none; }
.filters > .btn { flex: 0 0 auto; }
@media (max-width: 680px) {
    .filters > .input,
    .filters > .select { flex: 1 1 100%; max-width: none; }
}

/* Filter: beri ruang untuk pemilih jumlah per halaman agar tidak turun baris. */
.filters > .input,
.filters > .select { flex: 1 1 140px; max-width: 190px; }
.filters > .input--search { flex: 1 1 210px; max-width: none; }
.filters > .select.filters__spacer { flex: 0 0 140px; max-width: 140px; }

/* Jejak notifikasi WA di detail transaksi ATK */
.wa-jejak { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.wa-jejak h3 { margin: 0 0 8px; font-size: 13px; font-weight: 800; }
.wa-jejak ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.wa-jejak li { display: flex; flex-direction: column; gap: 3px; }
.wa-jejak .cell-sub { display: block; }
.wa-jejak .tag { margin-right: 4px; }
.wa-pesan summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--blue); }
.wa-pesan pre { margin: 8px 0 0; padding: 10px 12px; max-width: 420px; border-radius: 12px; background: #f1f5f4; font: 12.5px/1.5 inherit; font-family: inherit; white-space: pre-wrap; word-break: break-word; }
.tabs + .grid-2, .tabs + .card, .tabs + .stat-grid { margin-top: 0; }

/* Sub menu di sidebar (mis. Laporan ATK). */
.nav-sub { display: flex; flex-direction: column; margin: 0 0 4px 30px; padding-left: 8px; border-left: 1px solid var(--line-soft, #dfe8e6); }
.nav-sub__link { padding: 4px 8px; border-radius: 8px; font-size: 12.5px; color: var(--muted, #6b7f8a); text-decoration: none; line-height: 1.35; }
.nav-sub__link:hover { background: rgba(31, 59, 77, .05); color: inherit; }
.nav-sub__link.is-active { color: var(--teal-700, #1f6e5c); font-weight: 600; background: rgba(58, 143, 123, .08); }
