:root {
  --navy: #132a36;
  --navy-deep: #10232e;
  --teal: #117a72;
  --teal-dark: #08615c;
  --teal-pale: #e8f3ef;
  --canvas: #f6f7f3;
  --paper: #fff;
  --ink: #1c303a;
  --muted: #65757b;
  --line: #e1e7e4;
  --amber: #936019;
  --amber-pale: #fbf2e2;
  --red: #a33535;
  --red-pale: #fcf0ef;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .52; }
button, a { touch-action: manipulation; }
a { color: var(--teal); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #46b7ab; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(26px, 2.3vw, 34px); letter-spacing: -.8px; line-height: 1.2; font-weight: 650; margin-bottom: 10px; }
h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.3px; margin-bottom: 8px; }
h3 { font-size: 15px; margin-bottom: 7px; }
p { margin-bottom: 12px; }
small { font-size: 12px; }
.muted, .field-help { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.skip-link { position: fixed; top: 10px; left: 12px; padding: 12px; background: white; z-index: 100; transform: translateY(-160%); border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.button-primary { background: var(--teal); color: white; box-shadow: 0 1px 2px #10232e12; }
.button-primary:hover:not(:disabled) { background: var(--teal-dark); }
.button-secondary { background: white; border-color: #d3ddda; color: var(--ink); }
.button-secondary:hover:not(:disabled) { background: #f1f6f3; border-color: #a4b9b1; }
.button-quiet { color: var(--muted); background: transparent; }
.button-quiet:hover:not(:disabled) { background: #eaf0ec; color: var(--ink); }
.button-danger { color: var(--red); border-color: #e7c3be; background: white; }
.button-small { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.button-wide { width: 100%; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 4px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 23px; line-height: 1; }
.icon-button:hover { background: #eaf0ec; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; border-radius: 100px; padding: 5px 10px; font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.badge-amber { background: var(--amber-pale); color: var(--amber); border: 1px solid #edddbc; }
.badge-teal { background: var(--teal-pale); color: var(--teal-dark); }
.badge-neutral { background: #f0f3f2; color: var(--muted); }
.badge-red { background: var(--red-pale); color: var(--red); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #70c8ad; display: inline-block; }
.brand { display: flex; gap: 12px; align-items: center; font-size: 16px; font-weight: 650; text-decoration: none; line-height: 1.3; letter-spacing: -.3px; }
.brand-light { color: #f3faf8; }
.brand-caption { display: block; font-size: 10px; font-weight: 400; color: #a5babf; letter-spacing: .1px; margin-top: 4px; }
.brand-mark { display: flex; gap: 3px; align-items: flex-end; flex: 0 0 34px; height: 34px; padding: 7px; background: #23464b; border: 1px solid #3e6264; border-radius: 9px; }
.brand-mark i { display: block; width: 4px; background: #a8d8c5; border-radius: 2px; height: 9px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 12px; }
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.08fr 1fr; }
.login-story { background: var(--navy); color: white; padding: 48px 10%; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; }
.login-story-copy { max-width: 440px; padding: 60px 0; }
.login-story-copy .eyebrow { color: #a3c7bc; margin-bottom: 25px; }
.login-story-copy h1 { font-size: clamp(34px, 3.9vw, 54px); letter-spacing: -1.8px; font-weight: 500; line-height: 1.15; margin-bottom: 25px; }
.login-story-copy p { color: #b5c7cc; font-size: 15px; line-height: 1.8; max-width: 360px; }
.login-diagram { display: flex; align-items: center; gap: 12px; margin-top: 42px; font-size: 11px; color: #b9d0ce; }
.login-diagram span { border: 1px solid #36515c; border-radius: 6px; padding: 9px 12px; }
.login-diagram b { font-weight: 400; color: #678a88; }
.login-footnote { color: #8ca5ad; font-size: 11px; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 50px 32px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h2 { font-size: 30px; margin: 23px 0 13px; letter-spacing: -.8px; }
.login-card form { margin-top: 30px; }
.login-card .button { margin-top: 12px; }
.login-status { color: var(--muted); font-size: 12px; margin: 20px 0 0; min-height: 20px; }
.workspace { min-height: 100vh; }
.sidebar { width: 254px; position: fixed; inset: 0 auto 0 0; background: var(--navy); color: #c3d2d6; z-index: 30; display: flex; flex-direction: column; }
.sidebar .brand { padding: 27px 23px 19px; }
.sidebar-caption { margin: 0 24px 22px; color: #93acae; font-size: 10px; display: flex; gap: 7px; align-items: center; }
.navigation { overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 20px; flex: 1; scrollbar-width: thin; scrollbar-color: #3b535e transparent; }
.nav-group { margin-top: 24px; }
.nav-group:first-child { margin-top: 0; }
.nav-group-label { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid #86cbb2; border-radius: 5px; background: #23434d; color: #e5fff4; font-size: 14px; line-height: 1.4; letter-spacing: .1px; font-weight: 800; }
.nav-subgroup + .nav-subgroup { margin-top: 18px; }
.nav-subgroup-label { margin: 16px 12px 8px; padding-bottom: 7px; border-bottom: 1px solid #48616b; color: #f4fafb; font-size: 14px; line-height: 1.4; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 10px; color: #bbccd1; text-decoration: none; border-radius: 6px; padding: 9px 12px; font-size: 12px; line-height: 1.35; min-height: 36px; margin-bottom: 2px; }
.nav-branch-row { display: flex; align-items: stretch; gap: 3px; }
.nav-branch-row > .nav-link { flex: 1; min-width: 0; }
.nav-branch-toggle { flex: 0 0 34px; min-height: 36px; margin-bottom: 2px; border: 1px solid #3b535e; border-radius: 6px; background: transparent; color: #c3d2d6; font-size: 17px; }
.nav-branch-toggle:hover { background: #213c48; color: white; }
.nav-branch-child-active > .nav-link { color: #ecfaf4; }
.nav-children { margin: 0 0 6px 18px; padding-left: 6px; border-left: 1px solid #3b535e; }
.nav-link:hover { background: #213c48; color: white; }
.nav-link[aria-current="page"] { color: #ecfaf4; background: #25534f; box-shadow: inset 3px 0 #86cbb2; }
.nav-link.unavailable { color: #8ba2ab; }
.nav-link .nav-symbol { opacity: .8; width: 16px; font-size: 15px; flex-shrink: 0; text-align: center; }
.nav-link .nav-availability { margin-left: auto; font-size: 11px; opacity: .7; }
.sidebar-bottom { border-top: 1px solid #2c424d; padding: 17px 19px; display: flex; align-items: center; gap: 10px; font-size: 10px; background: var(--navy-deep); }
.sidebar-bottom small { display: block; color: #78939f; font-size: 10px; margin-top: 3px; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; background: #2b414d; border: 1px solid #415561; border-radius: 50%; color: #bad0d6; }
.sidebar-logout { margin-left: auto; color: #a0b5bd; min-width: 30px; }
.sidebar-logout:hover { background: #29444e; }
.workspace-body { margin-left: 254px; min-width: 0; }
.topbar { height: 66px; padding: 0 36px; background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 15px; align-items: center; justify-content: space-between; }
.breadcrumb { font-size: 11px; color: #7b898e; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb span { margin: 0 12px; color: #c0c9c7; }
.breadcrumb strong { color: #405661; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sync-label { font-size: 10px; color: var(--muted); }
.sync-label::before { content: ""; display: inline-block; background: #72aa92; width: 5px; height: 5px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.sync-label.sync-error::before { background: #be8339; }
.menu-toggle { flex-shrink: 0; min-height: 40px; padding: 7px 12px; background: var(--teal-pale); border-color: #adcfc2; color: var(--teal-dark); font-weight: 700; }
.menu-toggle:hover { background: #d8ebe3; border-color: #78a997; }
.menu-toggle-icon { font-size: 26px; line-height: 1; font-weight: 600; }
.sidebar-rail { width: 56px; position: fixed; inset: 0 auto 0 0; z-index: 30; background: var(--navy); padding: 10px 6px; border-right: 1px solid #2c424d; }
.sidebar-expand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; min-height: 64px; padding: 7px 2px; border: 1px solid #5c8385; border-radius: 8px; background: #23464b; color: #f3faf8; font-size: 10px; font-weight: 600; }
.sidebar-expand:hover { background: #315c60; border-color: #a8d8c5; }
@media (min-width: 761px) {
  .workspace.sidebar-collapsed .sidebar { display: none; }
  .workspace.sidebar-collapsed .workspace-body { margin-left: 56px; }
}
.main { padding: 34px 36px 18px; max-width: 1800px; margin: 0 auto; }
.main:focus { outline: none; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 27px; }
.page-heading .eyebrow { margin-bottom: 10px; }
.page-heading > .badge { margin-top: 28px; }
.page-description { color: var(--muted); font-size: 13px; max-width: 770px; margin: 0; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 32px; padding: 17px 0 0; color: #7b898c; font-size: 10px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-pad { padding: 23px; }
.card-heading { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; margin-bottom: 20px; }
.card-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.notice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #dedfd1; border-radius: 8px; padding: 13px 16px; font-size: 12px; color: #696750; background: #f6f5e9; margin-bottom: 23px; line-height: 1.65; }
.notice p { margin: 0; }
.notice strong { font-weight: 600; }
.notice-teal { background: #eff6f2; color: #3e665c; border-color: #d5e5dc; }
.notice-error { color: var(--red); background: var(--red-pale); border-color: #ecd2ce; }
.notice-symbol { font-size: 17px; line-height: 1.2; margin-top: 2px; flex-shrink: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 25px; }
.stat-card { padding: 20px; }
.stat-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; gap: 10px; }
.stat-icon { color: #85a093; font-size: 17px; line-height: 1; }
.stat-value { display: block; font-size: 28px; letter-spacing: -1px; line-height: 1.3; margin: 17px 0 9px; font-weight: 600; }
.stat-value-small { font-size: 19px; letter-spacing: -.4px; min-height: 36px; padding-top: 5px; }
.stat-hint { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 22px; }
.report-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.report-shortcut { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 8px; padding: 16px; color: var(--ink); text-decoration: none; }
.report-shortcut:hover { border-color: #a5c6b7; background: #fafcfb; }
.shortcut-icon { flex: 0 0 31px; display: grid; place-items: center; width: 31px; height: 33px; border: 1px solid #dce8e1; color: #5b8374; background: #f1f6f2; border-radius: 7px; font-size: 16px; }
.report-shortcut strong { font-size: 12px; display: block; font-weight: 600; margin-bottom: 4px; }
.report-shortcut small { font-size: 10px; line-height: 1.5; color: var(--muted); display: block; }
.shortcut-arrow { margin-left: auto; color: #9baea5; }
.section-label { display: flex; justify-content: space-between; align-items: center; margin: 29px 0 15px; }
.section-label h2 { margin: 0; }
.input-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.input-card { padding: 22px; display: flex; flex-direction: column; align-items: flex-start; }
.input-card .shortcut-icon { margin-bottom: 18px; }
.input-card p { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.input-card .button { margin-top: auto; }
.source-list { margin: 0; }
.source-list > div { border-bottom: 1px solid #eef1ee; padding: 11px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 17px; }
.source-list > div:first-child { padding-top: 0; }
.source-list > div:last-child { border: 0; padding-bottom: 0; }
.source-list dt { font-size: 11px; color: var(--muted); }
.source-list dd { margin: 0; font-size: 11px; text-align: right; max-width: 58%; overflow-wrap: anywhere; }
.coverage { padding: 16px; background: #f5f7f4; border: 1px solid #e9eeea; border-radius: 8px; margin-top: 20px; }
.coverage h3 { font-size: 11px; }
.coverage p { font-size: 11px; margin: 0; color: var(--muted); }
.coverage-periods { color: var(--ink) !important; margin-bottom: 8px !important; line-height: 1.7; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 20px; }
.toolbar .field { min-width: 130px; margin: 0; }
.toolbar .field-wide { flex: 1; max-width: 300px; min-width: 160px; }
.toolbar-spacer { flex: 1; }
.page-heading[hidden] { display: none; }
.balance-toggle { border: 0; padding: 4px 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.balance-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.materials-table { min-width: 780px; width: 100%; }
.materials-table th:first-child, .materials-table td:first-child { min-width: 180px; }
.materials-table th:nth-child(2), .materials-table td:nth-child(2) { min-width: 260px; white-space: normal; }
.materials-table .balance-toggle { padding: 9px 12px; border: 1px solid #c7d9cd; border-radius: 8px; background: #fff; font-weight: 650; }
.materials-table .balance-level-1 { padding-left: 34px; color: var(--muted); }
.materials-table tbody tr.materials-current-value th, .materials-table tbody tr.materials-current-value td { border-top: 3px solid #a6c5b1; padding-top: 19px; padding-bottom: 19px; background: #e4efe7; }
.data-table th.balance-level-1 { padding-left: 32px; }
.data-table th.balance-level-2 { padding-left: 52px; }
.cashflow-source-dates { margin: 7px 0 0; font-size: 12px; color: var(--muted); }
.cashflow-actions { flex-wrap: wrap; }
.cashflow-balance-date { display: block; margin-top: 5px; font-size: 10px; font-weight: 400; color: var(--muted); }
.data-table.cashflow-table th:first-child { min-width: 350px; max-width: 420px; }
.data-table.cashflow-table td { min-width: 160px; }
.cashflow-table .balance-toggle { display: block; width: 100%; padding: 5px 0; font-weight: 650; }
.data-table.cashflow-table .cashflow-payment th { font-size: 11px; line-height: 1.6; font-weight: 400; }
.data-table.cashflow-table .cashflow-closing th, .data-table.cashflow-table .cashflow-closing td { background: #e0ece3; border-bottom: 2px solid #b4ccba; }
.data-table.cashflow-table .cashflow-pinned > th, .data-table.cashflow-table .cashflow-pinned > td { position: sticky; top: var(--cashflow-group-top); z-index: 2; background: #e7efe6; border-bottom-color: #b4ccba; box-shadow: 0 2px 0 #c7d8c9; }
.data-table.cashflow-table .cashflow-pinned > th:first-child { z-index: 3; box-shadow: 1px 2px 0 #c7d8c9; }
.data-table.cashflow-table thead th { z-index: 4; }
.data-table.cashflow-table thead th:first-child { z-index: 5; }
.calendar-navigation { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 9px; }
.calendar-navigation .field { margin: 0; min-width: 145px; }
.calendar-navigation .button { min-height: 42px; }
.calendar-range { flex-basis: 100%; font-size: 11px; color: var(--muted); margin-top: 2px; }
.calendar-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.calendar-summary-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid #a7c2b5; }
.calendar-summary-card > span { font-size: 12px; }
.calendar-summary-card strong { font-size: clamp(19px, 2.1vw, 28px); font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.calendar-summary-card small { font-size: 11px; line-height: 1.6; }
.calendar-summary-bank { border-top-color: var(--teal); }
.calendar-summary-negative { border-top-color: #b25e55; }
.calendar-summary-negative strong { color: var(--red); }
.calendar-summary-attention { border-top-color: #c49b56; }
.calendar-table thead .unit-column-label { display: block; font-size: 12px; font-weight: 650; color: var(--ink); }
.calendar-week-kind { display: block; margin-top: 6px; font-size: 10px; color: #64766b; font-weight: 400; }
.data-table.calendar-table .calendar-current { border-left: 2px solid #85ad97; border-right: 2px solid #85ad97; }
.data-table.calendar-table thead .calendar-current { background: #dfede2; }
.data-table.calendar-table .calendar-undated { border-left: 1px dashed #c6b58c; }
.data-table.calendar-table tbody tr.major th, .data-table.calendar-table tbody tr.major td { font-weight: 700; }
.calendar-plans { margin-top: 24px; }
.calendar-plans > .table-topline { flex-wrap: wrap; }
.calendar-plans > .table-topline .card-heading { margin: 0 auto 0 0; padding: 0; }
.calendar-plans > .table-topline .field { margin: 0; min-width: 140px; }
.calendar-plan { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, .8fr) minmax(145px, .8fr); gap: 14px 24px; padding: 20px; border-top: 1px solid var(--line); align-items: start; }
.calendar-plan:first-child { border-top: 0; }
.calendar-plan h3 { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.calendar-plan-description p { margin: 0; font-size: 11px; line-height: 1.6; }
.calendar-plan-when, .calendar-plan-amount { display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.calendar-plan-when .badge { align-self: flex-start; }
.calendar-plan-amount { text-align: right; font-variant-numeric: tabular-nums; }
.calendar-plan-amount strong { font-size: 16px; }
.calendar-plan-amount small { font-size: 10px; }
.calendar-plan-actions { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
.calendar-plan-links { grid-column: 1 / -1; padding: 14px 16px; border: 1px solid #e0e8df; border-radius: 8px; background: #f8faf6; }
.calendar-orphan-links { margin: 20px; }
.calendar-orphan-links h3 { margin: 0 0 10px; font-size: 13px; }
.calendar-plan-links h4 { margin: 0 0 8px; font-size: 11px; color: #536b5c; }
.calendar-plan-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 0; border-top: 1px solid #e6ece3; }
.calendar-plan-link > div { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.calendar-plan-link strong { flex-basis: 100%; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.calendar-plan-link small { font-size: 10px; }
.calendar-plan-link > .button { flex-shrink: 0; }
.calendar-unlink-detail { margin: 0 0 18px; font-size: 13px; line-height: 1.7; }
.calendar-form { margin: 20px; padding: 22px; border: 1px solid #b5cdbd; border-radius: 9px; background: #f8fbf7; }
.calendar-form .card-heading { margin-bottom: 18px; }
.calendar-form .form-actions { border-top: 1px solid var(--line); padding-top: 18px; flex-wrap: wrap; }
.calendar-form .field-full { grid-column: 1 / -1; }
.calendar-conflict { padding: 14px 16px; margin-bottom: 18px; border: 1px solid #ead8b6; border-radius: 8px; background: var(--amber-pale); color: #75531e; font-size: 12px; }
.calendar-conflict p { margin: 8px 0 0; line-height: 1.6; }
@media (max-width: 760px) {
  .calendar-summary { grid-template-columns: 1fr; gap: 9px; }
  .calendar-summary-card { padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; }
  .calendar-summary-card strong { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 20px; }
  .calendar-summary-card small { grid-column: 1; }
  .calendar-plan { grid-template-columns: 1fr 1fr; padding: 16px; gap: 14px; }
  .calendar-plan-description { grid-column: 1 / -1; }
  .calendar-form { margin: 12px; padding: 16px; }
  .data-table.calendar-table th:first-child { min-width: 230px; max-width: 270px; }
  .calendar-navigation { width: 100%; }
  .calendar-navigation .field { flex: 1; }
  .calendar-plan-link { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
}
@media print { .calendar-navigation, .calendar-plan-actions, .calendar-form, .calendar-plans > .table-topline .button, .calendar-plans > .table-topline .field { display: none !important; } }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; font-size: 11px; font-weight: 600; }
.field input, .field select, .field textarea, .search-input { width: 100%; min-width: 0; color: var(--ink); background: white; border: 1px solid #d5deda; border-radius: 7px; min-height: 42px; padding: 10px 12px; font-size: 13px; font-weight: 400; }
.field select { padding-right: 28px; }
.field input:read-only { background: #f5f7f5; color: var(--muted); }
.field input::placeholder, .search-input::placeholder, textarea::placeholder { color: #8c9a9d; }
.field textarea { min-height: 80px; resize: vertical; }
.field small, .field-help { font-size: 11px; font-weight: 400; line-height: 1.6; }
.field-help { margin: -6px 0 15px; }
.required-mark { color: var(--teal); }
.inline-error { color: var(--red); background: var(--red-pale); border-radius: 6px; padding: 10px 12px; font-size: 12px; line-height: 1.6; margin-bottom: 15px; }
.error-list { margin: 8px 0 0; padding-left: 20px; }
.error-list li { margin-top: 4px; }
.table-topline { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.table-topline h2 { font-size: 14px; margin: 0 0 4px; }
.table-topline p { margin: 0; font-size: 11px; color: var(--muted); }
.table-search { width: 245px; max-width: 50%; flex-shrink: 0; position: relative; }
.table-search .search-input { min-height: 36px; padding-left: 32px; font-size: 11px; }
.search-symbol { position: absolute; left: 11px; top: 8px; color: #849993; font-size: 15px; pointer-events: none; }
.table-scroll { max-width: 100%; max-height: min(70vh, 850px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bdcdc3 #f2f5f2; }
.data-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.data-table th, .data-table td { padding: 13px 16px; border-bottom: 1px solid #edf0ec; vertical-align: top; text-align: left; min-width: 112px; max-width: 420px; }
.data-table thead th { position: sticky; top: 0; z-index: 3; background: #f4f7f3; font-weight: 500; color: #5c706b; font-size: 10px; line-height: 1.55; border-bottom-color: #dae3dc; white-space: normal; min-width: 125px; }
.data-table th:first-child, .data-table td:first-child { position: sticky; left: 0; z-index: 1; background: white; min-width: 190px; max-width: 310px; box-shadow: 1px 0 0 #e3e9e4; }
.data-table thead th:first-child { z-index: 4; background: #f4f7f3; }
.data-table tbody tr:hover td, .data-table tbody tr:hover th { background: #f7faf7; }
.data-table tbody tr.major td, .data-table tbody tr.major th { font-weight: 650; background: #eff5ef; border-bottom-color: #dce6dc; }
.data-table tbody th { font-weight: 500; overflow-wrap: anywhere; }
.data-table tbody td { overflow-wrap: anywhere; }
.data-table .cell-number, .data-table .cell-percent { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.data-table .cell-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table:not(.unit-table) .cell-text { min-width: 160px !important; }
.cell-unknown { color: #88988f; }
.cell-negative { color: #9a4741; }
.cell-detail { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; line-height: inherit; cursor: pointer; }
.cell-detail::after { content: "·"; display: inline-block; color: #759b8c; font-weight: 800; margin-left: 6px; border: 1px solid #c7d9d0; border-radius: 50%; width: 10px; height: 10px; line-height: 6px; vertical-align: 2px; text-align: center; }
.cell-detail:hover { text-decoration: underline; text-underline-offset: 4px; }
.table-footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 13px 20px; color: var(--muted); font-size: 10px; background: #fcfdfb; }
.table-empty { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 12px; }
.report-subtitle { white-space: pre-line; font-size: 12px; line-height: 1.7; color: var(--muted); margin: 18px 0; }
.report-revisions { display: flex; gap: 8px 24px; flex-wrap: wrap; font-size: 10px; color: var(--muted); margin-top: 14px; }
.report-revisions code { font-size: 10px; color: #61796c; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.empty-state { padding: 56px 25px; max-width: 620px; margin: auto; text-align: center; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; margin: 0 auto 20px; background: #edf4ed; color: #769784; font-size: 27px; }
.empty-state h2 { margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 13px; max-width: 440px; margin: 0 auto 22px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--muted); font-size: 12px; }
.spinner { width: 15px; height: 15px; display: inline-block; border: 2px solid #cddbd3; border-top-color: var(--teal); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); gap: 22px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.field-full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form-actions .muted { font-size: 11px; }
.form-card { padding: 24px; }
.kind-picker { max-width: 400px; margin-bottom: 24px; }
.steps { display: flex; gap: 22px; margin: 0 0 24px; padding: 0; list-style: none; }
.steps li { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.step-number { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #d4e1d8; border-radius: 50%; font-size: 10px; background: white; }
.steps .active { color: var(--teal-dark); font-weight: 600; }
.steps .active .step-number { border-color: #9dc8b6; background: var(--teal-pale); }
.dropzone { width: 100%; border: 1.5px dashed #b3cabc; border-radius: 10px; padding: 38px 24px; background: #f8fbf7; text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone.drag-over { border-color: var(--teal); background: #eef7f0; }
.dropzone.busy { opacity: .6; pointer-events: none; }
.dropzone-icon { font-size: 25px; color: #629783; display: block; margin-bottom: 16px; }
.dropzone strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.dropzone p { font-size: 11px; color: var(--muted); margin-bottom: 18px; }
.file-selection { display: flex; gap: 12px; align-items: center; padding: 16px; margin-top: 16px; border: 1px solid #d7e5da; border-radius: 8px; background: #f8fbf7; }
.file-selection strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.file-selection small { color: var(--muted); font-size: 10px; }
.file-selection .icon-button { margin-left: auto; }
.helper-list { margin: 18px 0 0; padding: 0 0 0 19px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.helper-list li { margin-bottom: 12px; padding-left: 3px; }
.helper-panel .button { margin-top: 9px; }
.helper-panel p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.preview { margin-top: 25px; }
.preview-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.preview-count { background: #f5f8f4; border: 1px solid #e6ede6; border-radius: 8px; padding: 12px 15px; }
.preview-count strong { font-size: 23px; display: block; font-weight: 600; letter-spacing: -.5px; }
.preview-count span { font-size: 10px; color: var(--muted); }
.preview-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.preview-heading p { color: var(--muted); font-size: 12px; }
.preview-row-detail { margin-top: 7px; }
.preview-row-detail summary { cursor: pointer; color: var(--teal); font-size: 11px; }
.record-comparison { white-space: pre-line; line-height: 1.8; font-size: 10px; color: #657970; margin: 9px 0; max-width: 380px; }
.records-section { margin-top: 30px; }
.records-section .section-label { align-items: flex-start; }
.record-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.record-id { color: var(--muted); display: block; margin-top: 4px; font-size: 9px; }
.status-cancelled { color: #929b96; }
.cell-dialog { border: 1px solid var(--line); border-radius: 15px; padding: 28px; color: var(--ink); width: min(470px, calc(100vw - 32px)); max-height: calc(100vh - 50px); overflow: auto; box-shadow: 0 20px 80px #132a3626; }
.cell-dialog::backdrop { background: #10252f55; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dialog-heading .eyebrow { margin: 0; }
.dialog-heading .icon-button { margin: -10px -10px -10px 10px; }
.dialog-value { font-size: 30px; letter-spacing: -.5px; margin: 22px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-note { background: #f3f7f1; border: 1px solid #e0e9db; padding: 17px; border-radius: 8px; font-size: 13px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.detail-meta { margin: 24px 0; font-size: 11px; }
.detail-meta dt { color: var(--muted); margin-top: 14px; }
.detail-meta dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 80; max-width: min(520px, calc(100vw - 30px)); padding: 13px 20px; border-radius: 9px; color: white; background: var(--navy); box-shadow: 0 5px 30px #10232e25; font-size: 12px; line-height: 1.6; }
.toast-error { background: #873c36; }
.nav-backdrop { display: none; }
@media (min-width: 1600px) { .main { padding: 40px 48px 20px; } .topbar { padding: 0 48px; } }
@media (max-width: 1200px) {
  .sidebar { width: 230px; }
  .workspace-body { margin-left: 230px; }
  .main { padding: 28px 24px 18px; }
  .topbar { padding: 0 24px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 17px; }
  .overview-grid { grid-template-columns: 1fr; }
  .input-card { padding: 18px; }
  .form-layout { grid-template-columns: minmax(0, 1.6fr) minmax(220px, .8fr); }
}
@media (max-width: 1000px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-layout { grid-template-columns: 1fr; }
  .helper-panel { max-width: none; }
  .helper-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 25px; }
  .input-cards { grid-template-columns: 1fr; }
  .input-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 0 15px; align-items: center; }
  .input-card .shortcut-icon { grid-row: 1 / 3; margin: 0; }
  .input-card h3, .input-card p { grid-column: 2; }
  .input-card p { margin-bottom: 0; font-size: 11px; }
  .input-card .button { grid-row: 1 / 3; grid-column: 3; margin: 0; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 265px; box-shadow: 10px 0 40px #10232e20; }
  .workspace.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: #0b202c77; border: 0; }
  .workspace-body { margin: 0; }
  .menu-toggle { width: 40px; padding: 6px; }
  .menu-toggle-label, .sidebar-rail { display: none; }
  .topbar { height: 58px; gap: 8px; padding: 0 14px; }
  .breadcrumb { flex: 1; }
  .breadcrumb > span, .breadcrumb > strong { display: none; }
  .topbar-actions { gap: 6px; }
  .sync-label { display: none; }
  .main { padding: 24px 18px 18px; }
  .page-heading { gap: 12px; margin-bottom: 22px; }
  .page-heading > .badge { font-size: 9px; padding: 4px 7px; margin-top: 24px; }
  .page-description { font-size: 12px; }
  h1 { font-size: 26px; }
  .page-footer { flex-direction: column; gap: 5px; }
  .card-pad, .form-card { padding: 20px; }
  .toolbar { gap: 12px; }
  .toolbar .field, .toolbar .field-wide { min-width: 130px; flex: 1; max-width: none; }
  .toolbar .button { flex: 1; }
  .table-topline { padding: 14px; }
  .table-search { width: 190px; }
  .data-table th, .data-table td { padding: 12px; font-size: 11px; }
  .data-table th:first-child, .data-table td:first-child { min-width: 145px; max-width: 195px; }
  .table-footer { padding: 12px 14px; font-size: 9px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 28px; }
  .login-story-copy { padding: 28px 0 0; max-width: none; }
  .login-story-copy h1 { font-size: 34px; margin-bottom: 12px; }
  .login-story-copy .eyebrow, .login-story-copy p, .login-diagram, .login-footnote { display: none; }
  .login-side { padding: 36px 25px; }
  .login-card h2 { font-size: 26px; }
}
@media (max-width: 460px) {
  .main { padding: 22px 14px 16px; }
  .page-heading { flex-direction: column; gap: 12px; }
  .page-heading > .badge { margin: 0; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-value { font-size: 25px; margin-top: 12px; }
  .stat-value-small { font-size: 17px; }
  .report-shortcuts { grid-template-columns: 1fr; }
  .input-card { grid-template-columns: 31px 1fr; }
  .input-card .button { grid-column: 2; grid-row: auto; margin-top: 14px; justify-self: start; }
  .form-grid { grid-template-columns: 1fr; }
  .helper-list { display: block; }
  .steps { gap: 12px; }
  .steps li { font-size: 10px; gap: 5px; }
  .step-number { width: 22px; height: 22px; }
  .preview-summary { grid-template-columns: 1fr 1fr; gap: 10px; }
  .preview-heading, .card-heading { flex-wrap: wrap; }
  .table-topline { align-items: flex-start; flex-direction: column; gap: 12px; }
  .table-search { width: 100%; max-width: none; }
  .data-table th:first-child, .data-table td:first-child { min-width: 110px; max-width: 160px; }
  .data-table thead th { min-width: 110px; }
  .table-footer { flex-direction: column; align-items: flex-start; gap: 5px; }
  .button { white-space: normal; }
  .dropzone { padding: 28px 16px; }
  .cell-dialog { padding: 23px; }
  .form-actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .sidebar, .sidebar-rail, .topbar, .toolbar, .page-footer, .table-search, .toast { display: none !important; } .workspace .workspace-body, .workspace.sidebar-collapsed .workspace-body { margin: 0; } .main { padding: 0; } .table-scroll { overflow: visible; max-height: none; } .data-table th, .data-table td { position: static !important; } }

.filter-table th, .filter-table td { vertical-align: middle; }
.unit-heading { padding-bottom: 2px; }
.unit-cost-toggle { display: flex; align-items: flex-start; gap: 8px; width: 100%; border: 0; padding: 4px 0; background: transparent; color: #315b49; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.unit-cost-toggle::before { content: ""; flex: 0 0 7px; width: 7px; height: 7px; margin: 4px 2px 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.unit-cost-toggle[aria-expanded="true"]::before { transform: rotate(45deg); margin-top: 2px; }
.unit-cost-toggle:hover { color: #163e2f; }
.unit-cost-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 3px; }
.unit-cost-unit { display: block; margin-top: 4px; font-weight: 400; color: #6a7d73; }
.unit-table .unit-cost-total { font-weight: 750; background: #edf5ef; border-left: 2px solid #bdd2c3; }
.unit-table thead .unit-cost-total { background: #e5f0e8; }
.unit-table .unit-cost-total .unit-cost-toggle { font-weight: 750; }
.unit-table tbody tr:hover .unit-cost-total { background: #e5f0e8; }
.unit-table th[hidden], .unit-table td[hidden] { display: none; }
.filter-table thead th { vertical-align: bottom; min-width: 156px; }
.filter-table .column-filter { display: block; margin-top: 10px; width: 100%; max-width: 240px; min-width: 0; height: 32px; box-sizing: border-box; padding: 5px 22px 5px 7px; font-size: 11px; }
.unit-table th:nth-child(1), .unit-table td:nth-child(1) { width: 108px; min-width: 108px; max-width: 108px; box-sizing: border-box; }
.unit-table th:nth-child(2), .unit-table td:nth-child(2) { width: 180px; min-width: 180px; max-width: 180px; box-sizing: border-box; }
.unit-table th:nth-child(3), .unit-table td:nth-child(3) { width: 128px; min-width: 128px; max-width: 128px; box-sizing: border-box; }
.unit-table th:nth-child(4), .unit-table td:nth-child(4) { min-width: 260px; }
.unit-table tbody th, .unit-table tbody td { height: 104px; }
.unit-photo { display: block; width: 72px; height: 80px; object-fit: contain; border-radius: 4px; }
@media (min-width: 900px) {
  .unit-table th:nth-child(2), .unit-table td:nth-child(2), .unit-table th:nth-child(3), .unit-table td:nth-child(3) { position: sticky; z-index: 1; background: white; }
  .unit-table th:nth-child(2), .unit-table td:nth-child(2) { left: 108px; }
  .unit-table th:nth-child(3), .unit-table td:nth-child(3) { left: 288px; box-shadow: 1px 0 0 #e3e9e4; }
  .unit-table thead th:nth-child(2), .unit-table thead th:nth-child(3) { z-index: 4; background: #f4f7f3; }
}
@media print { .filter-table .column-filter { display: none; } }

.catalog-table th:first-child, .catalog-table td:first-child { min-width: 108px; width: 108px; box-sizing: border-box; }
.catalog-table th:nth-child(2), .catalog-table td:nth-child(2) { min-width: 280px; max-width: 380px; }
.catalog-table tbody th, .catalog-table tbody td { height: 104px; }

.journal-table th:first-child, .journal-table td:first-child { min-width: 156px; width: 156px; white-space: nowrap; }
.journal-table th:nth-child(2), .journal-table td:nth-child(2) { min-width: 156px; white-space: nowrap; }
.journal-table th:nth-child(3), .journal-table td:nth-child(3) { min-width: 76px; width: 76px; max-width: 76px; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.journal-table th:nth-child(7), .journal-table td:nth-child(7) { min-width: 340px; max-width: 460px; white-space: normal; }
.journal-table .unit-heading { min-height: 44px; }
#report-result > .card + .card { margin-top: 24px; }

.cashback-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 0 0 18px; }
.cashback-heading > .button { flex-shrink: 0; min-height: 44px; }
.cashback-heading h2 { font-size: 25px; margin-bottom: 6px; }
.cashback-heading p { font-size: 12px; margin: 0; }
.cashback-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.cashback-total { padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; border-top: 3px solid #aebfb7; }
.cashback-total > span { font-size: 12px; }
.cashback-total strong { font-size: clamp(20px, 2.2vw, 28px); font-weight: 650; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.cashback-total small { font-size: 11px; }
.cashback-total-paid { border-top-color: var(--teal); }
.cashback-total-pending { border-top-color: #c49b56; }
.cashback-table-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-left: auto; }
.cashback-table-actions .field { min-width: 165px; margin: 0; font-size: 10px; gap: 4px; }
.cashback-table-actions .field select { min-height: 38px; padding: 7px 28px 7px 10px; font-size: 12px; }
.cashback-table-actions .button { min-height: 38px; }
.cashback-form { padding: 24px; margin: 0 0 22px; border-color: #a6c6b6; box-shadow: 0 4px 20px #173b2808; }
.cashback-form .card-heading h2 { font-size: 18px; }
.cashback-form .card-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.cashback-form-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 30px; }
.cashback-form-group { min-width: 0; border: 0; padding: 0; margin: 0; }
.cashback-form-group legend { padding: 0; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: #315d50; }
.cashback-form-group .form-grid { column-gap: 16px; }
.cashback-form .field { font-size: 11px; margin-bottom: 14px; }
.cashback-form .field input, .cashback-form .field select { min-height: 40px; }
.cashback-form .field textarea { min-height: 65px; }
.cashback-suggestion { background: #f3f7f3; border-radius: 6px; margin: 0 0 16px; padding: 9px 11px; }
.cashback-actual { border: 1px solid #d8e7df; border-radius: 8px; background: #f7faf7; padding: 14px 14px 0; }
.cashback-form-actions { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.cashback-form-actions > .muted { margin-left: auto; }
.cashback-conflict { padding: 14px 16px; margin-bottom: 22px; border: 1px solid #ead8b6; border-radius: 8px; background: var(--amber-pale); color: #75531e; font-size: 12px; }
.cashback-conflict ul { margin: 10px 0 0; padding-left: 19px; }
.cashback-conflict li { margin-bottom: 5px; overflow-wrap: anywhere; }
.cashback-conflict p { margin: 8px 0 0; }
.cashback-table th:first-child, .cashback-table td:first-child { min-width: 240px; max-width: 340px; }
.cashback-table th:nth-child(2), .cashback-table td:nth-child(2) { min-width: 128px !important; }
.cashback-table .column-filter { max-width: 180px; }
.cashback-table tbody td, .cashback-table tbody th { vertical-align: middle; }
.cashback-table .cashback-action { position: sticky; right: 0; min-width: 106px; max-width: 106px; background: white; box-shadow: -1px 0 0 #e3e9e4; z-index: 1; padding: 12px 8px; }
.cashback-table thead .cashback-action { z-index: 4; background: #f4f7f3; }
.cashback-row-warnings { margin: 9px 0 0; padding: 0; list-style: none; font-size: 10px; color: var(--amber); line-height: 1.5; }
.cashback-row-warnings li { padding-left: 8px; border-left: 2px solid #d8b578; margin-top: 6px; }
@media (max-width: 1000px) {
  .cashback-form-groups { grid-template-columns: 1fr; gap: 18px; }
  .cashback-form-group + .cashback-form-group { border-top: 1px solid var(--line); padding-top: 16px; }
  .cashback-form-group + .cashback-form-group legend { padding-top: 5px; }
}
@media (max-width: 760px) {
  .cashback-totals { gap: 9px; }
  .cashback-total { padding: 14px 12px; }
  .cashback-total strong { font-size: 19px; }
  .cashback-total > span, .cashback-total small { font-size: 10px; }
  .cashback-form { padding: 18px; }
  .cashback-table-topline { align-items: flex-start; flex-wrap: wrap; }
  .cashback-table-topline > .button-quiet { margin-left: auto; }
  .cashback-table-actions { margin-left: 0; order: 2; flex: 1 1 100%; }
  .cashback-table .cashback-action { position: static; min-width: 100px; }
  .cashback-form-actions > .muted { margin-left: 0; }
}
@media (max-width: 460px) {
  .cashback-totals { grid-template-columns: 1fr; }
  .cashback-total { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; padding: 12px 14px; }
  .cashback-total strong { grid-column: 2; grid-row: 1 / 3; }
  .cashback-total small { grid-column: 1; }
  .cashback-table-actions { width: 100%; }
  .cashback-table-actions .field, .cashback-table-actions .button { flex: 1; }
  .cashback-form-actions > .muted { width: 100%; }
}
@media print {
  .cashback-heading > .button, .cashback-form, .cashback-table-actions, .cashback-action, .cashback-row-warnings { display: none !important; }
}

/* Platform switch above the shipment register. */
.shipment-platforms { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-muted, #edf1f6); }
.shipment-platform { min-width: 88px; padding: 10px 18px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-weight: 650; cursor: pointer; }
.shipment-platform[aria-pressed="true"] { color: #fff; background: #2458cf; box-shadow: 0 2px 5px #173b8326; }
.shipment-platform:focus-visible { outline: 3px solid #8eafff; outline-offset: 2px; }
.shipments-table { min-width: 1250px; }
.shipments-table th:first-child { min-width: 120px; }
.shipments-table th:nth-child(2) { min-width: 220px; }
.shipments-table th:nth-child(4) { min-width: 160px; }
.shipments-table tbody tr.shipment-total > th,
.shipments-table tbody tr.shipment-total > td {
  color: #000; font-weight: 700; background: #f1f3f5;
  border-top: 2px solid #c7cdd4; border-bottom: 2px solid #c7cdd4;
}
.pnl-table { border-collapse: separate; border-spacing: 0; }
.pnl-table thead th { min-width: 150px; white-space: pre-line; vertical-align: middle; text-align: right; }
.pnl-table thead th:nth-child(odd):not(:first-child) { min-width: 106px; }
.pnl-table th:first-child { position: sticky; left: 0; min-width: 310px; max-width: 410px; text-align: left; background: var(--surface, #fff); z-index: 2; }
.pnl-table thead th:first-child { z-index: 5; }
.pnl-table tbody tr.major th, .pnl-table tbody tr.major td { color: #172c23; font-weight: 750; background: #eaf1eb; border-top: 1px solid #ceddd2; }
.pnl-table td:nth-child(odd) { color: #64756d; border-right: 1px solid #d7e1da; }
.pnl-table td:nth-last-child(2), .pnl-table th:nth-last-child(2) { border-left: 2px solid #a6baad; }
.pnl-source-dates { margin-top: 9px; font-size: 13px; color: #64756d; }
.pnl-review-items { padding: 16px 20px; border-top: 1px solid #d7e1da; }
.pnl-review-items summary { cursor: pointer; font-weight: 600; }
.pnl-review-items ul { max-width: 1000px; line-height: 1.55; padding-left: 20px; }

/* SKU finance: reference column pairs, stable identifiers and selected totals. */
.sku-finance-scroll { max-height: min(74vh, 900px); }
.data-table.sku-finance-table { width: max-content; min-width: 100%; font-size: 12px; }
.data-table.sku-finance-table th, .data-table.sku-finance-table td { box-sizing: border-box; padding: 12px; min-width: 146px; vertical-align: middle; }
.data-table.sku-finance-table .cell-percent, .data-table.sku-finance-table .sku-kind-percent { min-width: 88px; width: 88px; max-width: 110px; }
.data-table.sku-finance-table .sku-kind-quantity { min-width: 100px; width: 100px; }
.data-table.sku-finance-table .sku-fixed { position: sticky; z-index: 2; background: white; overflow-wrap: anywhere; white-space: normal; }
.data-table.sku-finance-table .sku-fixed-0 { left: 0; width: 160px; min-width: 160px !important; max-width: 160px !important; }
.data-table.sku-finance-table .sku-fixed-1 { left: 160px; width: 140px; min-width: 140px !important; max-width: 140px !important; }
.data-table.sku-finance-table .sku-fixed-2 { left: 300px; width: 180px; min-width: 180px !important; max-width: 180px !important; box-shadow: 2px 0 0 #cbd8d0; }
.data-table.sku-finance-table .sku-group-head th { top: 66px; height: 72px; background: #e5eee8; color: #274a3a; font-size: 12px; font-weight: 650; text-align: center; border-right: 1px solid #cfddd3; }
.data-table.sku-finance-table .sku-filter-head th { top: 138px; height: 64px; padding: 4px 8px 10px; background: #f3f7f4; }
.sku-column-unit { display: block; height: 18px; line-height: 18px; text-align: center; color: #62766a; }
.sku-finance-table .column-filter { width: 100%; min-width: 0; max-width: 140px; height: 30px; font-size: 10px; }
.data-table.sku-finance-table .sku-total th { top: 0; height: 66px; background: #dcebdd; color: #172c23; font-weight: 750; font-size: 13px; border-bottom: 2px solid #9db8a5; }
.data-table.sku-finance-table thead .sku-fixed { z-index: 5; }
.data-table.sku-finance-table .sku-unallocated td { background: #f1f4f2; border-top: 2px solid #cbd8d0; font-weight: 600; }
.data-table.sku-finance-table .sku-profit { font-weight: 750; }
.sku-finance-card .table-footer { align-items: flex-start; gap: 18px; }

.sku-finance-table .sku-group-end { border-right: 1px solid #c3d2c8; }
.sku-finance-table .sku-total .sku-group-end { border-right-color: #a9bfaf; }
.sku-display-controls { display: flex; align-items: center; gap: 6px; padding: 0 20px 16px; flex-wrap: wrap; }
.sku-display-controls button { border: 1px solid #d2dfd6; border-radius: 7px; background: #fff; }
.sku-display-controls button[aria-pressed="true"] { background: #315b49; color: #fff; border-color: #315b49; }
.sku-unit-basis { margin-left: 10px; color: #617468; font-size: 12px; }

.checklist-intro { display: flex; align-items: center; gap: 20px; padding: 22px; margin-bottom: 16px; }
.checklist-photo { width: 76px; height: 100px; object-fit: contain; border-radius: 10px; background: #f4f6f3; }
.checklist-product h2 { margin: 4px 0; font-size: 24px; }
.checklist-product p { margin: 6px 0; }
.checklist-product .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #617468; }
.checklist-stale { color: #916521; font-size: 13px; }
.checklist-totals { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.checklist-total { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.checklist-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.checklist-checks { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.checklist-check { flex: 1; min-width: 220px; padding: 16px; border-left: 3px solid #d0a45b; }
.checklist-check p { margin: 8px 0 0; font-size: 13px; }
.checklist-editor { padding: 20px; margin-bottom: 16px; }
.checklist-editor textarea { width: 100%; margin-bottom: 12px; resize: vertical; }
.checklist-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 18px 18px 8px; }
.checklist-tabs button { border: 1px solid #d6e1d9; border-radius: 8px; }
.checklist-tabs button[aria-pressed="true"] { background: #315b49; border-color: #315b49; color: #fff; }
.checklist-group-note { padding: 0 20px; margin: 8px 0 16px; color: #617468; font-size: 13px; }
.checklist-scroll { max-height: 70vh; }
.data-table.checklist-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table.checklist-table thead { position: sticky; top: 0; z-index: 4; }
.data-table.checklist-table th { position: static; background: #f0f5f0; min-width: 125px; max-width: 180px; vertical-align: middle; }
.checklist-table .unit-column-label { min-height: 58px; display: flex; align-items: center; }
.data-table.checklist-table .checklist-summary th { font-weight: 750; background: #e0ecdf; border-bottom: 1px solid #b9cdbb; height: 46px; white-space: nowrap; }
.checklist-filters select { width: 100%; max-width: 170px; height: 30px; font-size: 12px; }
.data-table.checklist-table .checklist-date { position: sticky; left: 0; min-width: 112px; max-width: 112px; width: 112px; background: #fff; z-index: 2; }
.data-table.checklist-table .checklist-action { position: sticky; left: 112px; min-width: 220px; max-width: 220px; width: 220px; background: #fff; z-index: 2; }
.data-table.checklist-table thead .checklist-date, .data-table.checklist-table thead .checklist-action { z-index: 6; background: #f0f5f0; }
.data-table.checklist-table .checklist-summary .checklist-date, .data-table.checklist-table .checklist-summary .checklist-action { background: #e0ecdf; }
.checklist-action-text { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.data-table.checklist-summary-table .checklist-date { min-width: 84px; max-width: 84px; width: 84px; padding: 8px; }
.data-table.checklist-summary-table .checklist-action { left: 84px; min-width: 192px; max-width: 192px; width: 192px; font-weight: 650; }
.data-table.checklist-summary-table .checklist-identity-band { position: static; min-width: 0; }
.summary-product-photo { display: block; width: 56px; height: 72px; object-fit: contain; border-radius: 8px; background: #f4f6f3; margin: auto; }
.summary-product-text { min-width: 150px; max-width: 260px; white-space: normal; overflow-wrap: anywhere; }
.checklist-boundary { border-left: 1px solid #c8d8cc; }
.checklist-unconnected { padding: 18px 4px; color: #617468; font-size: 13px; }
.checklist-unconnected summary { cursor: pointer; }
.checklist-current-stock { margin-left: auto; padding-left: 20px; border-left: 1px solid #d6e1d9; display: flex; flex-direction: column; gap: 8px; }
.checklist-current-stock strong { font-size: 24px; }
@media (max-width: 1100px) { .checklist-totals { grid-template-columns: repeat(3, minmax(140px, 1fr)); } }
@media (max-width: 700px) { .checklist-totals { grid-template-columns: repeat(2, minmax(120px, 1fr)); } .checklist-total strong { font-size: 18px; } }

/* Checklist: visible reporting period and contiguous metric bands. */
.checklist-period { padding: 16px 20px; border: 1px solid #c3d6cb; border-radius: 12px; background: #f3f8f5; gap: 18px; }
.checklist-period label { font-size: 14px; font-weight: 650; }
.checklist-period input[type="date"] { min-width: 175px; height: 42px; font-size: 16px; }
.checklist-period select { min-width: 220px; height: 42px; }
.data-table.checklist-table .checklist-bands th { height: 42px; padding: 10px 14px; color: #20352d; font-size: 14px; font-weight: 750; border-bottom: 2px solid #c0d4c8; text-align: left; }
.data-table.checklist-table .checklist-band-ads { background: #d5e6f4; }
.data-table.checklist-table .checklist-band-unified { background: #dcdff3; }
.data-table.checklist-table .checklist-band-manual { background: #e6d9ee; }
.data-table.checklist-table .checklist-band-cpc_ads { background: #f1e2d3; }
.data-table.checklist-table .checklist-band-funnel { background: #d6e9d9; }
.data-table.checklist-table .checklist-band-economy { background: #f0e7c8; }
.data-table.checklist-table .checklist-identity-band { position: sticky; left: 0; z-index: 6; min-width: 332px; background: #edf2ee; }
.checklist-boundary { border-left: 2px solid #c5d3cb; }

/* Header help keeps its space, appearing on hover or keyboard focus. */
.checklist-table .unit-column-label { gap: 6px; justify-content: space-between; }
.metric-header-text { min-width: 0; }
.metric-help-button { flex: 0 0 26px; width: 26px; height: 26px; min-height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #98b3a2; border-radius: 6px; background: #fff; color: #315b49; font-size: 14px; font-weight: 750; cursor: pointer; opacity: 0; }
.checklist-col:hover .metric-help-button, .checklist-col:focus-within .metric-help-button { opacity: 1; }

/* Monthly RNP: four pinned identity columns, eight metric rows per product. */
.rnp-toolbar { padding: 16px; background: #f3f8f5; border: 1px solid #c3d6cb; border-radius: 12px; }
.rnp-toolbar input[type="month"] { min-width: 170px; font-size: 16px; }
.rnp-toolbar select { min-width: 190px; }
.rnp-toolbar input[type="checkbox"], .rnp-switches input { width: 18px; height: 18px; accent-color: #315b49; }
.rnp-switches { display: flex; flex-wrap: wrap; gap: 14px; border: 0; padding: 10px 0 18px; margin: 0; }
.rnp-switches legend { font-size: 12px; color: var(--muted); }
.rnp-switches .field { display: flex; align-items: center; flex-direction: row-reverse; gap: 6px; font-size: 12px; }
.rnp-note { margin: 0; padding: 12px 16px; color: #617468; font-size: 12px; }
.rnp-scroll { max-height: 76vh; overflow: auto; position: relative; }
.data-table.rnp-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.rnp-caption { padding: 12px; text-align: left; font-weight: 650; color: #315b49; }
.data-table.rnp-table th, .data-table.rnp-table td { box-sizing: border-box; padding: 7px 9px; height: 37px; border-right: 1px solid #e3e9e4; border-bottom: 1px solid #e3e9e4; }
.data-table.rnp-table thead { position: sticky; top: 0; z-index: 8; }
.data-table.rnp-table thead th { position: static; text-align: center; background: #e9f0ea; color: #284536; font-size: 11px; min-width: 96px; white-space: normal; }
.data-table.rnp-table .rnp-photo-cell, .data-table.rnp-table .rnp-product, .data-table.rnp-table .rnp-current, .data-table.rnp-table .rnp-metric { position: sticky; z-index: 3; white-space: normal; overflow-wrap: anywhere; text-align: left; background: #fff; }
.data-table.rnp-table .rnp-photo-cell { left: 0; width: 78px; min-width: 78px; max-width: 78px; text-align: center; box-shadow: none; }
.data-table.rnp-table .rnp-product { left: 78px; width: 206px; min-width: 206px; max-width: 206px; font-weight: 400; }
.data-table.rnp-table .rnp-current { left: 284px; width: 156px; min-width: 156px; max-width: 156px; }
.data-table.rnp-table .rnp-metric { left: 440px; width: 160px; min-width: 160px; max-width: 160px; box-shadow: 2px 0 0 #c7d7cb; font-weight: 600; }
.data-table.rnp-table thead .rnp-photo-cell, .data-table.rnp-table thead .rnp-product, .data-table.rnp-table thead .rnp-current, .data-table.rnp-table thead .rnp-metric { background: #e9f0ea; z-index: 9; }
.data-table.rnp-table .rnp-section { font-weight: 700; border-bottom: 2px solid #b7cdbd; }
.data-table.rnp-table .rnp-period { height: 56px; }
.data-table.rnp-table td.numeric { min-width: 96px; white-space: nowrap; }
.data-table.rnp-table .rnp-days { min-width: 78px; }
.data-table.rnp-table .rnp-block-start > * { border-top: 2px solid #bccfc1; }
.rnp-product p { margin: 7px 0; font-size: 12px; line-height: 1.5; }
.rnp-product strong { font-size: 14px; }
.rnp-photo { width: 58px; height: 86px; display: block; object-fit: contain; margin: auto; border-radius: 6px; }
.rnp-current-item { margin: 9px 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px; font-size: 11px; }
.rnp-current-item > span { grid-column: 1 / -1; color: #617468; }
.rnp-current-item strong { font-size: 14px; }
.rnp-metric .metric-help-button { margin-left: 5px; }
.rnp-table .metric-help-button { opacity: 0; }
.rnp-metric:hover .metric-help-button, .rnp-metric:focus-within .metric-help-button,
.rnp-current-item:hover .metric-help-button, .rnp-current-item:focus-within .metric-help-button { opacity: 1; }
.data-table.rnp-table .rnp-group-orders > .numeric, .data-table.rnp-table .rnp-group-orders > .rnp-metric { background: #e7f2fc; color: #204e78; }
.data-table.rnp-table .rnp-group-buyouts > .numeric, .data-table.rnp-table .rnp-group-buyouts > .rnp-metric { background: #fff0df; color: #815119; }
.data-table.rnp-table .rnp-group-ads > .numeric, .data-table.rnp-table .rnp-group-ads > .rnp-metric { background: #fce8e7; color: #933d39; }
.data-table.rnp-table .rnp-group-profit > .numeric, .data-table.rnp-table .rnp-group-profit > .rnp-metric { background: #e3f2e5; color: #2f613b; }
.data-table.rnp-table .rnp-summary > * { font-weight: 700; border-bottom-color: #b7c9bb; }
.data-table.rnp-table .rnp-summary > .rnp-product, .data-table.rnp-table .rnp-summary > .rnp-photo-cell, .data-table.rnp-table .rnp-summary > .rnp-current { background: #edf4ed; }
.rnp-sparkline { display: block; width: 120px; height: 32px; }
.rnp-sparkline svg { width: 120px; height: 32px; display: block; }
.rnp-editor { padding: 20px; margin-bottom: 16px; }
.rnp-plan-fields { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 12px; }
@media (max-width: 760px) {
  .rnp-plan-fields { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
  .data-table.rnp-table .rnp-photo-cell { display: none; }
  .data-table.rnp-table .rnp-product { left: 0; min-width: 136px; width: 136px; max-width: 136px; }
  .data-table.rnp-table .rnp-current { left: auto; position: static; min-width: 136px; width: 136px; max-width: 136px; }
  .data-table.rnp-table .rnp-metric { left: 136px; min-width: 126px; width: 126px; max-width: 126px; }
}
.metric-help-button:hover { background: #dcece2; }
.metric-help-button:focus-visible { outline: 2px solid #315b49; outline-offset: 2px; }
.metric-help-block { margin: 16px 0; font-size: 15px; line-height: 1.55; }
.metric-help-block strong { font-size: 13px; color: #315b49; }
.metric-help-block p { margin: 5px 0 0; white-space: normal; }
.metric-help-block.muted { font-size: 13px; }
@media (hover: none) { .metric-help-button { opacity: 1; } }
