/* Arthavidhi DLMS design system — one stylesheet for customer portal and staff console. */
/* Bundled fonts (SIL Open Font License — see /assets/fonts/LICENSE-*.txt). Served from this site; no third-party font CDN. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/poppins-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/poppins-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/poppins-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations'), url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --navy-900: #0c2f57; --navy-800: #124378; --navy-700: #1a65ad; --navy-100: #e1edf9; --sky: #0a8cf8;
  --gold-500: #6a9600; --gold-100: #eff6dc;
  --ink: #18212f; --ink-2: #4a5568; --ink-3: #718096; --line: #dde3ec; --bg: #f5f7fb; --card: #ffffff;
  --ok: #1f7a4d; --ok-bg: #e6f4ec; --warn: #9a6200; --warn-bg: #fdf3dc; --bad: #b42318; --bad-bg: #fde8e7; --info: #1d5fa8; --info-bg: #e7f0fb;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); }
a { color: var(--navy-700); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--navy-900); }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .92rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: .9em; }
.hidden { display: none !important; }

/* ── sandbox banner ── */
.env-banner { background: repeating-linear-gradient(45deg, #fff4d6, #fff4d6 10px, #ffeab3 10px, #ffeab3 20px); color: #6b4a00; text-align: center; font-weight: 600; font-size: 12px; padding: 4px 8px; border-bottom: 1px solid #f0d58a; }

/* ── layout ── */
.topbar { background: var(--navy-900); color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, var(--gold-500), #e7c46c); color: var(--navy-900); display: grid; place-items: center; font-weight: 800; }
.brand small { color: #b9d0ea; font-weight: 500; display: block; font-size: 11px; }
.brand img { background: #fff; border-radius: 8px; padding: 2px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 12px; color: #c9d4e4; text-align: right; }
.container { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 50px); }
.sidebar { background: var(--navy-800); color: #c9d4e4; padding: 14px 10px; }
.sidebar .group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8fb0d6; margin: 14px 10px 6px; }
.sidebar a { display: flex; align-items: center; gap: 8px; color: #dbe4f0; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.sidebar a:hover { background: rgba(255,255,255,.06); }
.sidebar a.active { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.main { padding: 20px 24px 48px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 0; }

/* ── cards & grids ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.grid > .card + .card { margin-top: 0; }
td { font-size: 13px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .label { font-size: 12px; color: var(--ink-3); }
.kpi .value { font-size: 1.35rem; font-weight: 700; color: var(--navy-900); margin-top: 2px; }
.kpi .sub { font-size: 11px; color: var(--ink-3); }
dl.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--ink-3); } dl.kv dd { margin: 0; word-break: break-word; }

/* ── forms ── */
label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 4px; color: var(--ink-2); }
.field { margin-bottom: 12px; }
.field .hint { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-top: 3px; }
.field .err { color: var(--bad); font-size: 12px; margin-top: 3px; }
input, select, textarea { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid #c8d1de; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #9db8e0; outline-offset: 0; border-color: var(--navy-700); }
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters .field { margin: 0; min-width: 140px; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: var(--navy-700); color: #fff; font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--navy-800); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--navy-700); border-color: #c8d1de; }
.btn.secondary:hover { background: var(--navy-100); }
.btn.gold { background: #557a00; color: #fff; } .btn.gold:hover { background: #48680a; }
.btn.danger { background: var(--bad); } .btn.ok { background: var(--ok); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.link { background: none; color: var(--navy-700); padding: 0; border: 0; text-decoration: underline; }

/* ── badges & alerts ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--navy-100); color: var(--navy-700); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.gold { background: #fdf3dc; color: #7a5410; }
.alert { padding: 10px 12px; border-radius: 8px; border: 1px solid; margin-bottom: 12px; }
.alert.info { background: var(--info-bg); border-color: #bcd3f0; color: #1b4a80; }
.alert.warn { background: var(--warn-bg); border-color: #f0d58a; color: #6b4a00; }
.alert.bad { background: var(--bad-bg); border-color: #f5b5b0; color: #8a1c13; }
.alert.ok { background: var(--ok-bg); border-color: #a9d8bf; color: #135c38; }

/* ── tables ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0f3f8; font-size: 12px; color: var(--ink-2); font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
tbody tr:hover { background: #fafbfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.empty { text-align: center; color: var(--ink-3); padding: 28px 12px; }

/* ── tabs, steps, timeline ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 12px; font: inherit; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--navy-800); border-bottom-color: var(--gold-500); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.steps span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #e9edf4; color: var(--ink-3); }
.steps span.done { background: var(--ok-bg); color: var(--ok); } .steps span.current { background: var(--navy-700); color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 12px; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--navy-700); }
.timeline .when { font-size: 11.5px; color: var(--ink-3); }

/* ── bars (dependency-free charts) ── */
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; }
.bar .track { background: #eef2f8; border-radius: 4px; height: 12px; overflow: hidden; }
.bar .fill { background: var(--navy-700); height: 100%; border-radius: 4px; }
.bar .fill.gold { background: var(--gold-500); }
.vbars .stick { background: linear-gradient(180deg, var(--sky), var(--navy-700)); }
.vbars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 6px; }
.vbars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); min-width: 0; }
.vbars .stick { width: 100%; max-width: 36px; background: var(--navy-700); border-radius: 4px 4px 0 0; }

/* ── modal & toast ── */
.modal-back { position: fixed; inset: 0; background: rgba(11,31,58,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: min(640px, 100%); max-height: 90vh; overflow: auto; padding: 18px; box-shadow: 0 20px 40px rgba(0,0,0,.25); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 60; padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--navy-900); box-shadow: var(--shadow); max-width: 420px; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }
.spinner { width: 16px; height: 16px; border: 2px solid #c8d1de; border-top-color: var(--navy-700); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 28px; text-align: center; color: var(--ink-3); }
.policy-text { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 13px; max-height: 160px; overflow: auto; }

/* ── auth screens ── */
.auth { max-width: 420px; margin: 48px auto; }
.auth .card { padding: 24px; }
.secret-box { font-family: var(--mono); background: #f4f6fa; border: 1px dashed #9fb0c8; padding: 10px; border-radius: 8px; word-break: break-all; text-align: center; letter-spacing: 2px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
  .sidebar .group { display: none; }
  .sidebar a { white-space: nowrap; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { margin-top: 6px; }
}
/* ── credit assessment ── */
.cam-head { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.cam-score { width: 130px; height: 130px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--navy-700) calc(var(--p, 0) * 1%), #e6edf6 0); position: relative; }
.cam-score::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.cam-score b, .cam-score span { position: relative; } .cam-score b { font-size: 2.1rem; color: var(--navy-900); line-height: 1; } .cam-score span { font-size: 11px; color: var(--ink-3); }
.cam-detail { font-size: 12.5px; margin: 10px 0; padding-left: 18px; }
fieldset.cam-sec { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 2px; margin: 0 0 12px; }
fieldset.cam-sec legend { font-weight: 700; font-size: 13px; color: var(--navy-800); padding: 0 6px; }
.tabs-inline { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.perm-grid h5 { grid-column: 1 / -1; margin: 8px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.logo-cell img { max-height: 36px; max-width: 120px; object-fit: contain; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gal-grid figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gal-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; } .gal-grid figcaption { padding: 8px 10px; font-size: 12.5px; }

/* ── phone layout ── */
.filters-toggle { display: none; }
.step-meter { display: none; }
@media (max-width: 640px) {
  html, body { font-size: 15px; }
  .env-banner { font-size: 11px; padding: 3px 8px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .brand { gap: 8px; font-size: 14px; } .brand small { display: none; } .brand img { width: 26px; height: 26px; }
  .topbar .who { font-size: 11.5px; line-height: 1.35; }
  .container { padding: 14px 12px 40px; }
  .main { padding: 14px 12px 40px; }
  .page-head { margin-bottom: 12px; } .page-head h1 { font-size: 1.3rem; }
  .card { padding: 13px; } .card + .card { margin-top: 10px; }
  input, select, textarea { font-size: 16px; padding: 10px; }       /* no iOS zoom on focus */
  .btn { min-height: 42px; } .btn.sm { min-height: 36px; padding: 6px 12px; }
  .row { gap: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 10px 11px; } .kpi .value { font-size: 1.1rem; } .kpi .label { font-size: 11.5px; }
  dl.kv { grid-template-columns: minmax(96px, 40%) 1fr; gap: 6px 10px; font-size: 14px; }
  dl.kv dt { margin-top: 0; }
  .tabs { margin-left: -12px; margin-right: -12px; padding: 0 8px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  /* staff menu: sticky, swipeable strip */
  .sidebar { position: sticky; top: 0; z-index: 20; padding: 6px 8px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar a { padding: 7px 11px; font-size: 13.5px; }
  .sidebar a.active { box-shadow: inset 0 -3px 0 var(--gold-500); }
  /* filters collapse behind a button */
  .filters-toggle { display: inline-flex; margin-bottom: 10px; }
  .filters-wrap:not(.open) .filters { display: none; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
  .filters .field { min-width: 0; }
  .filters > .btn, .filters > .check { grid-column: span 1; }
  /* stacked card tables */
  .table-wrap.stack { border: 0; background: transparent; overflow: visible; }
  .table-wrap.stack table, .table-wrap.stack tbody { display: block; }
  .table-wrap.stack thead { display: none; }
  .table-wrap.stack tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
  .table-wrap.stack td { display: grid; grid-template-columns: minmax(92px, 38%) 1fr; gap: 8px; border: 0; padding: 4px 0; text-align: left !important; font-size: 13.5px; }
  .table-wrap.stack td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; font-weight: 600; }
  .table-wrap.stack td.act { display: block; padding-top: 8px; }
  .table-wrap.stack td.act::before { content: none; }
  .table-wrap.stack td:empty, .table-wrap.stack td.act:empty { display: none; }
  .table-wrap:not(.stack) th, .table-wrap:not(.stack) td { padding: 6px 8px; font-size: 12.5px; }
  .pager { justify-content: space-between; flex-wrap: wrap; }
  /* wizard: compact progress instead of 10 chips */
  .steps { display: none; }
  .step-meter { display: block; margin-bottom: 12px; }
  .step-meter .lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
  .step-meter .bar { height: 6px; border-radius: 999px; background: #e3e8f0; overflow: hidden; }
  .step-meter .bar span { display: block; height: 100%; background: var(--gold-500); }
  .wizard-nav { position: sticky; bottom: 0; background: #fff; margin: 12px -13px -13px !important; padding: 10px 13px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
  /* dialogs as bottom sheets */
  .modal-back { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); }
  .modal-actions { position: sticky; bottom: -16px; background: #fff; padding-top: 10px; }
  .modal-actions .btn { flex: 1; }
  .toast { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: none; }
  .timeline { padding-left: 12px; }
  .auth { margin: 20px auto; } .auth .card { padding: 18px; }
  .policy-text { max-height: 120px; }
  .bar { grid-template-columns: minmax(80px, 34%) 1fr auto; font-size: 12px; }
  .cam-head { grid-template-columns: 1fr; justify-items: start; }
}
@media print {
  .sidebar, .topbar, .no-print, .tabs, .env-banner, .btn { display: none !important; }
  .shell { display: block; } .main { padding: 0; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  body { background: #fff; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* back-to-website link in portal / staff headers */
.back-site { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.28); white-space: nowrap; }
.back-site:hover { background: rgba(255,255,255,.12); }
@media (max-width: 640px) { .back-site span { display: none; } .back-site { padding: 6px 7px; } }

/* website content admin */
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
label.btn { cursor: pointer; }
.media-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.media-grid img { background: #eef3f9; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.modal:has(.blog-editor) { max-width: 820px; width: calc(100vw - 24px); }

/* enterprise portal */
.dash-block { margin-top: 20px; } .dash-block > h2 { font-size: 1.1rem; margin: 0 0 8px; color: var(--navy-800); }
a.kpi:hover { border-color: #9db8e0; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; margin: 0; }
.dl-grid dt { font-size: 12px; color: var(--ink-3); margin-top: 8px; } .dl-grid dd { margin: 0; font-weight: 600; word-break: break-word; }
.form-grid .span3 { grid-column: 1 / -1; }
.lines-ed td { padding: 4px; } .lines-ed input, .lines-ed select { min-width: 90px; }
.filters-inline { gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; } .filters-inline input, .filters-inline select { width: auto; min-width: 160px; }
.vtotals { display: flex; gap: 14px; font-weight: 600; flex-wrap: wrap; } .vtotals .ok { color: #135c38; } .vtotals .bad { color: #b42318; }
.vlines input, .vlines select { min-width: 100px; }
tr.changed td { background: #fff7e0; }
.note { border-left: 3px solid var(--gold-500); padding: 6px 10px; margin: 8px 0; background: #fbfcf7; } .note p { margin: 4px 0 0; }
pre.json { white-space: pre-wrap; font-size: 12px; background: #f6f8fb; padding: 10px; border-radius: 8px; }
.totals-box { margin: 8px 0; }
@media (max-width: 640px) { .filters-inline input, .filters-inline select { min-width: 0; width: 100%; } .dl-grid { grid-template-columns: 1fr 1fr; } }

/* ═════════ grouped navigation (shared by DLMS + enterprise) ═════════ */
.sidebar.grouped { padding: 12px 10px 30px; overflow-y: auto; }
.sidebar.grouped .nav-sec { margin-bottom: 4px; border-radius: 10px; }
.sidebar.grouped .nav-sec.has-active { background: rgba(255,255,255,.04); }
.nav-group { width: 100%; display: grid; grid-template-columns: 30px 1fr 16px; align-items: center; gap: 8px; background: none; border: 0; color: #fff; text-align: left; padding: 9px 8px; border-radius: 10px; cursor: pointer; font: inherit; }
.nav-group:hover { background: rgba(255,255,255,.06); }
.ng-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #b9d47a; }
.ng-title { font-family: var(--head); font-weight: 600; font-size: 13.5px; letter-spacing: .01em; line-height: 1.2; }
.ng-title small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11px; color: #9db6d6; letter-spacing: 0; margin-top: 1px; }
.ng-chev { color: #9db6d6; transition: transform .15s; display: grid; }
.nav-group[aria-expanded="true"] .ng-chev { transform: rotate(90deg); }
.sidebar.grouped .nav-group[aria-expanded="false"] + .nav-items { display: none; }
.sidebar.grouped .nav-items { padding: 2px 0 8px 38px; display: grid; gap: 1px; }
.sidebar.grouped .nav-items a { padding: 7px 10px; font-size: 13.5px; font-weight: 500; color: #d3deec; border-radius: 8px; }
.sidebar.grouped .nav-items a.active { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.nav-toggle { display: none; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; width: 38px; height: 36px; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.nav-scrim { display: none; }
.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 6px; }
.launch-tile { display: block; text-decoration: none; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: #fff; box-shadow: 0 8px 20px rgba(12,47,87,.15); }
.launch-tile:first-child { background: linear-gradient(135deg, #4f7d00, #6a9600); }
.launch-tile b { display: block; font-family: var(--head); font-weight: 600; font-size: 15px; } .launch-tile small { color: #dbe7f4; font-size: 12px; }
.dash-block > h2 { font-family: var(--head); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.dash-block > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .sidebar.grouped { position: fixed !important; top: 0; left: 0; bottom: 0; width: min(310px, 86vw); z-index: 60; display: block !important; overflow-y: auto; transform: translateX(-105%); transition: transform .2s ease; mask-image: none !important; padding-top: 16px; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.nav-open .sidebar.grouped { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(7,29,54,.45); z-index: 55; }
  .sidebar.grouped a { white-space: normal; }
  .sidebar.grouped .nav-items a { padding: 10px 10px; font-size: 14.5px; }
  .back-site span { display: none; }
}

/* ═════════ typography v4 — Poppins headings, Inter text ═════════ */
:root { --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; --head: 'Poppins', 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3, h4, .page-head h1 { font-family: var(--head); letter-spacing: -.01em; }
h1, .page-head h1 { font-weight: 600; } h2 { font-weight: 600; } h3 { font-weight: 600; }
.auth h1 { font-size: 1.5rem; font-weight: 600; color: var(--navy-900); }
.brand { font-family: var(--head); font-weight: 600; letter-spacing: .01em; } .brand small { font-family: var(--font); font-weight: 400; letter-spacing: .02em; }
.btn { font-family: var(--head); font-weight: 500; letter-spacing: .01em; }
.kpi .label { font-family: var(--head); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.kpi .value { font-family: var(--head); font-weight: 600; letter-spacing: -.01em; }
th { font-family: var(--head); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.badge { font-family: var(--head); font-weight: 500; letter-spacing: .03em; }
.tabs button { font-family: var(--head); font-weight: 500; }
label { font-weight: 500; }
.install-app { background: #fff; color: var(--navy-900); border: 0; border-radius: 999px; padding: 7px 14px; font-family: var(--head); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.install-app:hover { background: #eef5fc; }
.install-tip { position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 80; background: var(--navy-900); color: #fff; padding: 14px 40px 14px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 14px; }
.install-tip button { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
@media (max-width: 640px) { .install-app { padding: 6px 10px; font-size: 12px; } }

/* sign-in screen (DLMS / partner / employee) */
.auth { max-width: 460px; margin: 40px auto; padding: 0 12px; }
.auth .auth-card { padding: 30px 28px; border-radius: 22px; border: 1px solid #e3eaf3; box-shadow: 0 20px 50px rgba(12,47,87,.12); border-top: 6px solid var(--navy-800); }
.auth .ac-green { border-top-color: #4f8a10; } .auth .ac-orange { border-top-color: #f07a22; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-brand img { border-radius: 12px; box-shadow: 0 4px 12px rgba(12,47,87,.15); background: #fff; padding: 3px; }
.auth-brand b { display: block; font-family: var(--head); font-weight: 700; color: var(--navy-900); font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.auth-brand small { color: var(--ink-3); font-size: 12px; }
.auth-title { font-family: var(--head); font-weight: 700; font-size: 1.85rem; color: var(--navy-900); margin: 0 0 6px; letter-spacing: -.02em; }
.auth-title span { color: var(--gold-500); }
.ac-orange .auth-title span { color: #e8731c; }
.auth-mfa { font-size: 12.5px; color: var(--ink-2); background: var(--navy-50, #f0f6fc); border-radius: 10px; padding: 8px 12px; }
.auth-card .btn[type=submit] { width: 100%; min-height: 46px; font-size: 15px; }
.ac-green .btn[type=submit] { background: #4f8a10; } .ac-orange .btn[type=submit] { background: #f07a22; }
.auth-switch { text-align: center; margin: 16px 0 0; font-size: 13.5px; } .auth-switch a { color: var(--navy-700); font-weight: 600; text-decoration: none; }
.portal-switch { display: inline-block; margin-top: 4px; color: #b9d47a !important; font-weight: 600; text-decoration: none; }

/* ═════════ customer portal ═════════ */
.c-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 18px; background: linear-gradient(120deg, var(--navy-900), var(--navy-800) 60%, var(--navy-700)); color: #fff; border-radius: 22px; padding: 26px 28px; overflow: hidden; margin-bottom: 16px; }
.c-hero h1 { color: #fff; font-family: var(--head); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 4px 0 6px; }
.c-hero p { color: #d3e0f0; margin: 0 0 16px; }
.c-hero img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 18px; background: #fff; }
.c-eyebrow { font-family: var(--head); font-weight: 600; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: #b9d47a; }
.btn.ghost-w { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.c-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.c-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--navy-700); }
.c-stat.green { border-left-color: var(--gold-500); } .c-stat.blue { border-left-color: var(--sky); } .c-stat.red { border-left-color: var(--bad); }
.c-stat span { display: block; font-family: var(--head); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.c-stat b { display: block; font-family: var(--head); font-weight: 700; font-size: 1.35rem; color: var(--navy-900); margin-top: 2px; }
.c-stat small { color: var(--ink-3); font-size: 12px; }
.c-sec { margin-top: 20px; } .c-sec > h2 { font-family: var(--head); font-weight: 600; font-size: 1.1rem; color: var(--navy-900); margin: 0 0 10px; }
a.card.c-loan, a.card.c-app { text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; display: block; }
a.card.c-loan:hover, a.card.c-app:hover { box-shadow: 0 12px 26px rgba(12,47,87,.12); transform: translateY(-2px); }
.c-loan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.c-loan-grid span { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; } .c-loan-grid b { font-family: var(--head); font-weight: 600; font-size: 14.5px; }
.c-progress { height: 8px; background: #e6edf6; border-radius: 999px; overflow: hidden; margin: 6px 0; } .c-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-500), #a9d13f); }
.c-app-amt { font-family: var(--head); font-weight: 600; color: var(--navy-800); margin: 6px 0 10px; }
.c-next { font-size: 13.5px; background: var(--info-bg); color: var(--info); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.c-empty { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; } .c-empty img { width: 160px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.c-prod { display: flex; flex-direction: column; gap: 6px; } .c-prod-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #eef5fd; margin-bottom: 4px; }
.c-prod .btn { margin-top: auto; }

/* progress tracker */
.tracker { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; padding: 4px 0; margin: 0; counter-reset: none; }
.tracker.stopped { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tracker li { position: relative; text-align: center; font-size: 12px; color: var(--ink-3); }
.tracker li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: #dfe6ef; z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.current::before { background: var(--gold-500); }
.tracker .dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font: 600 13px var(--head); background: #fff; border: 2px solid #cfd9e6; color: var(--ink-3); }
.tracker li.done .dot { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.tracker li.current .dot { background: var(--navy-700); border-color: var(--navy-700); color: #fff; box-shadow: 0 0 0 5px #dbe8f7; }
.tracker li b { display: block; font-family: var(--head); font-weight: 500; font-size: 11.5px; line-height: 1.25; }
.tracker li.current b { color: var(--navy-900); font-weight: 600; } .tracker li.done b { color: var(--ink-2); }
.tracker li.stop .dot { background: var(--bad); border-color: var(--bad); color: #fff; } .tracker li.stop b { color: var(--bad); }
.tracker.compact .dot { width: 22px; height: 22px; font-size: 11px; } .tracker.compact li::before { top: 10px; } .tracker.compact li b { font-size: 10.5px; }

/* wizard steps */
.wsteps { list-style: none; display: flex; gap: 0; padding: 14px 16px; margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow-x: auto; }
.wsteps li { flex: 1 0 74px; position: relative; text-align: center; }
.wsteps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: #dfe6ef; }
.wsteps li:first-child::before { display: none; } .wsteps li.done::before, .wsteps li.current::before { background: var(--gold-500); }
.wsteps a { text-decoration: none; color: inherit; }
.wsteps .dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font: 600 13px var(--head); background: #fff; border: 2px solid #cfd9e6; color: var(--ink-3); }
.wsteps li.done .dot { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.wsteps li.current .dot { background: var(--navy-700); border-color: var(--navy-700); color: #fff; box-shadow: 0 0 0 5px #dbe8f7; }
.wsteps b { display: block; font-family: var(--head); font-weight: 500; font-size: 11.5px; color: var(--ink-3); } .wsteps li.current b { color: var(--navy-900); font-weight: 600; } .wsteps li.done b { color: var(--ink-2); }
.w-badge { float: right; display: flex; align-items: center; gap: 8px; } .w-badge span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-100); font-size: 18px; } .w-badge small { color: var(--ink-3); font-family: var(--head); }

/* auth split (customer portal login) */
.auth-split { display: grid; grid-template-columns: 1fr 440px; gap: 26px; align-items: center; max-width: 980px; margin: 30px auto; }
.auth-art { text-align: center; } .auth-art img { width: 100%; max-width: 440px; border-radius: 22px; box-shadow: 0 16px 40px rgba(12,47,87,.1); }
.auth-art h2 { font-family: var(--head); font-weight: 700; color: var(--navy-900); margin: 16px 0 6px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: inline-grid; gap: 6px; text-align: left; color: var(--ink-2); }
.auth-points li::before { content: "✓"; color: var(--gold-500); font-weight: 700; margin-right: 8px; }
.auth-split .auth-card { padding: 28px; border-radius: 22px; border: 1px solid #e3eaf3; box-shadow: 0 20px 50px rgba(12,47,87,.12); border-top: 6px solid var(--navy-700); }

@media (max-width: 900px) {
  .c-hero { grid-template-columns: 1fr; } .c-hero img { max-height: 160px; }
  .c-stats { grid-template-columns: 1fr 1fr; }
  .auth-split { grid-template-columns: 1fr; } .auth-art { display: none; }
}
@media (max-width: 640px) {
  .c-hero { padding: 18px; border-radius: 18px; } .c-loan-grid { grid-template-columns: 1fr 1fr; }
  .c-empty { grid-template-columns: 1fr; } .c-empty img { width: 100%; max-height: 140px; object-fit: cover; }
  .tracker li b { font-size: 9.5px; } .tracker .dot { width: 24px; height: 24px; } .tracker li::before { top: 11px; }
  .wsteps { display: none; } .w-badge { float: none; margin-bottom: 8px; }
}
