:root {
  --ink: #12233f;
  --ink-soft: #506078;
  --paper: #f4f7fb;
  --surface: #ffffff;
  --line: #dce4ef;
  --line-strong: #c7d2df;
  --blue: #2457e6;
  --blue-dark: #173fb8;
  --blue-soft: #eaf0ff;
  --cyan: #00a7a7;
  --cyan-soft: #e2f7f5;
  --amber: #ae6812;
  --amber-soft: #fff2d8;
  --red: #bd3344;
  --red-soft: #ffe9ec;
  --navy: #0c1a31;
  --shadow-sm: 0 1px 2px rgba(20, 38, 69, 0.04), 0 8px 24px rgba(20, 38, 69, 0.05);
  --shadow-lg: 0 28px 70px rgba(6, 19, 40, 0.22);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-width: 264px;
  --font-body: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-data: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; touch-action: manipulation; }
button, [role="button"] { cursor: pointer; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(36, 87, 230, 0.35); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: 12px; transform: translateY(-160%); padding: 10px 16px; background: var(--ink); color: white; border-radius: 8px; text-decoration: none; transition: transform 180ms ease-out; }
.skip-link:focus { transform: translateY(0); }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 24px 16px 16px; background: var(--navy); color: #d7e1ef; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px; }
.brand strong { display: block; color: white; font-size: 16px; letter-spacing: -0.02em; }
.brand small { display: block; margin-top: 1px; color: #8fa2ba; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-mark { position: relative; width: 34px; height: 34px; display: grid; grid-template-columns: repeat(3, 6px); justify-content: center; align-items: end; gap: 3px; padding: 8px 5px; border: 1px solid #39506f; border-radius: 9px; background: #132746; }
.brand-mark span { display: block; width: 6px; border-radius: 2px 2px 0 0; background: #8df0e6; }
.brand-mark span:nth-child(1) { height: 8px; opacity: 0.55; }
.brand-mark span:nth-child(2) { height: 14px; opacity: 0.8; }
.brand-mark span:nth-child(3) { height: 19px; }
.main-nav { display: flex; flex: 1; flex-direction: column; gap: 4px; margin-top: 38px; }
.nav-label { margin: 0 12px 8px; color: #7389a4; font-family: var(--font-data); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.nav-label-secondary { margin-top: 28px; }
.nav-item { position: relative; width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #aab9cd; text-align: left; transition: background 180ms ease, color 180ms ease; }
.nav-item svg { flex: 0 0 19px; width: 19px; height: 19px; }
.nav-item:hover { background: #142947; color: white; }
.nav-item.is-active { background: #183154; color: white; box-shadow: inset 3px 0 #80f0e3; }
.nav-item.is-active svg { color: #80f0e3; }
.nav-count { margin-left: auto; min-width: 24px; padding: 2px 7px; border-radius: 999px; background: #263d5c; color: #c9d7e7; font-family: var(--font-data); font-size: 10px; text-align: center; }
.status-dot { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: #4fd7c6; box-shadow: 0 0 0 4px rgba(79, 215, 198, 0.12); }
.sidebar-footer { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 9px; padding: 16px 4px 0; border-top: 1px solid #253956; }
.company-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #e7edff; color: #254ea8; font-family: var(--font-data); font-size: 11px; font-weight: 500; }
.company-copy { min-width: 0; }
.company-copy strong, .company-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-copy strong { color: #e8eef7; font-size: 12px; }
.company-copy small { color: #7f93ad; font-size: 10px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: inherit; transition: background 180ms ease, color 180ms ease; }
.icon-button:hover { background: rgba(127, 147, 173, 0.14); color: white; }
.icon-button.bordered { border: 1px solid var(--line); color: var(--ink-soft); }
.icon-button.bordered:hover { background: var(--paper); color: var(--ink); }

.main-content { min-height: 100vh; margin-left: var(--sidebar-width); padding: 0 38px 64px; }
.mobile-header { display: none; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 4px; color: #718097; font-family: var(--font-data); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.eyebrow.accent { color: var(--blue); }
.period-selector { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 700; }
.period-selector svg { width: 15px; height: 15px; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.sync-state { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; }
.sync-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }
.primary-button, .secondary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border-radius: 10px; font-size: 13px; font-weight: 700; transition: transform 150ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: white; box-shadow: 0 8px 18px rgba(36, 87, 230, 0.18); }
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); box-shadow: 0 10px 24px rgba(36, 87, 230, 0.25); }
.primary-button:active, .secondary-button:active { transform: scale(0.98); }
.primary-button svg, .secondary-button svg { width: 17px; height: 17px; }
.secondary-button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 38, 69, 0.03); }
.secondary-button:hover { border-color: #a8b7ca; background: #fafdff; }
.secondary-button.compact { min-height: 40px; padding: 0 13px; }

.view { display: none; max-width: 1500px; margin: 0 auto; padding-top: 46px; animation: view-in 260ms ease-out both; }
.view.is-visible { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.page-heading h1 { margin: 0; color: var(--ink); font-size: clamp(32px, 4vw, 52px); line-height: 1.06; letter-spacing: -0.055em; }
.page-heading p:not(.eyebrow) { max-width: 680px; margin: 12px 0 0; color: var(--ink-soft); font-size: 15px; }
.compact-heading { align-items: center; margin-bottom: 28px; }
.compact-heading h1 { font-size: clamp(30px, 3.2vw, 42px); }

.process-rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 24px; padding: 19px 20px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.process-rail::before { content: ""; position: absolute; top: 38px; left: calc(12.5% + 12px); right: calc(12.5% + 12px); height: 2px; background: linear-gradient(90deg, var(--cyan) 0 64%, var(--line) 64% 100%); }
.process-rail li { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.step-index { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); color: #8795a9; font-family: var(--font-data); font-size: 10px; }
.step-index svg { width: 17px; height: 17px; }
.process-rail .is-complete .step-index { border-color: var(--cyan); background: var(--cyan); color: white; }
.process-rail .is-current .step-index { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 5px var(--blue-soft); }
.process-rail strong, .process-rail small { display: block; }
.process-rail strong { font-size: 12px; }
.process-rail small { margin-top: 2px; color: #7b899d; font-size: 10px; }

.metrics-grid { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.metric-card { position: relative; min-height: 204px; padding: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-card-primary { background: var(--ink); color: white; border-color: var(--ink); }
.metric-card-primary::after { content: ""; position: absolute; right: -45px; bottom: -60px; width: 170px; height: 170px; border: 1px solid rgba(141, 240, 230, 0.2); border-radius: 50%; box-shadow: 0 0 0 28px rgba(141, 240, 230, 0.04), 0 0 0 58px rgba(141, 240, 230, 0.025); }
.metric-top { position: relative; z-index: 1; min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.metric-card-primary .metric-top { color: #b9c7da; }
.metric-code { color: #80f0e3; font-family: var(--font-data); font-size: 10px; }
.metric-value { position: relative; z-index: 1; display: block; margin-top: 17px; font-family: var(--font-data); font-size: 42px; line-height: 1; letter-spacing: -0.06em; }
.metric-card p { position: relative; z-index: 1; margin: 10px 0 0; color: #7e8ba0; font-size: 11px; }
.metric-card-primary p { color: #9fb0c7; }
.trend-up { margin-right: 5px; color: #80f0e3; font-family: var(--font-data); }
.mini-bars { position: absolute; z-index: 1; right: 20px; bottom: 20px; left: 20px; height: 35px; display: flex; align-items: end; gap: 6px; }
.mini-bars i { flex: 1; height: var(--bar); display: block; border-radius: 2px 2px 0 0; background: rgba(182, 201, 222, 0.25); }
.mini-bars i:nth-child(1) { --bar: 28%; }
.mini-bars i:nth-child(2) { --bar: 46%; }
.mini-bars i:nth-child(3) { --bar: 39%; }
.mini-bars i:nth-child(4) { --bar: 62%; }
.mini-bars i:nth-child(5) { --bar: 78%; }
.mini-bars i.active { background: #80f0e3; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: 0.035em; white-space: nowrap; text-transform: uppercase; }
.tag-blue { background: var(--blue-soft); color: var(--blue-dark); }
.tag-teal { background: var(--cyan-soft); color: #08766f; }
.tag-amber { background: var(--amber-soft); color: #8b5009; }
.tag-red { background: var(--red-soft); color: #a12838; }
.metric-detail { position: absolute; right: 20px; bottom: 20px; left: 20px; display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.metric-detail span:first-child { color: var(--ink); font-family: var(--font-data); font-size: 13px; font-weight: 500; }
.metric-detail span:last-child { color: #8a97aa; font-size: 10px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 800; }
.metric-card > .text-button { position: absolute; bottom: 22px; left: 21px; }
.text-button span { font-family: var(--font-data); transition: transform 160ms ease; }
.text-button:hover span { transform: translateX(3px); }

.dashboard-grid { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 16px; margin-bottom: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 22px 18px; }
.panel-header h2 { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.25; letter-spacing: -0.025em; }
.comparison-list { border-top: 1px solid var(--line); }
.comparison-list button { width: 100%; min-height: 72px; display: grid; grid-template-columns: 38px 1fr 24px; align-items: center; gap: 13px; padding: 12px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; transition: background 160ms ease; }
.comparison-list button:last-child { border-bottom: 0; }
.comparison-list button:hover { background: #f8fafd; }
.comparison-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; }
.comparison-icon svg { width: 18px; height: 18px; }
.comparison-icon.blue { background: var(--blue-soft); color: var(--blue); }
.comparison-icon.amber { background: var(--amber-soft); color: var(--amber); }
.comparison-icon.teal { background: var(--cyan-soft); color: #078a80; }
.comparison-icon.red { background: var(--red-soft); color: var(--red); }
.comparison-list strong, .comparison-list small { display: block; }
.comparison-list strong { font-size: 12px; }
.comparison-list small { margin-top: 2px; color: #7c899b; font-size: 10px; }
.arrow { justify-self: end; color: #91a0b3; font-family: var(--font-data); transition: transform 160ms ease; }
.comparison-list button:hover .arrow { transform: translateX(3px); color: var(--blue); }
.report-preview { position: relative; overflow: hidden; background: #fbfcff; }
.report-stamp { position: absolute; top: -16px; right: -13px; color: rgba(36, 87, 230, 0.045); font-family: var(--font-data); font-size: 94px; font-weight: 500; letter-spacing: -0.08em; transform: rotate(-5deg); }
.report-header { position: relative; z-index: 1; padding-bottom: 13px; }
.report-note { margin: 0 22px 14px; color: #718097; font-size: 10px; }
.report-values { margin: 0; padding: 0 22px; }
.report-values div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 13px 0; border-top: 1px dashed var(--line-strong); }
.report-values dt { color: #637087; font-size: 10px; }
.report-values dd { margin: 0; color: var(--ink); font-family: var(--font-data); font-size: 13px; font-weight: 500; }
.report-values .pending-value { color: var(--amber); font-family: var(--font-body); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.report-warning { display: flex; align-items: center; gap: 10px; margin: 17px 18px 18px; padding: 12px; border: 1px solid #f0d59e; border-radius: 10px; background: #fff8e9; color: #76501d; font-size: 10px; }
.report-warning svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--amber); }
.report-warning strong { display: block; }

.review-panel { overflow: hidden; }
.table-heading { align-items: center; }
.table-tools { display: flex; align-items: center; gap: 9px; }
.search-box { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: #7d8ba0; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 87, 230, 0.1); }
.search-box svg { width: 16px; height: 16px; }
.search-box input { width: 180px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-box input::placeholder { color: #98a4b5; }
.table-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 13px 18px; text-align: left; }
th { background: #f8fafd; color: #758398; font-family: var(--font-data); font-size: 9px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; }
td { border-top: 1px solid var(--line); color: var(--ink); font-size: 11px; }
tbody tr:first-child td { border-top: 0; }
tbody tr { transition: background 150ms ease; }
tbody tr:hover { background: #fbfcff; }
td strong, td small { display: block; }
td strong { font-size: 11px; }
td small { margin-top: 3px; color: #8390a3; font-family: var(--font-data); font-size: 9px; }
.money { font-family: var(--font-data); font-weight: 500; }
.confidence { display: flex; align-items: center; gap: 8px; }
.confidence > span { width: 58px; height: 5px; overflow: hidden; border-radius: 999px; background: #e9eef5; }
.confidence i { display: block; height: 100%; border-radius: inherit; background: var(--cyan); }
.confidence strong { color: #647288; font-family: var(--font-data); font-size: 9px; }
.confidence.low i { background: var(--amber); }
.row-action { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--blue); font-size: 10px; font-weight: 800; white-space: nowrap; transition: border-color 160ms ease, background 160ms ease; }
.row-action:hover { border-color: #aebdd0; background: #f6f9ff; }
.table-empty { padding: 40px; color: var(--ink-soft); text-align: center; }
.panel-footer { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px; border-top: 1px solid var(--line); color: #7e8b9d; font-size: 10px; }

.upload-hero { min-height: 180px; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 24px; padding: 28px; border: 1px dashed #a7b7cc; border-radius: var(--radius-md); background: linear-gradient(135deg, #fafdff, #eef4ff); transition: border-color 180ms ease, background 180ms ease; }
.upload-hero.is-dragging, .modal-dropzone.is-dragging { border-color: var(--blue); background: var(--blue-soft); }
.upload-art { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 18px; background: var(--blue); color: white; box-shadow: 0 12px 28px rgba(36, 87, 230, 0.24); }
.upload-art svg { width: 28px; height: 28px; }
.upload-hero h2 { margin: 0; font-size: 20px; }
.upload-hero p { margin: 5px 0 0; color: var(--ink-soft); }
.history-list { display: grid; gap: 10px; margin-top: 24px; }
.history-row { display: grid; grid-template-columns: 42px 1fr auto 72px; align-items: center; gap: 14px; min-height: 74px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.history-row.featured { border-left: 4px solid var(--blue); }
.file-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #e1f4e9; color: #177445; font-family: var(--font-data); font-size: 10px; font-weight: 500; }
.history-row strong, .history-row small { display: block; }
.history-row strong { font-size: 12px; }
.history-row small { margin-top: 3px; color: #7e8b9e; font-size: 10px; }

.placeholder-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.placeholder-metric { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.placeholder-metric span, .placeholder-metric small { display: block; }
.placeholder-metric span { color: var(--ink-soft); font-size: 11px; }
.placeholder-metric strong { display: block; margin: 10px 0; font-family: var(--font-data); font-size: 32px; }
.placeholder-metric small { color: #8794a6; }
.client-card { display: grid; grid-template-columns: minmax(260px, 0.7fr) 1.3fr; gap: 40px; padding: 30px; }
.client-identity { display: flex; gap: 16px; align-items: center; }
.client-avatar { flex: 0 0 62px; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--blue-soft); color: var(--blue); font-family: var(--font-data); font-size: 18px; }
.client-identity h2 { margin: 0 0 5px; font-size: 19px; }
.mono { color: #718097; font-family: var(--font-data); font-size: 10px; }
.contract-timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 16px; }
.contract-timeline::before { content: ""; position: absolute; top: 25px; left: 8%; right: 8%; height: 2px; background: var(--line-strong); }
.timeline-event { position: relative; padding-top: 30px; }
.timeline-event > span { position: absolute; z-index: 1; top: 4px; left: 0; width: 12px; height: 12px; border: 3px solid var(--surface); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px var(--cyan); }
.timeline-event.active > span { background: var(--amber); box-shadow: 0 0 0 2px var(--amber); }
.timeline-event small, .timeline-event strong { display: block; }
.timeline-event small { color: #8390a3; font-family: var(--font-data); font-size: 9px; }
.timeline-event strong { margin-top: 5px; font-size: 12px; }
.timeline-event p { margin: 3px 0 0; color: var(--ink-soft); font-size: 10px; }

.client-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.client-summary-grid article { min-height: 100px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.summary-symbol { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; }
.summary-symbol svg { width: 19px; height: 19px; }
.summary-symbol.blue { background: var(--blue-soft); color: var(--blue); }
.summary-symbol.teal { background: var(--cyan-soft); color: #078a80; }
.summary-symbol.amber { background: var(--amber-soft); color: var(--amber); }
.summary-symbol.red { background: var(--red-soft); color: var(--red); }
.client-summary-grid small, .client-summary-grid strong, .client-summary-grid article div > span { display: block; }
.client-summary-grid small { color: #6d7c92; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.client-summary-grid strong { margin: 3px 0 1px; font-family: var(--font-data); font-size: 23px; line-height: 1; }
.client-summary-grid article div > span { color: #8895a7; font-size: 9px; }
.client-registry { overflow: hidden; }
.client-toolbar { display: flex; align-items: end; gap: 16px; padding: 18px 20px 15px; }
.client-search { flex: 1 1 340px; height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: #78869a; }
.client-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 87, 230, 0.1); }
.client-search svg { flex: 0 0 17px; width: 17px; height: 17px; }
.client-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.client-search input::placeholder { color: #929fb1; }
.client-search kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: #f5f7fa; color: #8794a6; font-family: var(--font-data); font-size: 8px; }
.filter-fields { display: flex; align-items: end; gap: 8px; }
.filter-fields label { display: grid; gap: 5px; }
.filter-fields label > span { color: #7b889b; font-size: 8px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.filter-fields select { min-width: 134px; height: 44px; padding: 0 34px 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); font-size: 10px; }
.clear-filters { min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 800; }
.clear-filters:hover { text-decoration: underline; }
.active-filter-row { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; border-top: 1px solid var(--line); background: #f9fbfd; color: #7d8a9d; font-size: 9px; }
.result-count strong { color: var(--ink); font-family: var(--font-data); }
.source-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: white; font-family: var(--font-data); font-size: 8px; }
.source-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.client-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.client-table { min-width: 1240px; }
.client-table th { padding: 11px 14px; }
.client-table th button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.client-table th button:hover { color: var(--blue); }
.client-table th button span { color: #9aa6b6; font-family: var(--font-data); }
.client-table td { height: 68px; padding: 10px 14px; }
.client-table tbody tr { cursor: pointer; }
.client-table tbody tr:hover { background: #f7faff; box-shadow: inset 3px 0 var(--blue); }
.client-cell { display: flex; align-items: center; gap: 10px; min-width: 244px; }
.client-mini-avatar { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #e9efff; color: #2954be; font-family: var(--font-data); font-size: 9px; font-weight: 500; }
.client-mini-avatar.issue { background: var(--red-soft); color: var(--red); }
.client-cell strong { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main { display: block; white-space: nowrap; }
.status-copy { position: relative; padding-left: 10px; font-family: var(--font-body); }
.status-copy::before { content: ""; position: absolute; top: 50%; left: 0; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); }
.status-copy.active { color: #08766f; }
.status-copy.active::before { background: var(--cyan); }
.status-copy.review { color: #8b5009; }
.status-copy.review::before { background: #d99024; }
.status-copy.issue { color: #a12838; }
.status-copy.issue::before { background: var(--red); }
.quality { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 9px; font-weight: 700; }
.quality i { width: 6px; height: 6px; border-radius: 50%; }
.quality.good { color: #08766f; }
.quality.good i { background: var(--cyan); }
.quality.issue { color: #a12838; }
.quality.issue i { background: var(--red); }
.client-open-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--blue); transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.client-open-button svg { width: 16px; height: 16px; }
.client-open-button:hover { border-color: #aebdd0; background: var(--blue-soft); transform: translateX(2px); }
.clients-empty { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #7f8da0; text-align: center; }
.clients-empty svg { width: 30px; height: 30px; margin-bottom: 12px; color: #9ba7b7; }
.clients-empty strong { color: var(--ink); font-size: 13px; }
.clients-empty span { margin-top: 4px; font-size: 10px; }
.registry-footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 18px; border-top: 1px solid var(--line); color: #7f8c9f; font-size: 9px; }
.registry-footer > div strong { color: var(--ink); font-family: var(--font-data); }
.registry-footer > div span { color: #9aa6b5; }
.registry-footer nav { display: flex; align-items: center; gap: 5px; }
.registry-footer nav button { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #66758b; font-family: var(--font-data); font-size: 9px; }
.registry-footer nav button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.registry-footer nav button.is-current { border-color: var(--blue); background: var(--blue); color: white; }
.registry-footer nav button:disabled { cursor: not-allowed; opacity: 0.4; }
.registry-footer nav span { padding: 0 4px; }

.client-drawer-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(7, 18, 36, 0.46); backdrop-filter: blur(2px); animation: fade-in 180ms ease-out; }
.client-drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(560px, 94vw); display: flex; flex-direction: column; background: var(--paper); box-shadow: -24px 0 70px rgba(6, 19, 40, 0.24); transform: translateX(105%); visibility: hidden; transition: transform 260ms ease-out, visibility 260ms; }
.client-drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer-header { position: relative; padding: 28px 28px 20px; border-bottom: 1px solid var(--line); background: white; }
.drawer-handle { display: none; }
.drawer-close { position: absolute; top: 18px; right: 18px; color: var(--ink-soft); }
.drawer-identity { display: flex; align-items: center; gap: 14px; padding-right: 38px; }
.drawer-avatar { flex: 0 0 54px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: var(--blue-soft); color: var(--blue); font-family: var(--font-data); font-size: 15px; font-weight: 500; }
.drawer-identity h2 { margin: 0 0 3px; font-size: 18px; line-height: 1.2; letter-spacing: -0.025em; }
.drawer-status-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.drawer-status-line > span:last-child { display: inline-flex; align-items: center; gap: 7px; color: #7e8b9d; font-size: 9px; }
.drawer-status-line > span:last-child i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer-section { margin-bottom: 12px; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 1px 2px rgba(20, 38, 69, 0.03); }
.drawer-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.drawer-section-heading h3 { margin: 0; font-size: 13px; }
.drawer-section-heading > span { color: #8b97a9; font-family: var(--font-data); font-size: 8px; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px; margin: 0; }
.detail-grid div { min-width: 0; }
.detail-grid dt { color: #8390a3; font-size: 8px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.detail-grid dd { margin: 4px 0 0; color: var(--ink); font-family: var(--font-data); font-size: 10px; }
.credit-amount-block { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc; }
.credit-amount-block > div { padding: 14px; }
.credit-amount-block > div + div { border-left: 1px solid var(--line); }
.credit-amount-block small, .credit-amount-block strong { display: block; }
.credit-amount-block small { color: #7e8c9e; font-size: 8px; text-transform: uppercase; }
.credit-amount-block strong { margin-top: 5px; font-family: var(--font-data); font-size: 17px; }
.detail-grid.financial { padding-bottom: 16px; }
.missing-data-note { display: flex; gap: 10px; padding: 11px; border: 1px solid #f0d59e; border-radius: 9px; background: #fff8e9; color: #76501d; }
.missing-data-note svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--amber); }
.missing-data-note strong, .missing-data-note span { display: block; }
.missing-data-note strong { font-size: 9px; }
.missing-data-note span { margin-top: 2px; font-size: 8px; }
.client-history { position: relative; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.client-history::before { content: ""; position: absolute; top: 13px; bottom: 13px; left: 6px; width: 1px; background: var(--line-strong); }
.client-history li { position: relative; display: grid; grid-template-columns: 14px 1fr auto; align-items: start; gap: 10px; }
.client-history li > span:first-child { z-index: 1; width: 13px; height: 13px; margin-top: 3px; border: 3px solid white; border-radius: 50%; background: #9ba8b9; box-shadow: 0 0 0 1px #9ba8b9; }
.client-history li.current > span:first-child { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.client-history small, .client-history strong { display: block; }
.client-history small { color: #8693a5; font-family: var(--font-data); font-size: 8px; }
.client-history strong { margin-top: 3px; font-size: 10px; }
.client-history p { margin: 2px 0 0; color: #768499; font-size: 8px; }
.source-file-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; }
.source-file-row strong, .source-file-row small { display: block; }
.source-file-row strong { font-size: 10px; }
.source-file-row small { margin-top: 2px; color: #8794a6; font-family: var(--font-data); font-size: 8px; }
.source-file-row button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--blue); font-size: 9px; font-weight: 800; }
.drawer-footer { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--line); background: white; }
.drawer-footer button { width: 100%; }
body.drawer-open { overflow: hidden; }

.reco-form { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.reco-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); background: var(--ink); color: white; }
.reco-heading span:not(.tag), .reco-heading strong { display: block; }
.reco-heading span:not(.tag) { color: #9fb0c7; font-family: var(--font-data); font-size: 10px; text-transform: uppercase; }
.reco-heading strong { margin-top: 4px; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 30px; }
.form-grid label > span { display: block; margin-bottom: 7px; color: #607087; font-size: 11px; font-weight: 700; }
.form-grid input { width: 100%; height: 47px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: #f9fbfd; color: var(--ink); font-family: var(--font-data); font-size: 12px; }
.money-input { position: relative; }
.money-input > span { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: #7e8b9d; font-family: var(--font-data); }
.money-input input { padding-left: 32px; }
.money-input.is-pending input { color: var(--amber); font-family: var(--font-body); font-size: 11px; font-weight: 700; }
.reco-audit { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 30px; border-top: 1px solid var(--line); background: #f8fafd; }
.reco-audit > div { display: flex; align-items: center; gap: 12px; }
.reco-audit svg { width: 28px; height: 28px; color: var(--cyan); }
.reco-audit strong, .reco-audit small { display: block; }
.reco-audit strong { font-size: 12px; }
.reco-audit small { margin-top: 3px; color: #7e8b9d; font-size: 10px; }
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rule-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.rule-number { color: var(--blue); font-family: var(--font-data); font-size: 10px; }
.rule-card h2 { margin: 13px 0 7px; font-size: 18px; }
.rule-card p { margin: 0 0 20px; color: var(--ink-soft); }
.rule-card code { display: block; padding: 11px 13px; border-radius: 8px; background: #f0f4f9; color: #40516b; font-family: var(--font-data); font-size: 10px; }

.modal-backdrop, .processing-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(7, 18, 36, 0.62); backdrop-filter: blur(4px); animation: fade-in 180ms ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { position: relative; width: min(540px, 100%); padding: 34px; border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-lg); animation: modal-in 260ms ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-close { position: absolute; top: 16px; right: 16px; color: var(--ink-soft); }
.modal-kicker { display: flex; align-items: center; gap: 8px; color: var(--blue); font-family: var(--font-data); font-size: 10px; text-transform: uppercase; }
.modal-kicker span { width: 18px; height: 2px; background: var(--blue); }
.modal h2 { max-width: 430px; margin: 14px 0 8px; font-size: 28px; line-height: 1.15; letter-spacing: -0.04em; }
.modal > p { margin: 0 0 22px; color: var(--ink-soft); font-size: 12px; }
.modal-dropzone { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; border: 1px dashed #9fb1c8; border-radius: 14px; background: #f8fafd; text-align: center; transition: border-color 180ms ease, background 180ms ease; }
.modal-dropzone > svg { width: 30px; height: 30px; margin-bottom: 6px; color: var(--blue); }
.modal-dropzone strong { font-size: 13px; }
.modal-dropzone > span { color: #8090a5; font-size: 10px; }
.modal-dropzone .secondary-button { margin-top: 10px; }
.demo-file-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 12px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 800; }
.demo-file-button span { color: #61718a; font-family: var(--font-data); font-size: 9px; font-weight: 400; }
.file-error { margin: 12px 0 0 !important; padding: 10px 12px; border-radius: 8px; background: var(--red-soft); color: var(--red) !important; }

.processing-card { width: min(520px, 100%); padding: 28px; border-radius: 20px; background: white; box-shadow: var(--shadow-lg); }
.processing-head { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 12px; }
.processing-file { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: #e1f4e9; color: #177445; font-family: var(--font-data); font-size: 10px; font-weight: 500; }
.processing-head small, .processing-head strong { display: block; }
.processing-head small { color: #7d8a9d; font-size: 9px; text-transform: uppercase; }
.processing-head strong { margin-top: 3px; font-size: 12px; }
#processingPercent { color: var(--blue); font-family: var(--font-data); font-size: 15px; }
.progress-track { height: 7px; overflow: hidden; margin: 20px 0; border-radius: 999px; background: #e8edf4; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width 260ms ease-out; }
.processing-steps { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.processing-steps li { display: flex; align-items: center; gap: 9px; color: #8794a6; font-size: 10px; transition: color 180ms ease; }
.processing-steps li span { width: 8px; height: 8px; border: 1px solid #aeb9c8; border-radius: 50%; }
.processing-steps li.is-active { color: var(--blue); font-weight: 700; }
.processing-steps li.is-active span { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.processing-steps li.is-complete { color: var(--ink); }
.processing-steps li.is-complete span { border-color: var(--cyan); background: var(--cyan); }
.toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; min-width: min(390px, calc(100vw - 48px)); display: flex; align-items: center; gap: 12px; padding: 15px 17px; border-radius: 13px; background: var(--ink); color: white; box-shadow: var(--shadow-lg); animation: toast-in 280ms ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.toast svg { flex: 0 0 24px; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--cyan); }
.toast strong, .toast small { display: block; }
.toast strong { font-size: 12px; }
.toast small { margin-top: 2px; color: #b8c5d6; font-size: 10px; }

@media (max-width: 1180px) {
  .main-content { padding-right: 24px; padding-left: 24px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .process-rail li { align-items: flex-start; flex-direction: column; }
  .process-rail::before { top: 38px; }
  .client-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .client-toolbar { align-items: stretch; flex-direction: column; }
  .client-search { width: 100%; flex: 0 0 44px; }
  .filter-fields { flex-wrap: wrap; }
  .filter-fields label { flex: 1 1 150px; }
  .filter-fields select { width: 100%; }
}

@media (max-width: 820px) {
  .sidebar { width: min(304px, 86vw); transform: translateX(-105%); transition: transform 220ms ease-out; box-shadow: var(--shadow-lg); }
  body.menu-open .sidebar { transform: translateX(0); }
  body.menu-open::after { content: ""; position: fixed; z-index: 30; inset: 0; background: rgba(7, 18, 36, 0.52); }
  .mobile-header { position: sticky; z-index: 25; top: 0; height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(244, 247, 251, 0.94); backdrop-filter: blur(10px); }
  .mobile-header .brand { padding: 0; }
  .mobile-header .brand strong { color: var(--ink); }
  .mobile-header .brand-mark { width: 32px; height: 32px; }
  .main-content { margin-left: 0; padding: 0 16px 48px; }
  .topbar { height: 68px; }
  .sync-state { display: none; }
  .view { padding-top: 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .primary-button { width: 100%; }
  .process-rail { grid-template-columns: repeat(4, minmax(150px, 1fr)); overflow-x: auto; }
  .process-rail::before { display: none; }
  .metrics-grid, .placeholder-board { grid-template-columns: repeat(2, 1fr); }
  .client-card { grid-template-columns: 1fr; }
  .upload-hero { grid-template-columns: 60px 1fr; }
  .upload-hero .primary-button { grid-column: 1 / -1; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .client-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .client-search kbd { display: none; }
  .client-drawer { width: 100%; top: 8vh; border-radius: 20px 20px 0 0; }
  .drawer-handle { width: 42px; height: 4px; display: block; margin: -15px auto 18px; border-radius: 999px; background: var(--line-strong); }
}

@media (max-width: 560px) {
  .topbar-actions .secondary-button { width: 44px; padding: 0; }
  .topbar-actions .secondary-button { font-size: 18px; }
  .topbar-actions .secondary-button .button-label { display: none; }
  .topbar-actions .secondary-button svg { width: 19px; height: 19px; }
  .metrics-grid, .placeholder-board, .rules-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 178px; }
  .table-heading { align-items: flex-start; flex-direction: column; }
  .table-tools { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .panel-footer { align-items: flex-start; flex-direction: column; padding-top: 14px; padding-bottom: 14px; }
  .history-row { grid-template-columns: 42px 1fr auto; }
  .history-row .tag { grid-column: 2; justify-self: start; }
  .history-row .row-action { grid-column: 3; grid-row: 1 / span 2; }
  .upload-hero { grid-template-columns: 1fr; text-align: center; }
  .upload-art { margin: auto; }
  .client-card { padding: 20px; }
  .client-identity { align-items: flex-start; }
  .contract-timeline { grid-template-columns: 1fr; gap: 22px; padding-left: 20px; }
  .contract-timeline::before { top: 18px; bottom: 20px; left: 25px; width: 2px; height: auto; }
  .timeline-event { padding: 0 0 0 28px; }
  .timeline-event > span { top: 5px; left: 0; }
  .reco-heading, .reco-audit { align-items: flex-start; flex-direction: column; }
  .modal { padding: 28px 20px 20px; }
  .modal h2 { font-size: 24px; }
  .demo-file-button { align-items: flex-start; flex-direction: column; padding-top: 10px; padding-bottom: 10px; }
  .client-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .client-summary-grid article { min-height: 88px; padding: 12px; }
  .summary-symbol { width: 34px; height: 34px; flex-basis: 34px; }
  .client-toolbar { padding: 14px; }
  .filter-fields { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-fields label:last-of-type { grid-column: 1 / -1; }
  .clear-filters { grid-column: 1 / -1; }
  .active-filter-row { align-items: flex-start; flex-direction: column; padding-top: 10px; padding-bottom: 10px; }
  .registry-footer { align-items: flex-start; flex-direction: column; padding-top: 12px; padding-bottom: 12px; }
  .registry-footer > div span { display: block; margin-top: 3px; }
  .registry-footer nav { width: 100%; justify-content: space-between; }
  .registry-footer nav button:nth-of-type(4), .registry-footer nav span { display: none; }
  .drawer-header { padding: 22px 18px 16px; }
  .drawer-identity { align-items: flex-start; }
  .drawer-status-line { align-items: flex-start; flex-direction: column; }
  .drawer-body { padding: 10px; }
  .drawer-section { padding: 15px; }
  .drawer-footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Functional application layer */
select, textarea { font: inherit; }
select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(36, 87, 230, 0.35); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: 0.52; }
body.modal-open { overflow: hidden; }
.nav-icon { width: 20px; flex: 0 0 20px; color: currentColor; font-family: var(--font-data); font-size: 16px; text-align: center; }
.privacy-light { width: 10px; height: 10px; justify-self: center; border-radius: 50%; background: #4fd7c6; box-shadow: 0 0 0 5px rgba(79, 215, 198, 0.12); }
.period-control { display: grid; gap: 3px; }
.period-control select { min-width: 175px; height: 34px; padding: 0 28px 0 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 800; }
.sync-state { white-space: nowrap; }
.privacy-banner { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 13px; margin: -12px 0 22px; padding: 14px 17px; border: 1px solid #b9e5df; border-radius: 13px; background: linear-gradient(100deg, #f2fcfa, #f9fffe); }
.privacy-banner strong, .privacy-banner small { display: block; }
.privacy-banner strong { font-size: 11px; }
.privacy-banner small { margin-top: 2px; color: #607b79; font-size: 9px; }
.privacy-shield { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--cyan-soft); color: #067f77; font-family: var(--font-data); font-weight: 700; }
.comparison-icon.new { background: var(--blue-soft); color: var(--blue); }
.comparison-icon.renewal, .comparison-icon.removed { background: var(--amber-soft); color: var(--amber); }
.comparison-icon.issue { background: var(--red-soft); color: var(--red); }
.full-button { width: calc(100% - 44px); margin: 10px 22px 22px; }
.report-list { margin: 0 22px 12px; }
.report-list div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.report-list dt { color: #65748a; font-size: 10px; }
.report-list dd { margin: 0; font-family: var(--font-data); font-size: 11px; font-weight: 500; text-align: right; }
.table-empty strong, .table-empty span { display: block; }
.table-empty span { margin-top: 4px; font-size: 10px; }
.upload-table { min-width: 860px; }
.table-actions { display: flex; align-items: center; gap: 14px; }
.delete-link { padding: 0; border: 0; background: transparent; color: var(--red); font-size: 9px; font-weight: 800; }
.delete-link:hover { text-decoration: underline; }
.client-summary-grid article { min-height: 104px; display: grid; grid-template-columns: 1fr; align-content: center; gap: 2px; }
.client-summary-grid article > small, .client-summary-grid article > strong, .client-summary-grid article > span { display: block; }
.client-summary-grid article > small { color: #6d7c92; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.client-summary-grid article > strong { margin: 4px 0 2px; font-family: var(--font-data); font-size: 25px; line-height: 1; }
.client-summary-grid article > span { color: #8895a7; font-size: 9px; }
.client-search > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.client-filters { display: flex; align-items: end; gap: 8px; }
.client-filters label { display: grid; gap: 5px; }
.client-filters label > span { color: #7b889b; font-size: 8px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.client-filters select { min-width: 142px; height: 44px; padding: 0 32px 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: var(--ink); font-size: 10px; }
.clear-button { min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 800; }
.clear-button:hover { text-decoration: underline; }
.registry-meta { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; border-top: 1px solid var(--line); background: #f9fbfd; color: #7d8a9d; font-size: 9px; }
.registry-meta strong { color: var(--ink); font-family: var(--font-data); }
.registry-meta > span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: white; font-family: var(--font-data); }
.client-open-button { font-family: var(--font-data); font-weight: 700; }
.button-row { display: flex; gap: 10px; }
.calculation-note { margin: 0 30px 24px; padding: 16px 18px; border-left: 4px solid var(--amber); border-radius: 0 10px 10px 0; background: #fff8e9; }
.calculation-note strong { display: block; color: #76501d; font-size: 11px; }
.calculation-note p { margin: 4px 0 0; color: #836539; font-size: 10px; }
.settings-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 16px; margin-top: 16px; }
.settings-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 22px 22px; }
.settings-fields label { display: grid; gap: 6px; }
.settings-fields label > span { color: #607087; font-size: 10px; font-weight: 700; }
.settings-fields input, .settings-fields select, .month-field input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: var(--ink); }
.settings-actions { display: flex; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); background: #f8fafd; }
.privacy-panel { padding: 25px; background: linear-gradient(145deg, #10213c, #172e50); color: white; }
.privacy-panel h2 { margin: 12px 0 8px; font-size: 20px; }
.privacy-panel p:not(.eyebrow) { margin: 0 0 24px; color: #b8c6d8; font-size: 11px; }
.danger-button { min-height: 44px; padding: 0 15px; border: 1px solid #e8a7af; border-radius: 10px; background: white; color: #aa293a; font-size: 11px; font-weight: 800; }
.danger-button:hover { border-color: var(--red); background: var(--red-soft); }
.danger-button.solid { border-color: var(--red); background: var(--red); color: white; }
.privacy-panel .danger-button { border-color: #6f4560; background: rgba(255,255,255,0.05); color: #ffb9c1; }
.month-field { display: grid; gap: 6px; margin-bottom: 14px; }
.month-field > span { color: #607087; font-size: 10px; font-weight: 700; }
.upload-glyph { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 12px; background: var(--blue-soft); color: var(--blue) !important; font-family: var(--font-data); font-size: 20px !important; }
.modal-dropzone > small { margin-top: 6px; color: #627187; font-family: var(--font-data); font-size: 9px; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.confirm-card { width: min(420px, 100%); padding: 30px; border-radius: 20px; background: white; box-shadow: var(--shadow-lg); text-align: center; }
.confirm-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 14px; background: var(--red-soft); color: var(--red); font-family: var(--font-data); font-size: 20px; font-weight: 700; }
.confirm-card h2 { margin: 0; font-size: 22px; }
.confirm-card p { margin: 9px 0 22px; color: var(--ink-soft); font-size: 11px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.toast-check { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 26px; border-radius: 50%; background: var(--cyan); font-family: var(--font-data); }
.missing-data-note { flex-direction: column; }
.status-dot.is-warning { background: #e3a13d; box-shadow: 0 0 0 4px rgba(227, 161, 61, 0.14); }
.noscript { position: fixed; z-index: 200; inset: auto 20px 20px; padding: 14px; border-radius: 10px; background: var(--red); color: white; text-align: center; }

@media (max-width: 1180px) {
  .client-filters { flex-wrap: wrap; }
  .client-filters label { flex: 1 1 150px; }
  .client-filters select { width: 100%; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .privacy-banner { margin-top: 0; }
  .page-heading .button-row { width: 100%; }
  .page-heading .button-row button { flex: 1; }
  .settings-fields { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar-actions .secondary-button { font-size: 18px; }
  .privacy-banner { grid-template-columns: 34px 1fr; }
  .privacy-banner .tag { grid-column: 2; justify-self: start; }
  .client-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .client-filters label:last-of-type, .client-filters .clear-button { grid-column: 1 / -1; }
  .registry-meta { align-items: flex-start; flex-direction: column; padding-top: 10px; padding-bottom: 10px; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .modal-actions .primary-button { width: 100%; }
  .button-row { flex-direction: column; }
  .calculation-note { margin-right: 18px; margin-left: 18px; }
  .confirm-actions { grid-template-columns: 1fr; }
}
