@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* NIPL App design system v1 (22-Oct-2026). Generated from tokens.json; change values there, not here. */
:root {
  --brand-navy: #2D4766;
  --brand-navy-deep: #243B54;
  --brand-blue: #2B6A9D;
  --brand-cyan: #22AEDC;
  --brand-cyan-deep: #1A8DB6;
  --brand-sky: #88D4E9;
  --brand-sky-50: #EAF6FB;
  --surface-0: #FFFFFF;
  --surface-50: #F5F7FA;
  --surface-100: #EDF1F5;
  --line: #D5DCE4;
  --line-strong: #7D8A99;
  --ink: #1B2733;
  --ink-muted: #556373;
  --ink-inverse: #FFFFFF;
  --ink-inverse-muted: #B9C6D3;
  --success: #1F7A4D;
  --success-bg: #E6F4EC;
  --warning: #9A5B00;
  --warning-bg: #FDF1DC;
  --danger: #B42318;
  --danger-bg: #FDECEA;
  --chart-1: var(--brand-navy);
  --chart-2: var(--brand-blue);
  --chart-3: var(--brand-cyan-deep);
  --chart-4: var(--brand-sky);
  --chart-5: var(--warning);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
  --control-sm: 28px;
  --control-md: 36px;
  --control-floor: 48px;
  --row-height: 40px;
  --topbar-height: 56px;
  --sidebar-width: 240px;
  --form-width: 400px;
  --shadow-menu: 0 4px 12px rgba(27, 39, 51, 0.14);
  --shadow-dialog: 0 12px 32px rgba(27, 39, 51, 0.20);
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
.page-title { font-family: var(--font-sans); font-size: 24px; line-height: 32px; font-weight: 600; }
.section-title { font-family: var(--font-sans); font-size: 18px; line-height: 26px; font-weight: 600; }
.card-title { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 600; }
.body { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.body-strong { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; }
.label { font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 500; }
.caption { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 400; }
.kpi-value { font-family: var(--font-sans); font-size: 30px; line-height: 38px; font-weight: 600; }
.table-num { font-family: var(--font-sans); font-size: 13px; line-height: 20px; font-weight: 400; }
.code { font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 400; }
.floor-body { font-family: var(--font-sans); font-size: 18px; line-height: 26px; font-weight: 500; }
.floor-value { font-family: var(--font-sans); font-size: 48px; line-height: 56px; font-weight: 600; }
.kpi-value, .table-num { font-variant-numeric: tabular-nums; }

/* Components */

body { margin: 0; background: var(--surface-50); color: var(--ink); font-family: var(--font-sans); font-size: 14px; line-height: 20px; }
.nipl-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: var(--space-4); }
.nipl-stack { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); }
.nipl-num { font-variant-numeric: tabular-nums; }
.nipl-code { font-family: var(--font-mono); font-size: 13px; }

/* Button */
.nipl-btn { font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 20px; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.nipl-btn--md { height: var(--control-md); padding: 0 var(--space-4); }
.nipl-btn--sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; }
.nipl-btn--floor { height: var(--control-floor); padding: 0 var(--space-6); font-size: 18px; }
.nipl-btn--primary { background: var(--brand-blue); color: var(--ink-inverse); }
.nipl-btn--primary:hover { background: var(--brand-navy); }
.nipl-btn--secondary { background: var(--surface-0); color: var(--ink); border-color: var(--line-strong); }
.nipl-btn--secondary:hover { background: var(--surface-100); }
.nipl-btn--ghost { background: transparent; color: var(--brand-blue); }
.nipl-btn--ghost:hover { background: var(--brand-sky-50); }
.nipl-btn--danger { background: var(--danger); color: var(--ink-inverse); }
.nipl-btn:disabled { opacity: .45; cursor: not-allowed; }
.nipl-btn:focus-visible, .nipl-input:focus-visible, .nipl-table tbody tr:focus-visible { outline: 2px solid var(--brand-cyan-deep); outline-offset: 2px; }

