:root {
  color-scheme: light;
  font: 16px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --ink: #14233d;
  --muted: #586b87;
  --faint: #7788a0;
  --blue: #165fd8;
  --blue-strong: #1252c1;
  --blue-soft: #eaf3ff;
  --orange: #c45317;
  --orange-soft: #fff0e5;
  --paper: #fff;
  --page: #f2f6fc;
  --line: #e0e8f4;
  --shadow: 0 1px 2px #203c640a, 0 4px 14px #203c6407;
  --navy: #112b50;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button[disabled] { cursor: default; opacity: .6; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #85b6ff; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
svg { display: block; flex: none; }

.shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.workspace-loading { grid-column: 1 / -1; display: grid; justify-items: start; align-content: center; justify-self: center; gap: 12px; padding: 24px; }
.workspace-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block: 12px; }
.workspace-tools h2 { font-size: 1rem; }
.workspace-tools p { margin-top: 3px; color: var(--muted); font-size: .85rem; }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-consent { display: flex; align-items: start; gap: 8px; margin-block: 12px; color: var(--muted); }
.workspace-consent input { flex: none; margin-top: 4px; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 4; overflow: auto;
  display: flex; flex-direction: column; padding: 20px 14px 14px;
  background: radial-gradient(ellipse at 20% 0, #214675, transparent 55%), #102744; color: #f7fbff;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; }
.brand img { width: 42px; height: 42px; box-shadow: 0 4px 12px #286fff47; border-radius: 12px; }
.brand strong { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.06em; line-height: 1.1; }
.brand small { color: #bdd0ec; font-size: .78rem; }
.sidebar-brand { display: flex; align-items: center; gap: 5px; justify-content: space-between; }
.sidebar .cabinet-brand { min-width: 0; padding: 0; flex: 1; text-decoration: none; color: inherit; }
.sidebar .cabinet-brand img { width: 38px; height: 38px; flex: none; }
.sidebar-toggle { display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 1px solid #a7c9f04d; border-radius: 8px; color: #c9def9; background: #dbe9ff0d; }
.sidebar-toggle:hover { background: #dbe9ff22; color: #fff; }
.sidebar-import { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; flex: none; margin-top: 22px;
  border: 1px solid #ffd0aa; border-radius: 11px; background: #ffc89b; color: #362234; font-weight: 720; font-size: .89rem; }
.sidebar-import:hover { background: #ffe0c7; }
.menu { display: grid; gap: 5px; margin-top: 22px; }
.nav-caption { padding: 1px 11px 4px; color: #afc8e8; font-size: .73rem; font-weight: 680; }
.menu-button {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 45px; padding: 9px 12px;
  color: #d7e5f8; border: 1px solid transparent; border-radius: 11px; background: transparent; text-align: left;
  font-size: .9rem; font-weight: 630;
}
.menu-button > svg { color: #a7c7f2; }
.menu-button:hover { color: #fff; background: #ffffff11; }
.menu-button[aria-current=page] { background: #28558d; border-color: #83b2ed4a; color: #fff; }
.menu-button[aria-current=page]::before { position: absolute; inset: 11px auto 11px 0; width: 3px; border-radius: 3px; background: #ffab72; content: ""; }
.nav-count { margin-left: auto; padding: 1px 6px; min-width: 21px; border-radius: 6px; background: #ffc59b; color: #722a05; font-size: .75rem; font-variant-numeric: tabular-nums; text-align: center; }
.sidebar-bottom { display: grid; gap: 3px; margin-top: auto; padding-top: 12px; border-top: 1px solid #a9c5e62b; }
.sidebar-plan { display: flex; align-items: center; flex: none; gap: 9px; margin-top: 11px; padding: 9px; border: 1px solid #86ace550; border-radius: 11px;
  color: #f3f8ff; background: linear-gradient(125deg, #244a79, #1b375c); text-decoration: none; }
.sidebar-plan:hover { border-color: #9cbdeb; }
.sidebar-plan-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: #ffcb9e; color: #673215; }
.sidebar-plan-copy { display: grid; gap: 2px; line-height: 1.2; }
.sidebar-plan-copy strong { font-size: .81rem; }
.sidebar-plan-copy strong span { color: #c6daf5; font-weight: 600; }
.sidebar-plan-copy small { color: #d8e7fb; font-size: .69rem; white-space: nowrap; }
.sidebar-plan-arrow { margin-left: auto; color: #b0c8e7; }
.menu-mobile-text { display: none; }
@media (min-width: 921px) {
  .shell.sidebar-compact { grid-template-columns: 69px minmax(0, 1fr); }
  .sidebar-compact .sidebar { padding-inline: 10px; }
  .sidebar-compact .sidebar-brand { flex-direction: column; gap: 10px; }
  .sidebar-compact .sidebar-import { margin-top: 12px; }
  .sidebar-compact .brand-text, .sidebar-compact .menu-text, .sidebar-compact .nav-caption,
  .sidebar-compact .sidebar-import span { display: none; }
  .sidebar-compact .menu-button { justify-content: center; padding-inline: 8px; }
  .sidebar-compact .nav-count { position: absolute; top: 1px; right: 1px; margin: 0; min-width: 14px; padding: 0 3px; font-size: .65rem; }
  .sidebar-compact .sidebar-plan { justify-content: center; padding-inline: 0; }
  .sidebar-compact .sidebar-plan-copy, .sidebar-compact .sidebar-plan-arrow { display: none; }
}
.work { min-width: 0; }
.topbar { min-height: 66px; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 31px; }
.crumb, .account, .account-meta, .toolbar, .section-head, .legend, .pagination { display: flex; align-items: center; gap: 10px; }
.crumb { min-width: 0; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.crumb strong { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.crumb .divider { color: #96a7bc; }
.mobile-brand { display: none; }
.account { gap: 14px; }
.header-actions { display: flex; align-items: center; gap: 5px; }
.header-action { width: 37px; height: 37px; color: #355a86; }
.notification-trigger { position: relative; }
.notification-count {
  position: absolute; min-width: 17px; height: 17px; right: -2px; top: -2px; display: grid; place-items: center;
  border-radius: 10px; padding: 0 3px; background: #a64113; color: #fff; border: 1px solid #fff; font-size: .66rem; line-height: 1; font-weight: 750;
}
.account-meta { gap: 9px; text-align: left; }
.account-meta strong { display: block; font-size: .88rem; line-height: 1.25; }
.account-meta small { color: var(--muted); font-size: .75rem; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; background: #e8f2ff; color: #225dc0; border: 1px solid #d5e7ff; border-radius: 11px; font-size: .9rem; font-weight: 750; }
.mode { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dce8fb; background: #f6faff; border-radius: 20px; padding: 5px 10px; color: #395e91; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.mode i { width: 6px; height: 6px; border-radius: 50%; background: #2c7df5; }
.content { max-width: 1550px; margin: 0 auto; padding: 24px 30px 32px; }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.hero h1 { font-size: clamp(1.85rem, 3vw, 2.55rem); font-weight: 760; letter-spacing: -.056em; line-height: 1.08; }
.hero p { color: var(--muted); margin-top: 8px; }
.guide-banner {
  display: flex; align-items: center; gap: 12px; margin-bottom: 15px; padding: 12px 14px;
  background: linear-gradient(105deg, #e8f3ff, #f7fbff); border: 1px solid #c8dfff; border-radius: 13px;
}
.guide-banner h2 { font-size: 1rem; letter-spacing: -.016em; }
.guide-banner p { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.guide-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; color: #195fc0; background: #d9ebff; }
.guide-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.guide-actions > .button { min-height: 36px; }
.toolbar { gap: 9px; flex-wrap: wrap; flex: none; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 13px; min-height: 42px;
  border: 1px solid transparent; border-radius: 9px; font-size: .865rem; line-height: 1.2; font-weight: 700;
  text-decoration: none; color: var(--ink); white-space: nowrap; background: transparent;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 3px 6px #1264e32c; }
.button.primary:hover { background: var(--blue-strong); border-color: var(--blue-strong); }
.button.secondary { background: #fff; color: #263a58; border-color: #dbe5f0; box-shadow: 0 1px 2px #23467009; }
.button.secondary:hover { background: #f4f8fe; border-color: #b7cfec; }
.button.link { color: var(--blue-strong); min-height: 32px; padding: 5px 7px; }
.button.link:hover, .icon-button:hover { background: var(--blue-soft); }
.icon-button { display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); min-width: 34px; min-height: 34px; }
.picker { display: inline-flex; align-items: center; position: relative; white-space: nowrap; }
.picker > svg { position: absolute; pointer-events: none; }
.picker > svg:first-child { left: 11px; color: #4d678a; }
.picker > svg:last-child { right: 9px; color: #516b8c; }
.picker select { appearance: none; min-height: 42px; padding: 9px 32px 9px 34px; border: 1px solid #dbe5f0; border-radius: 9px; color: #263a58; background: white; font-size: .865rem; font-weight: 650; cursor: pointer; }
.picker.simple select { padding-left: 11px; }

.period-banner {
  position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  min-height: 145px; padding: 18px 23px; margin-bottom: 14px; border: 1px solid #285ead; border-radius: 17px; color: #fff;
  background: linear-gradient(106deg, #163c7e 0%, #1952a7 47%, #2673df 100%); box-shadow: 0 4px 15px #1951ab35;
}
.period-banner::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 35%; opacity: .58;
  background: repeating-radial-gradient(ellipse at 87% 124%, transparent 0 19px, #b9dcff45 20px 21px, transparent 22px 44px);
  mask-image: linear-gradient(to right, transparent, black 40%);
}
.period-copy h2 { font-size: clamp(1.72rem, 3vw, 2.23rem); line-height: 1.13; letter-spacing: -.054em; margin-top: 4px; }
.period-kicker { display: inline-flex; align-items: center; gap: 7px; color: #deedff; font-size: .88rem; font-weight: 650; }
.period-kicker svg { color: #b6d8ff; }
.cabinet-welcome {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 20px; margin-bottom: 16px; padding: clamp(18px, 4vw, 40px); border: 1px solid #204e87; border-radius: 19px;
  color: #fff; background: linear-gradient(112deg, #102e58, #1759ac 73%, #246ed0);
}
.cabinet-welcome h2 { margin: 0 0 7px; font-size: clamp(1.5rem, 3.3vw, 2.5rem); line-height: 1.12; letter-spacing: -.045em; }
.cabinet-welcome p { max-width: 50ch; line-height: 1.5; color: #e0edff; }
.cabinet-welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.cabinet-welcome-actions .button { color: #fff; background: #ffffff16; border-color: #b7d6ff76; }
.cabinet-welcome-actions .button:hover { background: #ffffff26; }
.cabinet-welcome-actions .primary { color: #1a2637; background: #ffd0ab; border-color: #ffd0ab; box-shadow: none; }
.cabinet-welcome-actions .primary:hover { color: #1a2637; background: #ffe1c9; border-color: #ffe1c9; }
.cabinet-welcome-files { display: grid; place-items: center; width: clamp(72px, 12vw, 144px); aspect-ratio: 1; margin-right: clamp(0px, 4vw, 45px);
  color: #cbe2ff; border: 1px solid #8fc2ff70; box-shadow: 12px 12px 0 #d0e5ff16, 24px 24px 0 #d0e5ff0e; border-radius: 26px; background: #ffffff13; }
.source-panel { margin-bottom: 16px; }
.source-panel .section-head { flex-wrap: wrap; }
.source-progress { padding: 4px 8px; background: #eaf4ff; color: #245b96; border-radius: 7px; font-weight: 650; font-size: .78rem; }
.cabinet-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.cabinet-source { min-width: 0; display: grid; align-content: start; gap: 4px; min-height: 117px; padding: 11px; border: 1px solid #e0e8f4; border-radius: 11px; background: #f8fbff; }
.cabinet-source.source-ready { border-color: #d0e2f5; background: #f7fbff; }
.cabinet-source-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.cabinet-source .file-icon { width: 28px; height: 28px; }
.source-status { color: #704321; font-size: .73rem; font-weight: 650; }
.source-ready .source-status { color: #235a94; }
.cabinet-source h3 { color: #203754; line-height: 1.2; font-size: .91rem; }
.cabinet-source p { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.cabinet-source .button.link { justify-self: start; min-height: 30px; padding-inline: 0; font-size: .8rem; }
.period-copy p { margin-top: 4px; color: #deedff; font-size: .88rem; }
.banner-button { min-height: 31px; margin-top: 9px; padding: 5px 9px; color: #fff; background: #ffffff1a; border-color: #b7d6ff73; }
.banner-button:hover, .period-health:hover { background: #123a775d; border-color: #c7e1ff; }
.period-health { display: flex; gap: 13px; align-items: center; text-align: left; padding: 13px 16px 13px 12px; max-width: 340px; background: #123a774b; border: 1px solid #bddbff79; color: #fff; border-radius: 13px; }
.progress-ring { width: 61px; height: 61px; display: grid; place-items: center; flex: none; border-radius: 50%; background: conic-gradient(#ffb47c var(--progress), #b9daff4d 0); }
.progress-ring > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: #215fae; color: #fff; font-size: .99rem; font-weight: 780; }
.health-copy { display: grid; gap: 4px; }
.health-copy strong { font-size: .93rem; line-height: 1.22; }
.health-copy small { color: #e0edff; font-size: .8rem; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.metric {
  position: relative; padding: 16px 16px 14px; text-align: left; color: var(--ink);
  width: 100%; min-height: 124px; transition: border-color .16s, box-shadow .16s;
}
.metric:hover { border-color: #8cb6ee; box-shadow: 0 3px 13px #1d5daa20; }
.metric.featured { background: linear-gradient(116deg, #eaf4ff 0%, #fdfdff 89%); border-color: #cbe2fd; }
.metric.warm { background: linear-gradient(118deg, #fff0e5 0%, #fffdfb 92%); border-color: #f2d9c4; }
.metric-head { display: flex; align-items: center; gap: 9px; color: #3b5273; font-size: .9rem; font-weight: 680; }
.metric-icon, .file-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; background: #e9f3ff; color: #1765dc; flex: none; }
.featured .metric-icon { background: #dbeaff; }
.warm .metric-icon { background: #ffe7d5; color: var(--orange); }
.metric-value { font-size: clamp(1.45rem, 2.5vw, 2.15rem); font-weight: 780; letter-spacing: -.055em; line-height: 1.03; margin-top: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-value span { font-size: .81em; }
.metric-annotation { display: block; color: var(--muted); font-size: .785rem; margin-top: 7px; }
.metric-annotation strong { font-weight: 700; color: var(--blue-strong); }
.warm .metric-annotation strong { color: var(--orange); }

.analytics { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(320px, 1fr); gap: 16px; margin-bottom: 16px; }
.panel { padding: 17px; }
.section-head { justify-content: space-between; gap: 8px 13px; }
.section-head h2 { font-size: 1.125rem; letter-spacing: -.026em; line-height: 1.2; }
.section-head p { margin-top: 4px; color: var(--muted); font-size: .825rem; }
.chart-panel { position: relative; overflow: hidden; }
.chart-panel .section-head { align-items: flex-start; }
.legend { gap: 12px; color: var(--muted); font-size: .74rem; white-space: nowrap; flex-wrap: wrap; }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.legend i { width: 15px; height: 0; border-top: 2px solid #347ef4; border-radius: 3px; }
.legend .compare { border-top: 2px dashed #9bb7dd; }
.chart { position: relative; height: 167px; margin-top: 9px; }
.chart canvas { width: 100%; height: 100%; display: block; }
.chart-tooltip { display: none; position: absolute; color: #fff; background: #183456; box-shadow: 0 3px 8px #18345638; border-radius: 7px; padding: 5px 8px; font-size: .75rem; pointer-events: none; transform: translate(-50%, -105%); white-space: nowrap; }
.chart-tooltip.visible { display: block; }
.flow-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 11px; margin-top: 3px; border: 1px solid #e4edf9; background: #f5f9ff; border-radius: 10px; font-variant-numeric: tabular-nums; }
.flow-strip > div + div { padding-left: 10px; border-left: 1px solid #dce6f4; }
.flow-strip span { display: block; color: var(--muted); font-size: .72rem; }
.flow-strip .strip-scope { display: inline; }
.flow-strip strong { display: block; color: #1a365d; font-size: .9rem; white-space: nowrap; margin-top: 3px; }
.panel-count { flex: none; color: #315d99; background: #eef5ff; border: 1px solid #e1ecfc; border-radius: 18px; padding: 4px 8px; font-size: .76rem; font-weight: 700; }
.priority-list { display: grid; gap: 5px; margin-top: 10px; }
.priority-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px; text-align: left; color: var(--ink); background: #f8fbff; border: 1px solid #e7eff9; border-radius: 10px; }
.priority-item:hover { background: #edf5ff; border-color: #afcef8; }
.priority-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #2367c6; background: #e8f2ff; }
.priority-item.late .priority-icon, .priority-item.deduction .priority-icon { color: #98400d; background: #ffe9d9; }
.priority-text strong, .priority-text small, .priority-amount strong, .priority-amount small { display: block; }
.priority-text strong { font-size: .86rem; line-height: 1.16; }
.priority-text small, .priority-amount small { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.priority-amount { text-align: right; }
.priority-amount strong { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.queue { padding: 0; overflow: hidden; }
.queue .section-head { padding: 17px 18px 13px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 12px; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
th { background: #f5f8fd; color: #516683; font-size: .78rem; font-weight: 700; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid #edf1f7; font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbff; }
.insurer { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.insurer-icon { color: #2469c7; background: #eaf3ff; border-radius: 7px; min-width: 26px; height: 26px; padding: 0 4px; display: inline-grid; place-items: center; font-weight: 750; font-size: .67rem; }
.muted { color: var(--muted); }
.amount { font-weight: 730; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 3px 8px; color: #49617c; background: #eef3f9; font-size: .76rem; font-weight: 700; line-height: 1.35; }
.pill::before { width: 6px; height: 6px; border-radius: 50%; content: ""; background: currentColor; }
.pill.late, .pill.open { color: #9c3b0b; background: #ffefe5; }
.pill.deduction { color: #815300; background: #fff3d9; }
.pill.payment, .pill.working, .pill.partial { color: #165dc6; background: #eaf3ff; }
.pill.closed, .pill.settled { color: #1b6959; background: #e5f5ee; }
.pill.mismatch { color: #6444a0; background: #f2edfb; }
.row-action { color: var(--blue-strong); background: none; border: 0; padding: 5px 0; font-size: .81rem; font-weight: 700; }
.row-action:hover { text-decoration: underline; }
.registry-link { font-size: .89rem; text-align: left; }
.registry-insurer { max-width: 185px; overflow: hidden; text-overflow: ellipsis; }
.registry-panel td { font-variant-numeric: tabular-nums; }
.cell-secondary { display: block; color: var(--muted); font-size: .76rem; }
.overdue { color: #a14312; }
.table-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding: 10px 18px; font-size: .78rem; color: var(--muted); }
.pagination { gap: 4px; }
.pagination button { padding: 4px 8px; min-height: 29px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 1px 18px 14px; }
.filters .picker select, .filters input { min-height: 37px; border: 1px solid #dbe5f0; border-radius: 8px; background: white; font-size: .85rem; color: var(--ink); }
.search-field { position: relative; display: flex; align-items: center; min-width: 160px; flex: 1; }
.search-field > svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.filters input { width: 100%; min-width: 0; padding: 7px 10px 7px 34px; }
.empty { padding: 26px 18px; color: var(--muted); text-align: center; white-space: normal; }

.upload-dashboard { display: grid; grid-template-columns: 1.4fr 1fr; gap: 17px; }
.upload-dashboard.import-single { grid-template-columns: minmax(0, 1fr); }
.source-steps { display: grid; gap: 10px; padding-left: 20px; color: var(--muted); font-size: .94rem; }
.source-steps strong { color: var(--ink); }
.snapshot-picker { margin-top: 12px; }
.snapshot-picker .picker, .snapshot-picker select { min-width: 0; max-width: 100%; }

dialog { padding: 0; border: 1px solid #d7e3f4; border-radius: 17px; box-shadow: 0 20px 80px #142b5759; width: min(92vw, 610px); max-height: calc(100dvh - 32px); color: var(--ink); }
dialog::backdrop { background: #152b4e50; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.28rem; letter-spacing: -.025em; }
.modal-head p { color: var(--muted); margin-top: 4px; font-size: .86rem; }
.modal-body { padding: 16px 20px 20px; }
.modal-body > p { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.lesson-progress { display: flex; gap: 5px; margin-bottom: 17px; }
.lesson-progress span { flex: 1; height: 4px; border-radius: 6px; background: #e6edf8; }
.lesson-progress .reached { background: #2772df; }
.lesson-title { display: flex; gap: 11px; align-items: center; }
.lesson-title small { color: var(--muted); font-size: .79rem; }
.lesson-title h3 { font-size: 1.13rem; line-height: 1.25; }
.lesson-result { padding: 10px 12px; border: 1px solid #cfe3fd; border-radius: 9px; background: #f1f7ff; color: #263e5d; font-size: .9rem; }
.lesson-result strong { display: block; margin-bottom: 3px; }
.pilot-panel .lesson-result { margin: 8px 0 12px; }
.lesson-result .button { margin-top: 4px; padding-left: 0; text-align: left; white-space: normal; }
.notification-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; flex-wrap: wrap; }
.notification-filters { display: flex; gap: 3px; padding: 3px; background: #f0f5fc; border: 1px solid #e3ebf6; border-radius: 9px; }
.notification-filters .button { color: var(--muted); }
.notification-filters [aria-pressed=true] { color: #114fAD; background: #fff; box-shadow: var(--shadow); }
.notification-list { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.notification-entry {
  width: 100%; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: start; gap: 9px;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-align: left;
}
.notification-entry.unread { background: #f2f8ff; border-color: #d7e7fb; }
.notification-entry:hover { border-color: #8eb7ef; }
.notification-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; color: #185dbd; background: #deeeff; }
.notification-icon.late, .notification-icon.due { color: #a14414; background: #ffebdd; }
.notification-icon.credit { color: #166a51; background: #e5f6ee; }
.notification-copy { display: grid; gap: 2px; overflow-wrap: anywhere; }
.notification-copy strong, .notification-amount { font-size: .9rem; }
.notification-copy > span { font-size: .86rem; color: var(--muted); }
.notification-copy small, .notification-foot { font-size: .77rem; color: var(--muted); }
.notification-amount { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.unread-dot { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: #2476ed; vertical-align: middle; }
.notification-empty { display: grid; justify-items: center; gap: 6px; padding: 26px 12px; background: #f4f8fe; border-radius: 10px; text-align: center; }
.notification-empty p { color: var(--muted); font-size: .87rem; }
.modal-body > .notification-foot { margin: 12px 0 0; font-size: .78rem; }
.file-field { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px 11px; margin: 0 0 8px; }
.file-field.selected { border-color: #a6cbfb; background: #f5f9ff; }
.file-field legend { font-size: .85rem; font-weight: 700; color: var(--ink); }
.import-description { color: var(--muted); font-size: .79rem; margin-bottom: 5px; }
.import-mapping { min-inline-size: 0; padding: 12px; margin-bottom: 13px; }
.import-file-name { color: var(--ink); font-size: .86rem; font-weight: 650; margin-bottom: 10px; overflow-wrap: anywhere; }
.import-selects { margin-bottom: 10px; }
.import-row-mode { max-width: 385px; margin: 5px 0 12px; }
.import-row-mode small, .insurer-choice small { font-weight: 400; color: var(--muted); }
.insurer-review { display: grid; gap: 8px; margin: 12px 0; }
.insurer-choice { padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.insurer-choice span, .insurer-choice select { min-width: 0; }
.insurer-choice strong, .insurer-choice small { display: block; overflow-wrap: anywhere; }
.insurer-choice select { text-overflow: ellipsis; }
.import-columns { border-top: 1px solid var(--line); padding-top: 10px; }
.import-columns .field, .import-selects .field { min-width: 0; align-content: start; }
.import-columns small { overflow-wrap: anywhere; }
.import-columns select { text-overflow: ellipsis; }
.import-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 15px; }
.import-footer .modal-actions { margin-top: 0; margin-left: auto; }
.file-progress { color: var(--muted); font-size: .83rem; }
.import-history > p { color: var(--muted); margin: 10px 0 14px; }
.import-history .results-list { margin-top: 12px; }
.case-delta, .match-suggestion {
  padding: 10px 12px; border: 1px solid #cfe2fe; border-radius: 9px; background: #f1f7ff;
}
.match-list { margin: 12px 0; }
.match-list h3 { font-size: .9rem; margin-bottom: 4px; }
.match-list > p { font-size: .8rem; }
.match-suggestion { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin: 7px 0; }
.match-suggestion strong { font-size: .88rem; overflow-wrap: anywhere; }
.match-suggestion small { display: block; margin-top: 2px; color: var(--muted); }
.allocation-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.allocation-balance { font-size: .82rem; font-weight: 650; color: var(--blue-strong); }
.allocation-balance.error { margin: 0; color: #a02e10; }
.import-totals strong { font-size: 1.2rem; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; flex-wrap: wrap; }
.file-row input { min-width: 0; max-width: 100%; font-size: .83rem; color: var(--muted); }
input[type=file]::file-selector-button { background: var(--blue-soft); color: var(--blue-strong); border: 0; border-radius: 6px; padding: 6px 8px; margin-right: 7px; cursor: pointer; font-weight: 700; }
.error { color: #a02e10; background: #fff0ea; border-radius: 8px; padding: 8px 10px; margin-top: 11px; font-size: .85rem; }
.error:empty { display: none; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field { display: grid; gap: 5px; color: var(--muted); font-size: .84rem; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; background: #fff; border: 1px solid #dbe5f0; border-radius: 8px; padding: 8px 9px; color: var(--ink); }
.field textarea { resize: vertical; min-height: 60px; }
.case-sums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 11px 0; }
.case-sums > div { padding: 9px; border-radius: 9px; background: #f2f7ff; }
.case-sums small { display: block; color: var(--muted); margin-bottom: 4px; font-size: .76rem; }
.case-sums strong { font-size: .88rem; }
.case-form { display: grid; gap: 10px; }
.case-form details { border-top: 1px solid var(--line); padding-top: 8px; }
.case-form details summary { font-size: .88rem; color: var(--blue-strong); cursor: pointer; font-weight: 650; margin-bottom: 8px; }
.case-draft textarea { line-height: 1.5; }
.case-draft .button { margin-top: 7px; }
.overdue-backlog { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border-color: #f2d9c4; }
.overdue-backlog p { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.queue [aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-strong); border-color: #a6cbfb; }
.split-list { display: grid; gap: 6px; }
.split-caption { font-size: .85rem; margin-bottom: 7px; }
.document-list { display: grid; gap: 4px; color: var(--muted); margin: 7px 0 0; padding-left: 18px; font-size: .81rem; overflow-wrap: anywhere; }
.document-rows { display: grid; gap: 7px; margin: 7px 0; padding: 0; list-style: none; }
.document-row { display: grid; grid-template-columns: 33px minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 9px; }
.document-row strong, .document-row small { display: block; overflow-wrap: anywhere; }
.document-row strong { font-size: .88rem; }
.document-row small, .document-note, .document-slot > p { font-size: .79rem; color: var(--muted); }
.document-row .button { white-space: nowrap; padding: 6px 8px; }
.document-search { margin-bottom: 10px; }
.document-note { margin-top: 8px; }
@media (max-width: 420px) {
  .document-row { grid-template-columns: 28px minmax(0, 1fr); }
  .document-row .file-icon { width: 28px; height: 28px; }
  .document-row .button { grid-column: 2; justify-self: start; }
}
.results-list { display: grid; gap: 8px; }
.result-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; align-items: center; }
.result-row > div { min-width: 0; overflow-wrap: anywhere; }
.result-row strong { font-size: .9rem; }
.result-row small { display: block; color: var(--muted); }
.result-section { margin-top: 15px; }
.result-section h3 { font-size: .92rem; margin-bottom: 6px; }
.result-section > p { font-size: .85rem; color: var(--muted); }
.payment-check { padding: 10px 12px; border: 1px solid #ccdff8; border-radius: 10px; }
.payment-check h3 { display: flex; align-items: center; gap: 7px; color: var(--blue-strong); }
.payment-check .case-sums { margin-bottom: 4px; }
.payment-check .case-sums strong { overflow-wrap: anywhere; }
.payment-check .case-sums > :last-child { background: #fff1e7; }
.registry-totals > div { padding: 11px; }
.registry-totals > div:nth-child(4) { background: #fff2e8; }
.case-history { list-style: none; display: grid; gap: 6px; padding: 0; margin: 0; }
.case-history li { display: grid; gap: 2px; padding: 7px 9px; border-left: 3px solid #a6c8f8; background: #f4f8ff; border-radius: 0 8px 8px 0; font-size: .83rem; overflow-wrap: anywhere; }
.case-history small { color: var(--muted); font-size: .75rem; }
#toast { position: fixed; z-index: 9; right: 20px; bottom: 20px; background: #14365f; color: white; padding: 11px 15px; border-radius: 9px; box-shadow: 0 4px 15px #14365f44; font-size: .875rem; max-width: min(420px, calc(100vw - 40px)); }
#toast:empty { display: none; }

@media (min-width: 1500px) {
  .content { padding-inline: 38px; }
  .chart { height: 186px; }
}
@media (max-width: 1140px) {
  .shell { grid-template-columns: 207px minmax(0, 1fr); }
  .sidebar .cabinet-brand strong { font-size: 1.17rem; }
  .sidebar { padding-inline: 12px; }
  .content, .topbar { padding-inline: 22px; }
  .metric { padding-inline: 12px; }
  .metric-head { gap: 6px; }
  .legend { gap: 5px 8px; }
  .flow-strip .strip-scope { display: none; }
}
@media (max-width: 920px) {
  .shell { grid-template-columns: 66px minmax(0, 1fr); }
  .sidebar { padding: 19px 10px 12px; }
  .brand { padding: 0 2px; }
  .sidebar-brand { justify-content: center; }
  .sidebar .cabinet-brand { flex: 0 0 auto; }
  .brand-text, .menu-text, .nav-caption, .sidebar-import span, .sidebar-toggle { display: none; }
  .menu { margin-top: 24px; }
  .menu-button { justify-content: center; padding: 8px; }
  .nav-count { position: absolute; top: 0; left: calc(50% + 3px); min-width: 14px; margin-left: 0; padding: 0 3px; border-radius: 5px; font-size: .625rem; line-height: 1.25; }
}
@media (min-width: 691px) and (max-width: 920px) {
  .sidebar-plan { justify-content: center; padding-inline: 0; }
  .sidebar-plan-copy, .sidebar-plan-arrow { display: none; }
}
@media (max-width: 820px) {
  .analytics, .upload-dashboard { grid-template-columns: 1fr; }
  .account-meta { display: none; }
}
@media (max-width: 690px) {
  .shell { display: block; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; overflow: visible; border-top: 1px solid var(--line); padding: 5px 7px max(5px, env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 20px #1f47700e; }
  .sidebar-brand, .sidebar-import, .sidebar-bottom { display: none; }
  .sidebar-plan { order: -1; min-height: 33px; margin: 0 0 3px; padding: 4px 9px; background: #edf5ff; border-color: #d7e7fb; color: #204a76; }
  .sidebar-plan-icon { width: 23px; height: 23px; border-radius: 5px; }
  .sidebar-plan-icon svg { width: 14px; height: 14px; }
  .sidebar-plan-copy { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; }
  .sidebar-plan-copy strong span, .sidebar-plan-copy small, .sidebar-plan-arrow { color: #3e638b; }
  .menu { display: flex; justify-content: space-between; margin: 0; gap: 3px; }
  .menu-button { text-align: center; flex-direction: column; gap: 2px; min-height: 46px; font-size: .7rem; white-space: nowrap; padding: 3px 2px; }
  .menu-button { color: var(--muted); }
  .menu-button svg { width: 16px; height: 16px; color: #3e6ca9; }
  .sidebar .admin-nav svg { color: #9b461c; }
  .menu-button[aria-current=page], .menu-button:hover { color: var(--blue-strong); border-color: #d9e9ff; background: #eaf3ff; }
  .menu-text { display: inline; }
  [data-view=imports] .menu-text { display: none; }
  .menu-mobile-text { display: inline; }
  .menu-button[aria-current=page]::before { display: none; }
  .topbar { min-height: 59px; padding-inline: 14px; }
  .crumb { gap: 6px; }
  .mobile-brand { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: #165fd8; color: white; font-size: .71rem; font-weight: 800; }
  .crumb .divider, .crumb .root-crumb { display: none; }
  .account { gap: 8px; flex-shrink: 0; }
  .account .mode { max-width: 118px; overflow: hidden; }
  .header-actions { gap: 2px; }
  .header-action { width: 34px; height: 34px; }
  .content { padding: 20px 12px 20px; }
  .cabinet-welcome { grid-template-columns: minmax(0, 1fr); margin-bottom: 11px; }
  .cabinet-welcome-files { display: none; }
  .source-panel { margin-bottom: 11px; }
  .cabinet-sources { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cabinet-source { min-height: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 6px; padding: 8px; }
  .cabinet-source-top { grid-column: 1 / -1; }
  .cabinet-source h3, .cabinet-source p { grid-column: 1; }
  .cabinet-source p { grid-row: 3; }
  .cabinet-source .button.link { grid-column: 2; grid-row: 2 / 4; align-self: center; min-height: 36px; }
  .hero { flex-wrap: wrap; margin-bottom: 16px; }
  .hero .toolbar { max-width: 100%; }
  .hero p { font-size: .9rem; }
  .guide-banner { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 7px 9px; padding: 10px; margin-bottom: 11px; }
  .guide-banner .guide-icon { width: 35px; height: 35px; align-self: start; }
  .guide-actions { grid-column: 2; margin-left: 0; justify-content: space-between; }
  .notification-entry { grid-template-columns: 30px minmax(0, 1fr); }
  .notification-entry .notification-icon { width: 29px; height: 29px; }
  .notification-amount { grid-column: 2; text-align: left; }
  .period-banner { min-height: 127px; gap: 9px; padding: 11px; margin-bottom: 10px; border-radius: 13px; }
  .period-copy h2 { font-size: 1.45rem; }
  .period-kicker { font-size: .74rem; gap: 4px; }
  .period-copy p { font-size: .75rem; }
  .period-health { max-width: 143px; gap: 7px; padding: 7px; }
  .progress-ring { width: 43px; height: 43px; }
  .progress-ring > span { width: 35px; height: 35px; font-size: .79rem; }
  .health-copy strong { font-size: .73rem; }
  .health-copy small { font-size: .69rem; }
  .banner-button { font-size: .76rem; min-height: 36px; margin-top: 7px; white-space: normal; text-align: left; }
  .banner-button svg { width: 14px; height: 14px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
  .metric { min-height: 106px; padding: 11px 9px; }
  .metric.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 7px; min-height: 75px; }
  .featured .metric-value { grid-column: 2; grid-row: 1 / 3; margin-top: 0; font-size: 1.5rem; }
  .featured .metric-annotation { grid-column: 1; margin: 0 0 0 33px; }
  .metric-icon { width: 27px; height: 27px; }
  .metric-icon svg { width: 15px; height: 15px; }
  .metric-head { font-size: .76rem; }
  .metric-value { font-size: 1.3rem; margin-top: 10px; white-space: normal; overflow-wrap: anywhere; }
  .metric-annotation { font-size: .73rem; }
  .analytics, .upload-dashboard { grid-template-columns: 1fr; gap: 10px; margin-bottom: 11px; }
  .panel { padding: 14px; }
  .queue { padding: 0; }
  .queue .section-head { padding-inline: 12px; }
  .queue .section-head { flex-wrap: wrap; }
  .filters { padding-inline: 12px; }
  .filters .search-field { flex-basis: 100%; min-width: 0; }
  .work-table, .work-table tbody { display: block; }
  .work-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .work-table tbody { padding: 0 10px; }
  .work-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 5px 10px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; }
  .work-table td { display: block; min-width: 0; max-width: none; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .work-table td[data-label]::before { display: block; content: attr(data-label); font-size: .75rem; color: var(--muted); font-weight: 500; }
  .work-table td.empty { grid-column: 1 / -1; padding: 8px; }
  .issue-table tbody td:nth-child(4) { font-size: 1.02rem; }
  .issue-table tbody td:last-child:not(.empty) { grid-column: 1 / -1; }
  .issue-table .row-action { display: block; text-align: left; width: 100%; min-height: 36px; }
  .registry-table .registry-link { min-height: 34px; padding: 2px 0; }
  .work-table .pill { white-space: normal; }
  .case-sums > div, .case-sums strong { min-width: 0; overflow-wrap: anywhere; }
  .chart { height: 170px; }
  .flow-strip { padding-inline: 7px; gap: 6px; }
  .flow-strip > div + div { padding-left: 6px; }
  .flow-strip strong { font-size: .82rem; }
  .case-sums.registry-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #toast { bottom: 66px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
