/* Reviewer page (Phase 1b). Colours come only from tokens.css. */
.rv { max-width: 1400px; }
.rv-readonly { background: var(--info-bg); color: var(--info); border-radius: var(--radius-s); padding: 8px 14px; margin: 0 0 16px; max-width: 1000px; }
.rv-bar { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.rv-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rv-pick label { margin: 0; }
.rv-bar select { min-width: 0; width: 280px; max-width: 100%; }
.rv-pick { min-width: 0; max-width: 100%; }
.btn.small { min-height: 30px; padding: 3px 10px; font-size: 13px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.linkbtn { font: inherit; background: none; border: 0; padding: 4px 6px; color: var(--brand-blue); text-decoration: underline; cursor: pointer; }
.iconbtn { font: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); min-width: 36px; min-height: 36px; cursor: pointer; color: var(--text); }
.small-note { font-size: 12px; }

.rv-tiles { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; max-width: none; }
.stat { min-width: 120px; padding: 6px 14px; border-right: 1px solid var(--border-soft); }
.stat-n { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat-l { color: var(--muted); font-size: 13px; }
.stat.info .stat-n { color: var(--info); }
.stat.blue .stat-n { color: var(--brand-blue); }
.stat.orange .stat-n { color: var(--orange); }
.rv-submit { margin-left: auto; max-width: 340px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rv-submit p { margin: 0; font-size: 13px; }
.rv-strip { display: flex; gap: 20px; flex-wrap: wrap; font-weight: 600; margin: 0 0 12px; color: var(--muted); }
.rv-strip .red-n { color: var(--conf-red); }

.rv-tablewrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: var(--shadow-card); overflow-x: auto; }
.rv-order { margin: 0; padding: 8px 12px; font-size: 13px; }
.rtable { min-width: 980px; }
.rrow { display: grid; grid-template-columns: 104px minmax(180px, 1.3fr) 104px minmax(300px, 1.7fr) minmax(190px, 1fr); gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); border-left: 3px solid var(--conf-green-bar); align-items: start; background: var(--conf-green-bg); }
.rrow.head { background: var(--surface-2); font-weight: 700; border-left-color: transparent; align-items: center; }
.rrow.amber { border-left: 5px solid var(--conf-amber-bar); background: var(--surface); }
.rrow.red { border-left: 8px solid var(--conf-red-bar); background: var(--conf-red-bg); }
.rrow.red.overdue { border-left-color: var(--conf-overdue-bar); }
.rrow.changed { background: var(--info-bg); }
.rrow:not(.head) { cursor: pointer; }
.rrow.open { outline: 2px solid var(--brand-blue); outline-offset: -2px; }
.rrow .num, .rrow.head .num { text-align: right; font-variant-numeric: tabular-nums; }
.payee { font-weight: 600; word-break: break-word; }
.ref { font-size: 12px; word-break: break-word; }
.th-btn { font: inherit; font-weight: 700; background: none; border: 0; padding: 2px 4px; cursor: pointer; color: var(--text); }
.c-status { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

.tile { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; padding: 6px 10px; min-height: 48px; border-radius: var(--radius-s); border: 1px solid var(--border); cursor: pointer; background: var(--surface); color: var(--text); }
.tile.green { background: var(--conf-green-bg); color: var(--conf-green); border-color: var(--conf-green-bar); }
.tile.amber { background: var(--conf-amber-bg); color: var(--conf-amber); border-color: var(--conf-amber-bar); }
.tile.red { background: var(--surface); color: var(--conf-red); border: 2px solid var(--conf-red-bar); font-weight: 700; }
.tile.blue { background: var(--info-bg); color: var(--info); border-color: var(--brand-blue); }
.tile .shape { width: 22px; height: 22px; flex: none; }
.t-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.t-acct { font-weight: 700; word-break: break-word; }
.t-sub { font-size: 12px; font-weight: 400; }
.t-band { font-size: 12px; font-weight: 700; flex: none; }
.why { margin-top: 6px; font-size: 13px; }
.why-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.why-text { color: var(--text); }
.why-text.nm { color: var(--danger); }
.chip.overdue { background: var(--conf-overdue-bg); color: var(--conf-overdue); }

.rv-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; }
.skeleton { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 16px; max-width: 1000px; }
.sk-line { height: 44px; background: var(--surface-2); border-radius: var(--radius-s); margin-bottom: 10px; }

/* details panel: beside the table from 1440, an overlay below that */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--surface); box-shadow: var(--shadow-float); border-left: 1px solid var(--border); z-index: 40; overflow-y: auto; padding: 20px; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.panel-head h2 { margin: 0 0 12px; word-break: break-word; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tab { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tab.on { color: var(--brand-green); border-bottom-color: var(--brand-green); }
.panel-body h3 { font-size: 15px; margin: 0 0 8px; }
.panel .kv { grid-template-columns: 120px 1fr; }
.pcard { border-radius: var(--radius-s); padding: 12px; margin-bottom: 12px; border-left: 6px solid var(--conf-green-bar); background: var(--conf-green-bg); color: var(--conf-green); }
.pcard.amber { border-left-color: var(--conf-amber-bar); background: var(--conf-amber-bg); color: var(--conf-amber); }
.pcard.red { border-left-color: var(--conf-red-bar); background: var(--conf-red-bg); color: var(--conf-red); }
.pcard .muted { color: inherit; opacity: .85; }
.p-acct { font-weight: 700; font-size: 16px; }
.nm-help { margin: 6px 0 0; }
@media (min-width: 1440px) { .rv.has-panel { margin-right: 440px; } }

/* quick editor */
.editor { position: fixed; z-index: 45; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: var(--shadow-float); padding: 16px; overflow-y: auto; }
.editor h2 { font-size: 16px; margin: 0 0 8px; }
.editor input[type="search"], .editor textarea { width: 100%; min-width: 0; }
.editor textarea { font: inherit; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-s); resize: vertical; background: var(--surface); color: var(--text); }
.ed-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-s); margin: 8px 0; }
.opt { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; font: inherit; background: var(--surface); border: 0; border-bottom: 1px solid var(--border-soft); padding: 8px 10px; cursor: pointer; color: var(--text); }
.opt:hover { background: var(--brand-green-light); }
.opt.on { background: var(--brand-green-light); font-weight: 700; }
.opt-tax { font-size: 12px; flex: none; }
.kai-mark { color: var(--info); font-size: 12px; font-weight: 600; }
.ed-help, .ed-gst { font-size: 13px; margin: 4px 0 8px; }
.ed-gst { font-weight: 600; min-height: 1em; }
.ed-err { color: var(--danger); font-weight: 600; min-height: 1.2em; margin: 4px 0; }
@media (max-width: 1023px) { .rv-submit { margin-left: 0; } .panel { width: 100%; } }
.rrow.red .muted, .rrow.changed .muted { color: var(--text); } /* muted grey measured 4.47 on the red tint, so red and changed rows use full text colour */
.nm-btn { font-weight: 600; padding: 0 2px; } .nm-card { max-width: 880px; }
