/* THE REVENUE PAGE (2026-10-23, feat/billing-reconciliation; public/billing-recon/). Every colour is a token the main
   app sets (public/appTheme.js applies the user's palette and display mode); no colour is fixed here. */
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:100 1000; font-display:swap; src:url('/fonts/dm-sans-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; }
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:100 1000; font-display:swap; src:url('/fonts/dm-sans-latin-ext-wght-normal.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'DM Sans'; font-style:italic; font-weight:100 1000; font-display:swap; src:url('/fonts/dm-sans-latin-wght-italic.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:'DM Sans'; font-style:italic; font-weight:100 1000; font-display:swap; src:url('/fonts/dm-sans-latin-ext-wght-italic.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Fraunces'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/fraunces-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; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--app-font, 'DM Sans', sans-serif); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
a { color: var(--accent); }

/* the app header, as public/index.html draws it */
.app-header { background-color: var(--bg); background-image: var(--banner-grad); border-bottom: 1px solid var(--border); padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--app-header-h); position: sticky; top: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 9px; min-width: 0; text-decoration: none; border-radius: 10px; }
.logo:hover { opacity: .85; }
.nn-logo { width: 42px; height: 42px; flex: none; display: block; object-fit: contain; transition: filter .3s ease; }
.brand-name { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 25px; letter-spacing: -0.5px; color: var(--logo-ink); line-height: 1; }
.rv-page-title { font-size: 15px; font-weight: 600; color: var(--text2); margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--border); white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 8px; }

/* buttons: the main app's classes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); font-family: var(--app-font); font-size: 13px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease; min-height: 36px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
/* dark mode: dark text on the light accent fill (white on it is about 2:1; this is above 7:1), the same on every page */
:root[data-mode="dark"] .btn-primary { color: var(--bg); }
:root[data-mode="dark"] .btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; min-height: 30px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
input, select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; padding: 7px 10px; min-height: 36px; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); outline: none; }

.nn-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--border); white-space: nowrap; color: var(--text2); background: var(--surface2); }
.nn-badge.is-high { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--text); border-color: var(--warning); }
.nn-badge.is-critical { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--text); border-color: var(--danger); }
.nn-badge.is-ok { background: rgba(var(--success-rgb), 0.12); color: var(--success-ink); border-color: var(--success); }
.nn-badge.is-accent { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); }

.rv-main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; display: grid; gap: 16px; }
.rv-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.rv-bar h1 { font-size: 20px; font-weight: 700; margin-right: auto; }
.rv-bar label { display: flex; flex-direction: column; font-size: 11px; font-weight: 600; color: var(--text3); gap: 2px; }
.rv-msg:empty { display: none; }
.rv-msg { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-tint); color: var(--text); border: 1px solid var(--border); }
.rv-msg.is-bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: var(--danger); }

.rv-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.rv-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); box-shadow: var(--shadow-sm); padding: 14px 16px; min-width: 0; }
.rv-kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); }
.rv-kpi-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.rv-kpi-sub { font-size: 12px; color: var(--text2); }

.rv-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rv-col { display: grid; gap: 16px; min-width: 0; }
.rv-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); box-shadow: var(--shadow-sm); padding: 16px 18px; min-width: 0; }
.rv-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.rv-sech { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); margin-right: auto; }
.rv-hint { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.rv-empty { font-size: 13px; color: var(--text2); padding: 6px 0; }
.rv-empty strong { color: var(--text); font-weight: 600; }

.rv-list { list-style: none; }
.rv-item { border-top: 1px solid var(--border); padding: 12px 0; }
.rv-item:first-child { border-top: 0; padding-top: 4px; }
.rv-item-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.rv-item-title { font-size: 13px; font-weight: 600; }
.rv-item-meta { font-size: 12px; color: var(--text3); }
.rv-item-amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-item-why { font-size: 13px; color: var(--text2); margin-top: 4px; }
.rv-change { margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--surface2); font-size: 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rv-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.rv-acts input { min-height: 30px; padding: 4px 8px; font-size: 12px; width: 150px; }

.rv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rv-table th, .rv-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rv-table thead th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); }
.rv-table tbody tr:last-child td, .rv-table tbody tr:last-child th { border-bottom: 0; }
.rv-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-wrap { overflow-x: auto; }

.rv-import { display: grid; gap: 8px; }
.rv-import-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv-file { position: relative; }
.rv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.rv-file-name { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.rv-codes { font-size: 12px; color: var(--text2); }
.rv-codes b { color: var(--text); font-weight: 600; }

@media (max-width: 1020px) { .rv-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rv-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .app-header { padding: 0 12px; }
  .brand-name { font-size: 21px; }
  .rv-page-title { display: none; }
  .rv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-kpi-value { font-size: 20px; }
  .rv-bar h1 { width: 100%; }
  .rv-card { padding: 14px; }
  .rv-table.rv-stack thead { display: none; }
  .rv-table.rv-stack tr { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; border-bottom: 1px solid var(--border); padding: 6px 0; }
  .rv-table.rv-stack td, .rv-table.rv-stack th { border: 0; padding: 2px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
