:root {
  --brand: #1f7a4d;
  --brand-dark: #165c3a;
  --brand-soft: #e8f4ee;
  --ink: #1d2530;
  --muted: #6b7684;
  --line: #dfe4ea;
  --bg: #f3f5f8;
  --warn-soft: #fff7e6;
}

body { background: var(--bg); color: var(--ink); font-size: 14px; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.topbar .brand { font-weight: 700; letter-spacing: .2px; color: #fff; text-decoration: none; }
.topbar .brand small { font-weight: 400; opacity: .85; }
.topbar .btn-outline-light { --bs-btn-padding-y: .2rem; --bs-btn-font-size: .82rem; }
.archive-badge { background: rgba(255,255,255,.18); border-radius: 999px; padding: .15rem .6rem; font-size: .75rem; }

/* Panels */
.panel { background: #fff; border: 1px solid var(--line); border-radius: .5rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.panel-head { background: var(--brand-soft); border-bottom: 1px solid var(--line); padding: .75rem 1rem; border-radius: .5rem .5rem 0 0; }
.panel-head h1, .panel-head h2 { font-size: 1.05rem; margin: 0; font-weight: 700; color: var(--brand-dark); }
.panel-body { padding: 1rem; }

/* Tables */
.table-arsip { margin: 0; font-size: 13px; }
.table-arsip thead th { background: #2f3b48; color: #fff; font-weight: 600; vertical-align: middle; white-space: nowrap; border-color: #2f3b48; }
.table-arsip.t-success thead th { background: var(--brand); border-color: var(--brand); }
.table-arsip.t-warning thead th { background: #b7791f; border-color: #b7791f; }
.table-arsip td { vertical-align: top; }
.table-arsip tfoot td { font-weight: 700; background: #f1f3f5; }
.table-arsip .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-arsip .ctr { text-align: center; }
.table-arsip .nowrap { white-space: nowrap; }
.filter-row th { background: #fff !important; padding: .3rem !important; border-color: var(--line) !important; }
.filter-row .form-control, .filter-row .form-select { font-size: 12.5px; padding: .25rem .4rem; min-width: 90px; }
#tbl th:nth-child(5), #tbl td:nth-child(5) { min-width: 260px; }
#tbl th:nth-child(2), #tbl td:nth-child(2) { min-width: 120px; }
.empty-row td { text-align: center; color: var(--muted); font-style: italic; padding: 1rem; }

/* Detail info rows */
.info-table { width: 100%; }
.info-table th { width: 26%; min-width: 160px; font-weight: 600; color: #344150; vertical-align: top; padding: .55rem .75rem; background: #fafbfc; border-bottom: 1px solid var(--line); }
.info-table td { padding: .55rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table td p:last-child { margin-bottom: 0; }
.info-table .sub-table td { border: 0; padding: .1rem 1rem .1rem 0; }

.status-alert { border-left: 4px solid #d97706; background: var(--warn-soft); padding: .75rem 1rem; border-radius: .35rem; }
.status-alert .t { font-weight: 800; color: #b45309; letter-spacing: .5px; font-size: .8rem; }

/* Tabs */
.nav-arsip { border-bottom: 2px solid var(--line); gap: .15rem; flex-wrap: wrap; }
.nav-arsip .nav-link { color: #445; font-weight: 600; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: .55rem .85rem; margin-bottom: -2px; }
.nav-arsip .nav-link:hover { color: var(--brand); }
.nav-arsip .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }
.nav-arsip .count { font-size: .7rem; background: #e9ecef; color: #555; border-radius: 999px; padding: .05rem .4rem; margin-left: .25rem; }
.sec-title { font-size: .82rem; font-weight: 800; letter-spacing: .6px; color: #4a5562; text-transform: uppercase; margin: 1.25rem 0 .5rem; }
.sec-title:first-child { margin-top: .25rem; }
.print-title { display: none; }

.lbl { display: inline-block; padding: .15em .5em; font-size: .75rem; font-weight: 700; border-radius: .25rem; color: #fff; }
.lbl-ok { background: #198754; }
.lbl-no { background: #dc3545; }
.lbl-mute { background: #6c757d; }
.star { color: #e0a800; font-size: 1.1rem; }
.rich img { max-width: 100%; height: auto; }
.rich table { max-width: 100%; }
.muted { color: var(--muted); }
a.file-link { text-decoration: none; }
a.file-link:hover { text-decoration: underline; }

/* Pager */
.pager .page-link { color: var(--brand); }
.pager .active > .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; }

.loading { padding: 3rem; text-align: center; color: var(--muted); }

@media (max-width: 576px) {
  .info-table th { width: auto; display: block; border-bottom: 0; padding-bottom: .1rem; }
  .info-table td { display: block; padding-top: .1rem; }
  .info-table tr { display: block; }
}

/* Cetak: tampilkan semua tab berurutan */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .no-print, .topbar, .nav-arsip, .btn, .modal { display: none !important; }
  .panel { border: 0; box-shadow: none; }
  .panel-head { background: #fff; border-bottom: 2px solid #000; }
  .tab-content > .tab-pane { display: block !important; opacity: 1 !important; break-inside: auto; margin-bottom: 1rem; }
  .print-title { display: block; font-weight: 800; font-size: 13px; margin: 1rem 0 .4rem; border-bottom: 1px solid #999; }
  .table-arsip thead th { background: #eee !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table-responsive { overflow: visible !important; }
  a { color: #000; text-decoration: none; }
}