/* Field */
.nipl-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 220px; }
.nipl-field__label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.nipl-field__req { color: var(--danger); margin-left: 2px; }
.nipl-input { font-family: var(--font-sans); font-size: 14px; height: var(--control-md); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-0); color: var(--ink); box-sizing: border-box; width: 100%; }
.nipl-input::placeholder { color: var(--ink-muted); }
.nipl-input[readonly] { background: var(--surface-100); }
.nipl-input.is-invalid { border-color: var(--danger); }
.nipl-field__hint { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.nipl-field__error { font-size: 12px; line-height: 16px; color: var(--danger); }

/* StatusTag */
.nipl-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-sm); font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.nipl-tag__dot { width: 6px; height: 6px; border-radius: var(--radius-pill); background: currentColor; }
.nipl-tag--neutral { background: var(--surface-100); color: var(--ink-muted); }
.nipl-tag--info { background: var(--brand-sky-50); color: var(--brand-blue); }
.nipl-tag--success { background: var(--success-bg); color: var(--success); }
.nipl-tag--warning { background: var(--warning-bg); color: var(--warning); }
.nipl-tag--danger { background: var(--danger-bg); color: var(--danger); }

/* KpiTile */
.nipl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); padding: var(--space-4); }
.nipl-kpi { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-1); }
.nipl-kpi__label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.nipl-kpi__value { font-size: 30px; line-height: 38px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.nipl-kpi__unit { font-size: 15px; font-weight: 500; color: var(--ink-muted); margin-left: var(--space-1); }
.nipl-kpi__foot { display: flex; align-items: center; gap: var(--space-2); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.nipl-kpi__delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nipl-kpi__delta--good { color: var(--success); }
.nipl-kpi__delta--bad { color: var(--danger); }
.nipl-kpi__delta--flat { color: var(--ink-muted); }

/* DataTable */
.nipl-tablewrap { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: auto; margin: var(--space-4); }
.nipl-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
.nipl-table th { position: sticky; top: 0; background: var(--surface-100); color: var(--ink-muted); font-weight: 500; text-align: left; padding: 0 var(--space-3); height: 36px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.nipl-table td { padding: 0 var(--space-3); height: var(--row-height); border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.nipl-table .is-right { text-align: right; font-variant-numeric: tabular-nums; }
.nipl-table .is-mono { font-family: var(--font-mono); }
.nipl-table .is-neg { color: var(--danger); }
.nipl-table tbody tr:hover { background: var(--surface-50); }
.nipl-table tbody tr.is-selected { background: var(--brand-sky-50); }
.nipl-table tbody tr.is-clickable { cursor: pointer; }
.nipl-table a { color: var(--brand-blue); text-decoration: none; }
.nipl-table a:hover { text-decoration: underline; }
.nipl-table tfoot td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: 0; }
.nipl-table__empty { text-align: center; color: var(--ink-muted); padding: var(--space-12) var(--space-4) !important; height: auto !important; white-space: normal !important; }

/* Alert */
.nipl-alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); border: 1px solid transparent; }
.nipl-alert__body { flex: 1; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.nipl-alert__title { font-weight: 600; }
.nipl-alert__icon { flex: none; margin-top: 2px; }
.nipl-alert--info { background: var(--brand-sky-50); border-color: var(--brand-blue); }
.nipl-alert--info .nipl-alert__icon, .nipl-alert--info .nipl-alert__title { color: var(--brand-blue); }
.nipl-alert--success { background: var(--success-bg); border-color: var(--success); }
.nipl-alert--success .nipl-alert__icon, .nipl-alert--success .nipl-alert__title { color: var(--success); }
.nipl-alert--warning { background: var(--warning-bg); border-color: var(--warning); }
.nipl-alert--warning .nipl-alert__icon, .nipl-alert--warning .nipl-alert__title { color: var(--warning); }
.nipl-alert--danger { background: var(--danger-bg); border-color: var(--danger); }
.nipl-alert--danger .nipl-alert__icon, .nipl-alert--danger .nipl-alert__title { color: var(--danger); }

/* PageHeader */
.nipl-ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-6); background: var(--surface-0); border-bottom: 1px solid var(--line); }
.nipl-ph__crumbs { font-size: 12px; line-height: 16px; color: var(--ink-muted); margin-bottom: var(--space-1); }
.nipl-ph__crumbs a { color: var(--brand-blue); text-decoration: none; }
.nipl-ph__titlerow { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.nipl-ph__title { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0; color: var(--ink); }
.nipl-ph__meta { font-size: 12px; line-height: 16px; color: var(--ink-muted); margin-top: var(--space-1); }
.nipl-ph__actions { display: flex; gap: var(--space-2); }
@media (max-width: 599px) { .nipl-ph { padding: var(--space-4); } }
