/* Shared design tokens + layout, extracted verbatim from index.html's
   Executive Overview page so Fase B's new pages match it exactly.
   index.html itself is untouched -- it keeps its own inline copy. */
:root{
  --navy:#0B1E3D; --navy-light:#132C57; --blue:#1E56C8; --blue-soft:#E8EFFC;
  --bg:#F6F8FC; --card:#FFFFFF; --border:#E2E7F0;
  --text:#101828; --text-muted:#5B6472;
  --green:#1A8754; --green-bg:#E8F6EE;
  --amber:#B7791F; --amber-bg:#FDF3DF;
  --red:#C13333; --red-bg:#FBEAEA;
}
*{box-sizing:border-box;}

/* THE hidden ATTRIBUTE HAS TO OUTRANK THE CLASS THAT PAINTS THE ELEMENT.
   `display:none` for [hidden] comes only from the browser's own stylesheet,
   and an author stylesheet always beats that -- so any class here that sets
   `display` (.form-field, .filters, .form-grid, .tabs, ... ) silently
   defeats el.hidden = true. The element carries the attribute and still
   renders, which is the worst shape a defect can take: the JavaScript reads
   correct, the screen is wrong, and instrumentation that asks for
   `el.hidden` agrees with the code instead of with the screen.
   See docs/TEMUAN_HIDDEN_TIDAK_MENGIKAT.md. */
[hidden]{display:none !important;}

