@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins-latin-700-normal.woff2') format('woff2'); }

:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  color: #243347;
  background: #f5f4f0;
  font-synthesis: none;
  --navy: #142e46;
  --navy2: #254761;
  --gold: #dfba68;
  --gold-ink: #76551c;
  --paper: #f5f4f0;
  --white: #fff;
  --line: #dcdedc;
  --muted: #606b75;
  --field-border: #7d8993;
  --heading-font: Poppins, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(a[href], button, summary, select, label[for], label:has(input[type="checkbox"], input[type="radio"]), input[type="checkbox"], input[type="radio"]) { cursor: pointer; }
:where(button, input, select, textarea):disabled, [aria-disabled="true"] { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button { line-height: 1.35; }
img, svg { max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--heading-font); color: var(--navy); line-height: 1.4; }
h1 { font-weight: 600; letter-spacing: -.035em; }
h2, h3 { font-weight: 600; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
small { font-size: .8125rem; }
b, strong { font-weight: 600; }
:focus-visible { outline: 3px solid #947021; outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--navy2); outline-offset: 2px; }
button, a, summary { touch-action: manipulation; }
button:disabled { opacity: .5; cursor: not-allowed; }
.muted { color: var(--muted); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; top: 12px; left: 12px; background: #fff; padding: 12px 20px; border-radius: 6px; }

/* Navigation remains separate from the paper-like financial workspace. */
.app-shell { min-height: 100dvh; }
.sidebar { background: var(--navy); color: white; padding: 28px 20px 20px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 4px 28px; border-bottom: 1px solid #3c5164; }
.brand b { font: 600 1.75rem/1 var(--heading-font); letter-spacing: -.04em; }
.brand b > span { color: var(--gold); }
.brand small { display: block; font-size: .6875rem; color: #c4d0d9; margin-top: 9px; white-space: nowrap; }
.national-emblem { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.national-emblem img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-emblem { width: 49px; height: 47px; }
.sidebar-heading { margin: 28px 12px 12px; color: #b4c3ce; font-size: .75rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar nav a { display: flex; gap: 12px; align-items: center; min-height: 47px; padding: 11px 12px; font-size: .8125rem; border-radius: 6px; color: #d7e0e6; transition: background-color .15s, color .15s; }
.sidebar nav a svg { width: 18px; height: 18px; }
.sidebar nav a:hover { background: #254158; color: #fff; }
.sidebar nav a.active { background: #f3e7ca; color: #172f43; font-weight: 600; }
.sidebar-context { margin: auto 12px 26px; padding-top: 50px; }
.sidebar-context > span { color: var(--gold); font: 500 .8125rem var(--heading-font); }
.sidebar-context p { color: #b4c3ce; font-size: .75rem; line-height: 1.7; margin: 9px 0 0; }
.side-bottom { border-top: 1px solid #3c5164; padding: 20px 4px 0; }
.side-account { display: flex; gap: 10px; align-items: center; }
.side-account > div { min-width: 0; }
.side-account b { display: block; font-size: .8125rem; overflow-wrap: anywhere; }
.side-account small { display: block; color: #b4c3ce; margin-top: 3px; font-size: .6875rem; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #355167; color: #fff; flex-shrink: 0; font-size: .875rem; }
.side-bottom button { min-height: 44px; width: 100%; border: 0; background: transparent; color: #d7e0e6; display: flex; align-items: center; gap: 10px; padding: 10px 0; margin-top: 12px; font-size: .8125rem; text-align: left; }
.side-bottom button:hover { color: var(--gold); }
.side-bottom button svg { width: 17px; }
.main-shell { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 36px; background: #fff; border-bottom: 1px solid var(--line); }
.header-context { display: flex; align-items: center; gap: 16px; min-width: 0; font-size: .8125rem; }
.portal-label { color: var(--navy); font-weight: 600; white-space: nowrap; }
.header-separator { color: var(--muted); }
.header-division { color: var(--muted); overflow-wrap: anywhere; }
.header-account { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.menu-toggle { display: none; min-height: 44px; padding: 9px 12px; gap: 8px; align-items: center; background: #fff; color: var(--navy); border: 1px solid var(--field-border); border-radius: 6px; }
.content { max-width: 1480px; margin: 0 auto; padding: 36px; }
.main-shell > main { flex: 1; min-width: 0; }
.main-shell > main:focus { outline: none; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 12px 36px 0; padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .6875rem; }
.app-footer span span { padding: 0 5px; }
.page-title { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.page-title > div { min-width: 0; }
.page-title h1 { margin: 0; font-size: clamp(1.6rem, 2.3vw, 2rem); overflow-wrap: anywhere; }
.page-title p { margin: 7px 0 0; color: var(--muted); font-size: .875rem; }
.page-title > .btn { flex-shrink: 0; }
.card { min-width: 0; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; }
.card h2 { font-size: 1rem; margin: 0 0 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.card-head h2, .section-heading h2 { margin: 0; }
.card-head p, .section-heading p { margin: 5px 0 0; font-size: .8125rem; }
.card-head .text-link { flex-shrink: 0; }
.section-heading { margin-bottom: 22px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; color: var(--navy2); font-weight: 600; text-decoration: underline; text-decoration-color: #adb8bf; text-underline-offset: 5px; }
.text-link:hover { text-decoration-color: var(--navy); }

/* The main action has more weight than secondary counts. */
.dashboard-overview { display: grid; grid-template-columns: 1.05fr 1fr; margin-bottom: 30px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: clip; }
.priority-panel { padding: 28px 32px; background: var(--navy); color: #fff; }
.panel-caption { display: flex; align-items: center; gap: 9px; color: #e5d1a3; font-size: .8125rem; }
.panel-caption svg { width: 18px; height: 18px; }
.priority-number { display: flex; align-items: center; gap: 20px; font: 500 clamp(3.25rem, 4.5vw, 4.5rem)/1.2 var(--heading-font); margin: 18px 0 10px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.priority-number > span { font: 400 1rem/1.5 'Segoe UI', sans-serif; color: #e1e7eb; }
.priority-panel > p { color: #cad5dd; font-size: .8125rem; max-width: 400px; margin-bottom: 22px; }
.priority-panel .btn { font-size: .8125rem; }
.overview-ledger { display: flex; flex-direction: column; padding: 30px 32px; }
.ledger-amount { flex: 1; padding-bottom: 25px; }
.ledger-amount > span, .ledger-counts span { display: block; color: var(--muted); font-size: .8125rem; }
.ledger-amount strong { display: block; font: 500 clamp(1.55rem, 2.65vw, 2.5rem)/1.35 var(--heading-font); margin: 10px 0 7px; letter-spacing: -.045em; color: var(--navy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.overview-ledger small { display: block; color: var(--muted); font-size: .75rem; }
.ledger-counts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); padding-top: 22px; gap: 24px; }
.ledger-counts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.ledger-counts strong { display: block; font: 500 1.75rem var(--heading-font); color: var(--navy); margin: 4px 0; }
.applicant-intro h2 { color: #fff; font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.025em; margin: 20px 0 12px; }
.application-status-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0 0 28px; }
.application-status-strip > div { display: flex; align-items: center; gap: 10px; padding-right: 20px; font-size: .8125rem; }
.application-status-strip > div + div { border-left: 1px solid #cbd0cf; padding-left: 24px; }
.application-status-strip svg { width: 18px; color: var(--muted); }
.application-status-strip b { margin-left: auto; color: var(--navy); font-size: 1.125rem; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 24px; }
.admin-grid > .card { margin-bottom: 24px; }
.chart-empty { min-height: 240px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--muted); }
.chart-empty > svg { width: 32px; height: 32px; margin-bottom: 18px; color: #7a6639; }
.chart-empty b { font-size: .875rem; color: #344553; }
.chart-empty p { max-width: 310px; margin: 8px 0 0; font-size: .8125rem; }
.status-list > div { display: flex; justify-content: space-between; align-items: center; min-height: 47px; border-bottom: 1px solid #edf0ec; gap: 16px; }
.status-list > div:last-child { border: 0; }
.status-list b { color: var(--navy); font-variant-numeric: tabular-nums; }
.recipient-panel .card-head { margin-bottom: 12px; }
.recipient-disclosure > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; font-size: .8125rem; font-weight: 600; color: var(--navy2); list-style: none; border-top: 1px solid var(--line); padding: 12px 0 0; }
summary::-webkit-details-marker { display: none; }
.recipient-disclosure[open] > summary svg { transform: rotate(180deg); }
.recipient-disclosure .table-wrap { margin-top: 16px; }
.preparation-note { display: flex; align-items: flex-start; gap: 16px; padding: 6px 0 16px; }
.preparation-note > svg { margin-top: 5px; color: var(--gold-ink); }
.preparation-note h2 { font-size: .9375rem; margin: 0 0 6px; }
.preparation-note p { color: var(--muted); font-size: .8125rem; max-width: 760px; margin: 0; }
.preparation-note .text-link { margin-left: auto; flex-shrink: 0; }
.bars > div { margin-bottom: 24px; }
.bar-label { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; font-size: .8125rem; }
.bar-label > span { min-width: 0; overflow-wrap: anywhere; }
.bar-label small { display: block; color: var(--muted); margin-top: 3px; }
.bar-label b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: #e7e9e5; border-radius: 2px; margin-top: 10px; }
.bar i { display: block; height: 100%; background: #516b7e; border-radius: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 17px; font-size: .875rem; font-weight: 600; border-radius: 6px; border: 1px solid transparent; transition: background-color .15s, border-color .15s; cursor: pointer; text-align: center; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy2); }
.btn.secondary { border-color: var(--field-border); background: #fff; color: var(--navy); }
.btn.secondary:hover { background: #edf0ec; }
.btn.gold { color: #192d3e; background: var(--gold); }
.btn.gold:hover { background: #eccd8b; }
.btn.full { width: 100%; }
.btn.small { font-size: .8125rem; padding: 9px 12px; }
.btn svg { width: 17px; height: 17px; }
label { display: block; font-size: .8125rem; font-weight: 600; color: #344553; margin: 20px 0 8px; }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 7px; font-size: .75rem; }
input, select, textarea { display: block; width: 100%; min-width: 0; border: 1px solid var(--field-border); background: #fff; color: #243347; border-radius: 6px; padding: 11px 12px; min-height: 46px; margin-top: 7px; line-height: 1.5; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #6c757c; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #4e6271; }
textarea { resize: vertical; }
.filters { display: flex; gap: 20px; align-items: end; padding-bottom: 24px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.filters label { margin: 0; }
.filters .search-label { flex: 1; }
.filters .status-filter { min-width: 190px; }
.search-field { position: relative; }
.search-field > svg { position: absolute; left: 13px; top: 14px; width: 18px; color: var(--muted); }
.search-field input { padding-left: 41px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; align-items: start; }
.two-col > div, .detail-grid > div { min-width: 0; }
.help-card { background: #eeeae0; border: 1px solid #d3cbb8; padding: 24px; border-radius: 10px; position: sticky; top: 24px; }
.help-card h3 { font-size: .9375rem; margin: 0 0 16px; }
.help-card ol { padding-left: 20px; margin: 0; font-size: .8125rem; color: #4f5b63; }
.help-card li { padding-left: 4px; margin-bottom: 13px; }
.help-card li::marker { color: var(--gold-ink); font-weight: 600; }
.form-section-heading { display: flex; gap: 12px; align-items: center; }
.form-section-heading > span { font-family: var(--heading-font); font-size: .8125rem; color: var(--gold-ink); }
.form-section-heading h2 { margin: 0; }
.form-section-heading + .muted { font-size: .8125rem; margin-top: 12px; }
.submission-note { padding: 13px 16px; background: #f1f3f0; border-radius: 6px; color: #52616a; font-size: .8125rem; margin-top: 18px; line-height: 1.7; }
.os-row { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(130px, .8fr) 44px; gap: 12px; align-items: end; background: #f5f5f1; border: 1px solid var(--line); border-radius: 8px; margin: 16px 0; padding: 18px; }
.os-row label { margin: 0; }
.os-item-justification { grid-column: 1 / -1; }
.icon-btn { width: 44px; height: 46px; border: 1px solid #9f7775; border-radius: 6px; color: #923932; background: #fff; font-size: 1.5rem; }
.icon-btn:not(:disabled):hover { background: #fae9e6; }
.total-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 0 0; margin-top: 20px; border-top: 1px solid #c8cfca; font-size: .875rem; }
.total-box strong { color: var(--navy); font: 500 1.4rem var(--heading-font); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.upload { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 132px; border: 1px dashed #7b877d; border-radius: 8px; padding: 22px; background: #f7f7f3; text-align: center; cursor: pointer; }
.upload input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.upload:focus-within { outline: 3px solid #947021; outline-offset: 4px; }
.upload:hover { background: #eeefe8; }
.upload > svg { color: var(--gold-ink); }
.upload > span { color: var(--navy); }
.upload small { margin: 0; }
.actions { display: flex; justify-content: flex-end; gap: 12px; margin: 4px 0 24px; }
.file-list > div, .attachments > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.file-list span, .attachments b { overflow-wrap: anywhere; }
.attachments > div > div:first-child { min-width: 0; }
.file-list small, .attachments small { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.attachments > div > div:last-child { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-grid small { display: block; color: var(--muted); }
.info-grid b { display: block; font-size: .875rem; margin-top: 5px; overflow-wrap: anywhere; }
.card hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.card > p { font-size: .875rem; overflow-wrap: anywhere; }
.review { border-top: 3px solid #ae8640; }
.review .btn { margin-top: 16px; }
.timeline-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 14px; padding-bottom: 25px; position: relative; font-size: .8125rem; }
.timeline-item > span { width: 9px; height: 9px; border-radius: 50%; background: #526c7d; margin-top: 6px; }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 4px; width: 1px; top: 20px; bottom: 4px; background: #bdc8ca; }
.timeline-item p { color: #52616a; margin: 6px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.timeline-item small { color: var(--muted); font-size: .75rem; }
.alert { padding: 15px 18px; border-radius: 6px; margin: 16px 0; font-size: .875rem; }
.alert.error { border: 1px solid #b77770; color: #842e29; background: #fcf0ed; }
.loading { padding: 18px; color: var(--navy); background: #f1f3ef; font-size: .875rem; text-align: center; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); font-size: .875rem; }
.empty-state { padding: 30px 24px 36px; display: flex; flex-direction: column; align-items: center; text-align: center; border-top: 1px solid var(--line); }
.empty-state > svg { width: 32px; height: 32px; margin-bottom: 14px; color: #77643d; }
.empty-state h3 { margin: 0 0 8px; font: 600 .9375rem 'Segoe UI', sans-serif; }
.empty-state p { color: var(--muted); font-size: .8125rem; margin: 0; max-width: 380px; }
.empty-state .text-link { margin-top: 8px; }

.table-wrap { position: relative; max-width: 100%; overflow: auto; overscroll-behavior-x: contain; }
table { border-collapse: collapse; width: 100%; font-size: .8125rem; }
th { text-align: left; color: #55636c; font-weight: 600; background: #f2f3ef; font-size: .75rem; }
th, td { padding: 15px 14px; border-bottom: 1px solid #e3e6e1; vertical-align: middle; }
td { line-height: 1.5; }
tbody tr:hover { background: #fafaf7; }
tbody tr:last-child td { border-bottom: 0; }
.application-table { min-width: 780px; }
.application-table th { white-space: nowrap; }
.application-table td:first-child { white-space: nowrap; color: var(--navy2); }
.application-table td:nth-child(2) { min-width: 150px; max-width: 260px; overflow-wrap: anywhere; }
.application-table td:nth-child(6) { min-width: 120px; color: var(--muted); font-size: .75rem; }
.amount-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.division-name { display: block; min-width: 160px; max-width: 380px; overflow-wrap: anywhere; }
.division-code { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.submitted-by { font-size: .75rem; color: var(--muted); margin-top: 5px; }
.division-table { min-width: 560px; }
.division-table td:first-child { width: 58%; }
.division-table tfoot { background: #f2f3ef; }
.status { display: inline-flex; align-items: center; border-radius: 4px; padding: 4px 8px; font-size: .6875rem; font-weight: 600; white-space: nowrap; }
.s-DRAF { background: #edf0ed; color: #52616a; }
.s-DIHANTAR { background: #eaf0f5; color: #31556e; }
.s-DALAM_SEMAKAN { background: #f8efda; color: #77551b; }
.s-PERLU_PEMBETULAN { background: #f9e9df; color: #8d441d; }
.s-LULUS { background: #eaf2ea; color: #316042; }
.s-TIDAK_LULUS { background: #f8e8e5; color: #92372f; }
.os-detail-table { min-width: 680px; }
.os-detail-table th, .os-detail-table td { vertical-align: top; overflow-wrap: anywhere; }
.os-detail-table thead th { background: #e9eef5; color: #34475d; padding: 12px; }
.os-detail-table thead th:first-child { border-radius: 6px 0 0 6px; }
.os-detail-table thead th:last-child { border-radius: 0 6px 6px 0; }
.os-item-row td { padding: 12px 12px 7px; border-bottom: 0; }
.os-item-row td:first-child { width: 25%; }
.os-item-row td:nth-child(2) { width: 9%; }
.os-item-row td:nth-child(3) { width: 30%; }
.os-item-row .requested-amount, .os-item-row .item-approval { font-variant-numeric: tabular-nums; }
.os-detail-table .os-justification-row td { padding: 0 0 12px; white-space: normal; }
.os-detail-table tbody tr:hover { background: transparent; }
.os-justification-note { display: grid; grid-template-columns: 10px max-content minmax(0, 1fr); gap: 10px; align-items: start; margin-left: 12px; padding: 8px 12px; background: #f0f3f7; border-radius: 5px; }
.os-justification-branch { width: 9px; height: 9px; margin-top: 3px; border-left: 1px solid #708197; border-bottom: 1px solid #708197; }
.os-justification-label { color: #34475d; font-size: .75rem; }
.os-justification-note p { min-width: 0; margin: 0; color: #34475d; font-size: .8125rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.card.detail-section { padding: 0; }
.card .detail-section-title { margin: 0; padding: 12px 22px; border-radius: 11px 11px 0 0; background: #173b67; color: #fff; font-size: 1rem; }
.detail-section-body { padding: 20px 22px; min-width: 0; }
.detail-section-body > .field-help { margin: 0 0 16px; }
.application-meta { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; margin: 0; }
.application-meta::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid #e0e6ee; }
.application-meta > div { min-width: 0; }
.application-meta dt { color: #606b75; font-size: .8125rem; }
.application-meta dd { margin: 2px 0 0; color: #243347; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.application-justification { padding: 12px 14px; margin-top: 18px; border-radius: 6px; background: #eaf1fa; }
.application-justification h3 { margin: 0 0 4px; color: #34475d; font: 600 .8125rem 'Segoe UI', Arial, sans-serif; }
.application-justification p { margin: 0; color: #243347; font-size: .875rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.directory-toolbar { display: flex; align-items: flex-end; gap: 24px; }
.directory-toolbar label { flex: 1; margin: 0; }
.result-count { padding-bottom: 12px; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.directory-category > p { color: var(--muted); font-size: .875rem; }
.directory-table { min-width: 480px; }
.directory-table th:first-child { width: 100px; }
.directory-table th:last-child { width: 90px; }
.directory-table b { font-weight: 500; }
.numeric-code { color: var(--navy2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.direct-directory > h2 { font-size: 1.125rem; margin: 30px 0 8px; }
.direct-directory > p { font-size: .8125rem; margin-bottom: 22px; }
.program-group { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.program-group summary { display: flex; align-items: center; gap: 16px; padding: 20px 24px; list-style: none; }
.program-group summary:hover { background: #f9f9f5; border-radius: 10px; }
.program-group summary::after { content: '+'; font-size: 1.375rem; color: var(--navy); }
.program-group[open] summary::after { content: '−'; }
.program-group summary > span:first-child { flex: 1; min-width: 0; }
.program-group summary b { display: block; color: var(--navy); font-size: .875rem; }
.program-group summary small { display: block; color: var(--muted); margin-top: 4px; font-size: .75rem; }
.record-count { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.program-content { padding: 0 24px 20px; }
.load-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.load-more small { color: var(--muted); font-size: .75rem; }
.load-more > div { display: flex; gap: 8px; flex-wrap: wrap; }
.load-more button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--field-border); background: #fff; color: var(--navy); border-radius: 6px; padding: 9px 12px; min-height: 44px; font-size: .8125rem; }
.load-more button:hover { background: #f1f3ef; }
.error-page { max-width: 680px; margin: 10vh auto; padding: 24px; }
.content .error-page { margin: 0 auto; }
.error-page h1 { font-size: 1.75rem; }

@media (min-width: 901px) {
  .app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; overflow-y: auto; }
  .main-shell { grid-column: 2; }
}
@media (max-width: 1200px) {
  .content { padding: 28px; }
  .topbar { padding: 16px 28px; }
  .header-account { display: none; }
  .two-col { grid-template-columns: minmax(0, 1fr) 230px; gap: 22px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-grid > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .priority-panel, .overview-ledger { padding: 26px; }
  .card { padding: 22px; }
  .app-footer { margin-inline: 28px; }
}
@media (max-width: 1050px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .help-card { position: static; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chart-empty { min-height: 180px; }
  .application-status-strip { gap: 12px; }
  .application-status-strip > div { padding-right: 0; gap: 7px; }
  .application-status-strip > div + div { padding-left: 12px; }
  .application-status-strip svg { display: none; }
}
@media (max-width: 900px) {
  body.menu-open { overflow: hidden; }
  .sidebar { display: none; }
  .menu-toggle { display: flex; flex-shrink: 0; }
  .menu-open .sidebar { display: flex; position: fixed; z-index: 10; inset: 74px 0 0 auto; width: min(340px, 100%); overflow-y: auto; box-shadow: -20px 0 50px #142e4638; }
  .topbar { position: sticky; top: 0; z-index: 11; min-height: 74px; padding-block: 10px; }
  .menu-open .topbar { border-bottom-color: #bdc5ca; }
  .sidebar .brand { padding-bottom: 22px; }
  .sidebar-context { padding-top: 26px; }
  .header-division { max-width: 320px; }
  .admin-grid { grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr); gap: 20px; }
}
@media (max-width: 650px) {
  .content { padding: 24px 18px; }
  .topbar { padding-inline: 18px; }
  .header-context { display: block; }
  .header-separator { display: none; }
  .header-division { display: block; max-width: 230px; margin-top: 2px; font-size: .6875rem; }
  .page-title { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 24px; }
  .page-title h1 { font-size: 1.625rem; }
  .page-title p { font-size: .8125rem; }
  .dashboard-overview { grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; }
  .priority-panel, .overview-ledger { padding: 24px; }
  .priority-number { font-size: 3.5rem; }
  .ledger-amount strong { font-size: 1.875rem; }
  .ledger-counts { gap: 16px; }
  .ledger-counts > div + div { padding-left: 16px; }
  .card { padding: 20px 18px; margin-bottom: 20px; }
  .card-head { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 18px; }
  .card-head .text-link { min-height: 44px; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .application-status-strip { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 22px; }
  .application-status-strip > div, .application-status-strip > div + div { padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); }
  .application-status-strip svg { display: block; }
  .preparation-note { flex-wrap: wrap; }
  .preparation-note > div { flex: 1; min-width: 0; }
  .preparation-note .text-link { margin: 0 0 0 36px; }
  .filters { flex-direction: column; align-items: stretch; gap: 15px; }
  .filters .status-filter { min-width: 0; }
  input, select, textarea { font-size: 1rem; }
  .os-row { grid-template-columns: minmax(0, 1fr) 44px; padding: 14px; }
  .os-row > div:first-child { grid-column: 1 / -1; }
  .total-box { align-items: flex-start; flex-direction: column; gap: 5px; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
  .detail-grid > div:last-child { display: block; }
  .card .detail-section-title { padding: 12px 16px; }
  .detail-section-body { padding: 16px; }
  .application-meta { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .application-meta::before { display: none; }
  .application-justification { padding: 12px; margin-top: 16px; }
  .os-detail-wrap { overflow: visible; }
  .os-detail-table { min-width: 0; }
  .os-detail-table, .os-detail-table tbody, .os-detail-table tr, .os-detail-table td { display: block; }
  .os-detail-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .os-detail-table .os-item-row { padding: 16px 0 8px; }
  .os-detail-table .os-item-row td { width: auto; padding: 5px 0; white-space: normal; }
  .os-item-row td[data-label]::before { content: attr(data-label); display: block; color: #606b75; font-size: .75rem; margin-bottom: 2px; }
  .os-justification-note { grid-template-columns: 10px minmax(0, 1fr); gap: 4px 8px; margin-left: 0; padding: 10px 12px; }
  .os-justification-note p { grid-column: 2; }
  .os-detail-table .os-justification-row td { padding-bottom: 16px; }
  .os-detail-table .item-approval input { width: 100%; min-width: 0; max-width: 240px; }
  .info-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .attachments > div, .file-list > div { align-items: flex-start; flex-direction: column; gap: 12px; }
  .bar-label { flex-direction: column; gap: 5px; }
  .directory-toolbar { display: block; }
  .result-count { display: block; padding: 12px 0 0; }
  .program-group summary { padding: 18px; gap: 10px; }
  .program-content { padding: 0 16px 16px; }
  .program-group summary b { font-size: .8125rem; }
  .record-count { font-size: .6875rem; }
  .app-footer { margin-inline: 18px; gap: 5px; padding-top: 20px; }
  .app-footer > span { width: 100%; }
  .application-table { min-width: 0; }
  .application-table, .application-table tbody, .application-table tr, .application-table td { display: block; }
  .application-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .application-table tr { padding: 18px 0; border-top: 1px solid var(--line); }
  .application-table td, .application-table td:nth-child(2), .application-table td:nth-child(6) { border: 0; min-width: 0; max-width: none; padding: 6px 0; white-space: normal; text-align: left; }
  .application-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .6875rem; font-weight: 400; margin-bottom: 2px; }
  .application-table td:first-child { font-size: .875rem; white-space: normal; overflow-wrap: anywhere; }
  .application-table .division-name { min-width: 0; max-width: none; }
  .application-table td:last-child .text-link { border: 1px solid var(--field-border); border-radius: 6px; padding: 8px 18px; text-decoration: none; margin-top: 4px; }
}
.amount-label { display: block; font-size: .6875rem; font-weight: 400; color: var(--muted); }
.approved-label { margin-top: 9px; }
.approved-value, .timeline-amount { color: #245347; }
.pending-amount { display: block; max-width: 240px; white-space: normal; color: var(--gold-ink); font-size: .75rem; }
.requested-total { padding-top: 10px; margin-top: 12px; border-top: 1px solid var(--line); }
.approval-result { margin-top: 24px; border-left: 3px solid #547966; padding: 16px 20px; background: #eef3ef; }
.approval-result > span, .approved-summary span, .report-summary span { display: block; font-size: .8125rem; color: var(--muted); }
.approval-result strong, .approved-summary strong, .report-summary strong { display: block; font-size: 1.6rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.approval-result p { margin: 6px 0 0; font-size: .8125rem; }
.field-help { margin: -8px 0 22px; font-size: .8125rem; color: var(--muted); }
.review-saved { color: #245347; font-size: .8125rem; margin: 14px 0 0; }
.approved-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; margin: -4px 0 28px; border-bottom: 1px solid var(--line); }
.approved-summary p { max-width: 440px; margin: 0; font-size: .8125rem; color: var(--muted); }
.recipient-filters { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(210px, .8fr) auto auto; gap: 16px; align-items: end; margin: 24px 0 12px; }
.recipient-filters label { margin: 0; min-width: 0; }
.recipient-filters .btn { min-height: 46px; }
.history-navigation { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: -8px 0 24px; }
.history-scope { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.history-scope a { padding: 12px 0; font-size: .8125rem; color: var(--muted); border-bottom: 3px solid transparent; }
.history-scope a[aria-current] { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.report-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-bottom: 24px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.report-summary p, .report-summary small { margin: 0; font-size: .8125rem; color: var(--muted); }
@media (max-width: 1250px) { .recipient-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 650px) {
  .recipient-filters { gap: 14px; }
  .recipient-filters label { grid-column: 1 / -1; }
  .approved-summary { align-items: flex-start; flex-direction: column; gap: 10px; }
  .report-summary { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .sidebar, .topbar, .app-footer, .actions, .skip-link { display: none !important; }
  .app-shell, .main-shell { display: block; }
  .content { padding: 0; }
  body { background: #fff; }
  .table-wrap { overflow: visible; }
}

.item-approval input { width: 150px; min-width: 130px; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.item-approval-label { margin: 0 0 4px; color: #606b75; font-size: .6875rem; font-weight: 400; white-space: normal; }
.approval-history { margin: 10px 0; font-size: .8125rem; }
.approval-history summary { cursor: pointer; color: var(--navy); padding: 8px 0; }
.approval-history ul { padding-left: 18px; }
.approval-history li { margin: 6px 0; overflow-wrap: anywhere; }
.approval-missing { display: block; white-space: normal; color: var(--muted); font-weight: 400; }
.os-detail-table td > b, .os-detail-table .requested-amount { white-space: nowrap; overflow-wrap: normal; }
.review .total-box { display: block; }
.review .total-box strong { display: block; margin-top: 8px; }
