/* fiscal50 revenue desk - "audit desk" design system.
   Plain hex colors only (no CSS custom properties). Fonts served locally.
   Palette: ink #0E1B3D · royal #1F3FA8 · paper #F5F7FB · rule #DCE2EE · sign-off gold #F2B705 · amber #A15C00 · brick #B42318 */
@font-face { font-family: 'Plex'; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('fonts/ibm-plex-sans-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

html { font-size: 15px; }
body { background: #F5F7FB; color: #1C2640; font-family: 'Plex', 'Segoe UI', Arial, sans-serif; line-height: 1.5;
       font-feature-settings: 'tnum' 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: 'Plex', Arial, sans-serif; color: #0E1B3D; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.45rem; } h5 { font-size: 1.05rem; } h6 { font-size: .95rem; }
a { color: #1F3FA8; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #142C7A; }
:focus-visible { outline: 3px solid #F2B705; outline-offset: 2px; }
.text-muted { color: #5B6680 !important; }
.small, small { font-size: .86rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- shell */
.f50-shell { display: flex; min-height: 100vh; }
.f50-side { width: 232px; flex: 0 0 232px; background: #0E1B3D; color: #C9D3EA; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding-bottom: 24px; }
.f50-side .logo { display: block; padding: 22px 20px 2px; font-weight: 700; font-size: 1.45rem; color: #FFFFFF; text-decoration: none; letter-spacing: -0.02em; }
.f50-side .logo span { color: #F2B705; }
.f50-side .sub { padding: 0 20px 14px; font-size: .8rem; color: #8E9AB8; }
.f50-side .sect { padding: 16px 20px 4px; font-size: .78rem; color: #7F8BAA; font-weight: 500; }
.f50-side a.nl { display: flex; align-items: center; gap: 10px; padding: 6px 20px; color: #D6DDEE; text-decoration: none; font-size: .93rem; border-left: 3px solid transparent; }
.f50-side a.nl i { font-size: 1rem; color: #8E9AB8; width: 18px; }
.f50-side a.nl:hover { background: #16264F; color: #FFFFFF; }
.f50-side a.nl.active { background: #182B5C; color: #FFFFFF; border-left-color: #F2B705; font-weight: 600; }
.f50-side a.nl.active i { color: #F2B705; }
.f50-side a.nl .badge { margin-left: auto; background: #F2B705; color: #0E1B3D; font-weight: 700; border-radius: 6px; font-size: .74rem; }
.f50-main { flex: 1; min-width: 0; }
.f50-top { background: #FFFFFF; border-bottom: 1px solid #DCE2EE; padding: 14px 32px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20; }
.f50-top .title { font-size: 1.25rem; font-weight: 600; color: #0E1B3D; margin: 0; }
.f50-top .purpose { color: #5B6680; font-size: .88rem; margin: 0; }
.f50-content { padding: 26px 32px 72px; max-width: 1520px; }
.alert { border-radius: 8px; border: 1px solid #DCE2EE; }

/* ---------------------------------------------------------------- panels */
.card, .panel { background: #FFFFFF; border: 1px solid #DCE2EE; border-radius: 10px; box-shadow: none; }
.card-header, .panel-h { background: transparent; border-bottom: 1px solid #E8ECF4; padding: 12px 18px; font-weight: 600; color: #0E1B3D; border-radius: 10px 10px 0 0 !important; }
.panel-h .hint, .card-header .hint { display: block; font-weight: 400; color: #5B6680; font-size: .84rem; }
.panel-b { padding: 16px 18px; }
.card-body { padding: 16px 18px; }

/* KPI strip: figures on one ruled line, not a wall of cards */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: #FFFFFF; border: 1px solid #DCE2EE; border-radius: 10px; margin-bottom: 20px; }
.kpi { padding: 14px 18px; border-left: 1px solid #E8ECF4; text-decoration: none; color: inherit; display: block; }
.kpi:first-child { border-left: 0; }
.kpi .v { font-size: 1.75rem; font-weight: 600; color: #0E1B3D; line-height: 1.15; }
.kpi .l { font-size: .86rem; color: #5B6680; }
.kpi .d { font-size: .8rem; color: #1F3FA8; }
.kpi.attention .v { color: #A15C00; }
a.kpi:hover { background: #F8FAFE; }
/* legacy stat tiles map onto the same look */
.stat { padding: 14px 18px; }
.stat .num { font-size: 1.6rem; font-weight: 600; color: #0E1B3D; line-height: 1.15; }
.stat .lbl { color: #5B6680; font-size: .86rem; }
.stat.warn .num { color: #A15C00; }

/* ---------------------------------------------------------------- buttons */
.btn { border-radius: 8px; font-weight: 500; }
.btn-f50 { background: #1F3FA8; border: 1px solid #1F3FA8; color: #FFFFFF; }
.btn-f50:hover, .btn-f50:focus { background: #142C7A; border-color: #142C7A; color: #FFFFFF; }
.btn-gold { background: #F2B705; border: 1px solid #E0A800; color: #0E1B3D; font-weight: 600; }
.btn-gold:hover, .btn-gold:focus { background: #E0A800; color: #0E1B3D; }
.btn-quiet { background: #FFFFFF; border: 1px solid #C9D1E2; color: #1C2640; }
.btn-quiet:hover { border-color: #1F3FA8; color: #1F3FA8; }
.btn-outline-primary { color: #1F3FA8; border-color: #9FB0DD; }
.btn-outline-primary:hover { background: #1F3FA8; border-color: #1F3FA8; }
.form-control, .form-select { border-radius: 8px; border-color: #C9D1E2; }
.form-control:focus, .form-select:focus { border-color: #1F3FA8; box-shadow: 0 0 0 3px #F2B70555; }
.form-label { font-weight: 500; color: #1C2640; }
.form-text { color: #5B6680; }

/* ---------------------------------------------------------------- status marks */
.st { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: .8rem; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.st-planned, .st-new, .st-draft, .st-drafting { background: #EEF1F8; color: #3B4766; }
.st-in_review, .st-review, .st-changes_requested, .st-needs_reconnect, .st-hold, .st-nurture { background: #FFF5DD; color: #8A4E00; border-color: #F3D893; }
.st-approved, .st-scheduled, .st-queued, .st-qualified, .st-ready, .st-preparing, .st-waiting, .st-rendering, .st-running, .st-submitted, .st-publishing { background: #E7EDFB; color: #1F3FA8; border-color: #C9D5F4; }
.st-published, .st-done, .st-sent, .st-active, .st-pass, .st-posted, .st-contacted, .st-connected, .st-eligible { background: #1F3FA8; color: #FFFFFF; }
.st-engaged, .st-meeting, .st-opportunity, .st-customer, .st-kit_ready { background: #F2B705; color: #0E1B3D; }
.st-partial { background: #FFF5DD; color: #8A4E00; }
.st-failed, .st-fail, .st-rejected, .st-bounced, .st-unsubscribed, .st-lost, .st-suppressed, .st-unsuitable { background: #FDECEA; color: #B42318; border-color: #F6C9C4; }
.st-archived, .st-cancelled, .st-skipped, .st-disabled, .st-ignored, .st-excluded, .st-paused { background: #F1F3F7; color: #6B7591; }
.plat { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; padding: 1px 8px; border-radius: 5px; background: #EEF1F8; color: #0E1B3D; font-weight: 500; }

/* tick marks - the evidence vocabulary */
.tick { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; flex: 0 0 18px; }
.tick-verified { background: #1F3FA8; color: #FFFFFF; }
.tick-inferred { border: 1.5px solid #1F3FA8; color: #1F3FA8; background: #FFFFFF; }
.tick-stale { border: 1.5px dashed #A15C00; color: #A15C00; }
.tick-missing, .tick-unknown { background: #EEF1F8; color: #6B7591; }
.tick-fail { background: #B42318; color: #FFFFFF; }
.tick-review { background: #FFF5DD; color: #8A4E00; border: 1.5px solid #E8C26A; }
.evidence { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid #EEF1F6; }
.evidence:last-child { border-bottom: 0; }
.evidence .src { font-size: .8rem; color: #5B6680; }

/* ---------------------------------------------------------------- ledger tables */
.table { color: #1C2640; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .62rem .8rem; border-bottom-color: #E8ECF4; }
.table thead th { color: #5B6680; font-weight: 500; font-size: .84rem; border-bottom: 1px solid #C9D1E2; background: #FAFBFD; }
.table tbody tr:hover { background: #FAFBFE; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.fit { display: inline-block; min-width: 42px; text-align: center; font-weight: 600; border-radius: 6px; padding: 1px 6px; font-size: .9rem; }
.fit-high { background: #1F3FA8; color: #FFFFFF; }
.fit-mid { background: #E7EDFB; color: #1F3FA8; }
.fit-low { background: #F1F3F7; color: #5B6680; }
.fit-none { background: #FFFFFF; color: #8A93AB; border: 1px dashed #C9D1E2; font-weight: 500; }

/* the score ledger: breakdown rows + double-ruled total (the memorable moment) */
.score-ledger { width: 100%; border-collapse: collapse; }
.score-ledger td { padding: 9px 4px; border-bottom: 1px solid #EEF1F6; vertical-align: top; }
.score-ledger td.sig { font-weight: 600; color: #0E1B3D; width: 32%; }
.score-ledger td.ev { color: #3B4766; font-size: .9rem; }
.score-ledger td.pts { text-align: right; font-weight: 600; width: 80px; color: #0E1B3D; }
.score-ledger td.pts.unknown { color: #8A93AB; font-weight: 400; font-style: italic; }
.score-ledger tr.total td { border-bottom: 0; border-top: 1px solid #0E1B3D; padding-top: 12px; }
.score-ledger tr.total td.pts { font-size: 2.1rem; line-height: 1; padding-bottom: 6px; border-bottom: 4px double #0E1B3D; }
.score-figure { font-size: 3.4rem; font-weight: 600; color: #0E1B3D; line-height: 1; letter-spacing: -0.03em; }
.score-figure small { font-size: 1rem; color: #5B6680; font-weight: 400; letter-spacing: 0; }

/* checks column */
.checks .row-check { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #EEF1F6; }
.checks .row-check:last-child { border-bottom: 0; }
.checks .row-check .lbl { font-weight: 600; color: #0E1B3D; }
.checks .row-check .note { font-size: .84rem; color: #3B4766; }
.signoff { background: #FFF8E1; border: 1px solid #F3D893; border-radius: 8px; padding: 10px 12px; font-size: .88rem; color: #6B4600; }

/* sequence stepper (a real sequence, so numbered) */
.steps { display: flex; gap: 0; margin-bottom: 18px; border: 1px solid #DCE2EE; border-radius: 10px; background: #FFFFFF; overflow: hidden; }
.steps .s { flex: 1; padding: 10px 14px; font-weight: 500; color: #5B6680; border-left: 1px solid #E8ECF4; display: flex; gap: 10px; align-items: center; }
.steps .s:first-child { border-left: 0; }
.steps .s .n { width: 22px; height: 22px; border-radius: 50%; background: #EEF1F8; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.steps .s.done .n { background: #1F3FA8; color: #FFFFFF; }
.steps .s.now { color: #0E1B3D; background: #FFF8E1; box-shadow: inset 0 -3px 0 #F2B705; }
.steps .s.now .n { background: #F2B705; color: #0E1B3D; }

/* chips & signal list */
.chip { display: inline-block; padding: 2px 10px; border-radius: 6px; background: #EEF1F8; color: #0E1B3D; font-size: .84rem; margin: 0 4px 4px 0; }
.chip.on { background: #1F3FA8; color: #FFFFFF; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #EEF1F6; font-size: .92rem; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: #5B6680; }
.kv .v { font-weight: 500; text-align: right; }

/* pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.board .col { background: #EEF1F7; border-radius: 10px; padding: 10px; min-height: 240px; }
.board .col h6 { display: flex; justify-content: space-between; margin: 2px 4px 10px; font-size: .9rem; }
.board .tile { background: #FFFFFF; border: 1px solid #DCE2EE; border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; font-size: .88rem; }
.board .tile a { font-weight: 600; text-decoration: none; color: #0E1B3D; }

/* analytics bars (plain, labelled) */
.bar-row { display: grid; grid-template-columns: 170px 1fr 70px; gap: 10px; align-items: center; padding: 5px 0; font-size: .9rem; }
.bar-track { background: #EEF1F7; border-radius: 4px; height: 12px; overflow: hidden; }
.bar-fill { background: #1F3FA8; height: 100%; }
.bar-fill.gold { background: #F2B705; }

/* misc legacy components */
.thumb { width: 100%; max-height: 260px; object-fit: contain; background: #0E1B3D; border-radius: 8px; }
.thumb-sm { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #E8ECF4; }
.counter { font-size: .8rem; color: #5B6680; }
.counter.over { color: #B42318; font-weight: 600; }
.post-box { white-space: pre-wrap; }
.logbox { background: #0E1B3D; color: #DCE3F5; font: .82rem/1.55 'Plex', Consolas, monospace; border-radius: 10px; padding: 14px; max-height: 420px; overflow: auto; white-space: pre-wrap; }
.cal { table-layout: fixed; }
.cal td { height: 118px; vertical-align: top; background: #FFFFFF; border: 1px solid #E3E8F1; padding: 6px; }
.cal td.out { background: #F8F9FC; color: #9AA3BA; }
.cal td.today { box-shadow: inset 0 0 0 2px #F2B705; }
.cal .ev { display: block; font-size: .78rem; padding: 2px 6px; border-radius: 5px; margin-top: 4px; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.agent-card { height: 100%; }
.agent-card:hover { border-color: #1F3FA8; }
.agent-card .ico { width: 40px; height: 40px; border-radius: 9px; background: #EEF1F8; color: #1F3FA8; display: flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 40px; }
textarea.json-edit { font: .82rem/1.5 Consolas, 'Plex', monospace; min-height: 520px; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #0E1B3D; }
.login-card { width: 400px; max-width: 92vw; }
.draft-body { font-size: .96rem; line-height: 1.6; min-height: 300px; }
.prose { max-width: 75ch; }
.empty { padding: 34px; text-align: center; color: #5B6680; }

@media (max-width: 991px) {
  .f50-side { position: fixed; left: -240px; z-index: 50; transition: left .2s; }
  .f50-side.open { left: 0; }
  .f50-content { padding: 18px 16px 60px; }
  .f50-top { padding: 10px 16px; }
  .bar-row { grid-template-columns: 110px 1fr 56px; }
}

/* outcome bars: contacted (light royal) with positive replies (gold) laid over it */
.bar-stack { position: relative; }
.bar-stack .bar-fill { position: absolute; left: 0; top: 0; }
.bar-fill.light { background: #B9C6EC; }
.outcome-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.outcome-legend .sw-c { background: #B9C6EC; }
.outcome-legend .sw-p { background: #F2B705; }
.w-input { max-width: 84px; margin-left: auto; }

/* channels */
.ch-ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid #DCE2EE; }
.kit-banner { width: 100%; border-radius: 8px; border: 1px solid #DCE2EE; display: block; }
.kit-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid #DCE2EE; }
button.chip { border: 0; cursor: pointer; }
button.chip:hover { background: #DCE4F7; }
.checklist-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid #EEF1F6; }
.checklist-row:last-child { border-bottom: 0; }
.checklist-row button.tick { border: 0; cursor: pointer; flex: 0 0 auto; }
.comment-quote { border-left: 3px solid #DCE2EE; padding: 4px 0 4px 12px; color: #1C2640; white-space: pre-wrap; }
.wrap-any { min-width: 0; overflow-wrap: anywhere; }
.score-ledger.weights td.sig { width: auto; } .score-ledger.weights td.pts { width: 130px; }