body{margin:0;font-family:-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px;}
a{color:inherit;}
.app{display:grid;grid-template-columns:240px 1fr;min-height:100vh;min-width:1100px;}
.sidebar{background:var(--navy);color:#fff;padding:24px 0;}
.brand{padding:0 24px 24px;font-weight:700;font-size:18px;letter-spacing:.5px;border-bottom:1px solid rgba(255,255,255,.12);}
.brand span{color:#7FA6F5;}
.nav-group{padding:20px 12px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#8CA0C7;}
.nav-item{padding:10px 24px;font-size:14px;color:#D7E1F5;cursor:pointer;border-left:3px solid transparent;display:block;text-decoration:none;}
.nav-item.active{background:var(--navy-light);color:#fff;border-left-color:var(--blue);font-weight:600;}
.nav-item.disabled{color:#5A6E96;cursor:default;}
.nav-item.disabled:hover .soon{opacity:1;}
.soon{font-size:10px;opacity:0;transition:opacity .15s;color:#8CA0C7;}
.main{padding:20px 32px 60px;}
.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:16px;flex-wrap:wrap;}
.topbar h1{font-size:20px;margin:0;}
.identity{display:flex;align-items:center;gap:10px;}
.identity select{padding:6px 10px;border:1px solid var(--border);border-radius:6px;background:#fff;font-size:13px;}
.badge{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:20px;font-size:12px;font-weight:600;white-space:nowrap;}
.badge-official{background:var(--green-bg);color:var(--green);}
.badge-neutral{background:#EEF1F6;color:var(--text-muted);}
.dot{width:7px;height:7px;border-radius:50%;background:currentColor;}
.filters{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap;align-items:center;}
.filters select, .filters input[type=number]{padding:6px 10px;border:1px solid var(--border);border-radius:6px;font-size:13px;background:#fff;min-width:110px;}
.filters label{font-size:11px;color:var(--text-muted);display:block;margin-bottom:2px;}
.filter-group{display:flex;flex-direction:column;}
.btn{padding:7px 14px;border:1px solid var(--blue);background:var(--blue);color:#fff;border-radius:6px;font-size:13px;cursor:pointer;}
.btn:hover{background:#1746a2;}
.btn-ghost{background:#fff;color:var(--text-muted);border-color:var(--border);}
.btn-danger{background:var(--red);border-color:var(--red);}
.btn-danger:hover{background:#9c2828;}
.btn:disabled{opacity:.5;cursor:not-allowed;}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px;}
.card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:16px 18px;min-height:96px;}
.card .label{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:8px;}
.card .value{font-size:21px;font-weight:700;color:var(--navy);}
.card .sub{font-size:12px;margin-top:6px;color:var(--text-muted);}
.pill{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600;}
.pill-good{background:var(--green-bg);color:var(--green);}
.pill-warn{background:var(--amber-bg);color:var(--amber);}
.pill-bad{background:var(--red-bg);color:var(--red);}
.pill-muted{background:#EEF1F6;color:var(--text-muted);}
.section{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:18px;margin-bottom:18px;}
.section h2{font-size:14px;margin:0 0 12px;color:var(--navy);}
table{width:100%;border-collapse:collapse;font-size:13px;}
th{text-align:left;color:var(--text-muted);font-weight:600;padding:7px 9px;border-bottom:1px solid var(--border);font-size:11px;text-transform:uppercase;letter-spacing:.03em;}
td{padding:8px 9px;border-bottom:1px solid #EEF1F6;}
tr:last-child td{border-bottom:none;}
tr.clickable{cursor:pointer;}
tr.clickable:hover{background:#F7FAFF;}
.grid2{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;}
.empty-state, .error-state, .unauth-state{padding:24px;text-align:center;color:var(--text-muted);font-size:13px;}
.error-state{color:var(--red);}
.loading{padding:24px;text-align:center;color:var(--text-muted);font-size:13px;}
.footnote{font-size:11px;color:var(--text-muted);margin-top:8px;}
.breadcrumb{font-size:12px;color:var(--text-muted);margin-bottom:8px;}
.breadcrumb a{color:var(--blue);cursor:pointer;text-decoration:none;}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}
select:focus, input:focus, textarea:focus, .btn:focus, tr.clickable:focus{outline:2px solid var(--blue);outline-offset:1px;}

/* Fase B additions -- forms, tabs, modal */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px;}
.form-field{display:flex;flex-direction:column;gap:4px;}
.form-field label{font-size:12px;color:var(--text-muted);font-weight:600;}
.form-field input, .form-field select, .form-field textarea{padding:8px 10px;border:1px solid var(--border);border-radius:6px;font-size:13px;background:#fff;font-family:inherit;}
.form-field input:disabled{background:#F2F4F8;color:var(--text-muted);}
.form-field .hint{font-size:11px;color:var(--text-muted);}
.form-field .field-error{font-size:11px;color:var(--red);min-height:14px;}
.form-actions{display:flex;gap:10px;margin-top:18px;}
/* Read-only label/value pairs, 2 per row -- same grid pattern as
   .form-grid, for detail/review views (e.g. Approvals' transaction
   detail modal) where fields aren't editable inputs. */
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 24px;margin-top:10px;}
.detail-field{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid var(--border);font-size:13px;}
.detail-field .detail-label{color:var(--text-muted);}
.detail-field .detail-value{font-weight:500;text-align:right;}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:16px;}
.tab{padding:9px 16px;font-size:13px;color:var(--text-muted);cursor:pointer;border-bottom:2px solid transparent;}
.tab.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:600;}
.tab .count{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:9px;background:#EEF1F6;font-size:11px;}
.txn-card{border:1px solid var(--border);border-radius:8px;padding:14px 16px;margin-bottom:10px;background:#fff;}
.txn-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}
.txn-card-title{font-weight:600;font-size:14px;}
.txn-card-sub{font-size:12px;color:var(--text-muted);margin-top:2px;}
.txn-card-amount{font-weight:700;color:var(--navy);font-size:15px;white-space:nowrap;}
.txn-card-actions{display:flex;gap:8px;margin-top:12px;}
.revision-reason{background:var(--red-bg);color:#7A2323;padding:10px 12px;border-radius:6px;font-size:12px;margin-top:10px;}
.modal-backdrop{position:fixed;inset:0;background:rgba(11,30,61,.45);display:flex;align-items:center;justify-content:center;z-index:100;}
.modal{background:#fff;border-radius:10px;padding:24px;width:420px;max-width:90vw;
  /* max-height + overflow were MISSING until 19 September 2026, and their
     absence was not a cosmetic problem. .modal-backdrop is position:fixed
     with align-items:center, so a modal taller than the viewport overflows
     in BOTH directions and nothing can scroll: the buttons go below the
     bottom edge and the title goes above the top, unreachable by any
     means. Measured on a 1366x768 laptop the revision modal stood at
     1080px -- title at y=-132, Simpan at y=869.

     Before six boxes were added on 19 September that same modal measured
     775px, i.e. it was THREE PIXELS from breaking and nobody could have
     known. See docs/TEMUAN_MODAL_TANPA_MAX_HEIGHT.md.

     90vh, never a fixed pixel height: this modal is also used on small
     screens. */
  max-height:90vh;overflow-y:auto;}

/* Keeps Batal/Simpan on screen while the body scrolls. Sticky rather than a
   flex footer so no modal's markup has to change -- the negative margins
   cancel .modal's own 24px padding so the bar spans the full width and
   nothing shows through beneath it. */
.modal .form-actions{position:sticky;bottom:-24px;background:inherit;
  margin:0 -24px -24px;padding:14px 24px 24px;border-top:1px solid var(--border);}
.modal h3{margin:0 0 14px;font-size:16px;color:var(--navy);}
.preview-box{background:var(--blue-soft);border-radius:8px;padding:12px 14px;margin-top:10px;}
.preview-box .row{display:flex;justify-content:space-between;font-size:13px;padding:3px 0;}
.preview-box .row b{color:var(--navy);}
