/* Visual-only redesign layer. Keep IDs, data attributes and event wiring intact. */
:root {
  --ink: #203328;
  --muted: #708176;
  --line: #dce8df;
  --paper: #f2f6f3;
  --white: #ffffff;
  --green: #155c43;
  --green2: #e5f2e9;
  --lime: #c9e8d2;
  --orange: #a96c17;
  --red: #a84e48;
  --nav: #103b2b;
  --accent: #19704e;
  --shadow: 0 12px 34px rgb(24 58 39 / 8%);
  --radius: 18px;
  --surface-soft: #f7faf7;
  --focus: #71a889;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  background:
    radial-gradient(ellipse at 91% 15%, rgb(203 234 214 / 44%), transparent 32rem),
    radial-gradient(ellipse at 24% 82%, rgb(222 241 228 / 36%), transparent 36rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, select, textarea { min-width: 0; max-width: 100%; }
button, .btn, input, select, textarea { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 40%, transparent);
  outline-offset: 2px;
}

.app { grid-template-columns: 252px minmax(0, 1fr); min-width: 0; }
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  min-height: 560px;
  overflow-y: auto;
  padding: 25px 15px 16px;
  gap: 20px;
  background: linear-gradient(158deg, #164d37 0%, #103b2b 55%, #0b3022 100%);
  box-shadow: 8px 0 30px rgb(22 55 37 / 8%);
}
.brand { padding: 4px 12px 9px; }
.brand strong { font-size: 20px; letter-spacing: .15em; }
.brand small { color: #b4c9bb; font-size: 9px; letter-spacing: .21em; }
.rolebox { border-color: rgb(224 241 229 / 16%); background: rgb(255 255 255 / 7%); }
.rolebox label { color: #bfd1c4; }
.rolebox select { color: #f4faf6; border-color: rgb(220 240 226 / 24%); background: #153d2d; }
.nav { gap: 6px; }
.nav button {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #d1dfd5;
  font-size: 12px;
  font-weight: 600;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.nav button:hover { background: rgb(255 255 255 / 9%); transform: translateX(2px); }
.nav button.active { background: linear-gradient(105deg, #2e7655, #276746); color: #fff; box-shadow: inset 0 0 0 1px rgb(219 243 225 / 10%); }
.nav .icon { width: 22px; font-size: 17px; }
.side-foot { border-color: rgb(232 244 235 / 16%); color: #b5c9bb; line-height: 1.45; }
.side-foot b { color: #f3f8f4; }
.mobile-nav { display: contents; }
.mobile-nav > summary { display: none; }
.mobile-nav:not([open]) > #nav { display: grid; }

.main { min-width: 0; }
.topbar {
  min-height: 76px;
  height: auto;
  padding: 12px clamp(18px, 2.6vw, 38px);
  gap: 18px;
  background: rgb(255 255 255 / 84%);
  border-color: var(--line);
  box-shadow: 0 3px 18px rgb(20 54 35 / 3%);
}
.crumb { flex: 0 1 auto; font-size: 11px; }
.crumb strong { font-size: 13px; }
.top-controls { min-width: 0; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.top-controls select, .top-controls button, .btn {
  min-height: 40px;
  border-color: var(--line);
  border-radius: 11px;
  background-color: var(--white);
  color: var(--ink);
}
.top-controls select { min-width: 142px; }
.top-controls .month { min-width: 132px; }
.top-controls .account-chip { max-width: 245px; overflow: hidden; text-overflow: ellipsis; }
.top-controls button.primary, .btn.primary, button.primary {
  border-color: var(--green);
  background: linear-gradient(135deg, #1b7050, #155c43);
  color: #fff;
  box-shadow: 0 5px 14px rgb(21 92 67 / 18%);
}
.top-controls button.primary:hover, .btn.primary:hover, button.primary:hover { background: #104f38; transform: translateY(-1px); }
.btn:not(.primary):hover, .top-controls button:not(.primary):hover { border-color: #a7c7b2; background-color: var(--surface-soft); }
button:disabled, .btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.content { width: 100%; max-width: 1660px; padding: clamp(22px, 2.3vw, 36px) clamp(18px, 2.6vw, 40px) 56px; }
.page { min-width: 0; }
.title-row { margin-bottom: 22px; }
.title-row h1 { font-size: clamp(23px, 2vw, 30px); line-height: 1.18; letter-spacing: -.035em; }
.subtitle { max-width: 72ch; color: var(--muted); line-height: 1.5; }
.grid { gap: 16px; }
.panel, .kpi, .modal, .dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.panel { padding: clamp(16px, 1.6vw, 24px); margin-bottom: 16px; }
.panel-head { align-items: flex-start; margin-bottom: 16px; }
.panel-head h2 { font-size: 16px; letter-spacing: -.015em; }
.panel-head p { max-width: 70ch; color: var(--muted); line-height: 1.5; }
.kpi { min-width: 0; padding: 18px; }
.kpi label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.kpi strong { display: block; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi small { font-size: 11px; line-height: 1.45; }
.tag, .station, .device-chip { border-radius: 999px; }
.tag { background: var(--green2); color: var(--green); }
.station { background: #edf4ef; color: #466252; }
.field label, .field > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.field input, .field select, .field textarea, .top-controls select, .docs-toolbar input, .docs-toolbar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.field input, .field select, .field textarea { min-height: 42px; padding: 9px 11px; }
input::placeholder, textarea::placeholder { color: #9aa89e; }
.table-wrap { min-width: 0; border-radius: 12px; }
.data { min-width: 760px; }
.data th { background: #f5f8f5; color: #607467; font-size: 10px; font-weight: 700; letter-spacing: .015em; }
.data td { border-color: #edf2ee; font-size: 12px; }
.data tbody tr:hover td { background-color: #f7faf7; }
.data .money, .money, .num { font-variant-numeric: tabular-nums; }
.calc-strip, .pay-total { border: 1px solid #d8e9dd; background: linear-gradient(110deg, #edf7f0, #e3f1e8); }
.pay-total { border-radius: 13px; }
.pay-total b { color: var(--green); }
.muted-box { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; }
.role-note { border-color: #f0dfb9; border-radius: 12px; background: #fff8e8; }
.expense-tabs, .acts-tabs, .rev-tabs { gap: 8px; }
.expense-tabs button, .acts-tabs button, .rev-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--muted);
}
.expense-tabs button.active, .acts-tabs button.active, .rev-tabs button.active {
  border-color: #bad7c3;
  background: var(--green2);
  color: var(--green);
  font-weight: 700;
}
.docs-toolbar, .filter-row, .right-actions, .rev-tools { min-width: 0; }
.filter-row, .right-actions { flex-wrap: wrap; }
.chart { max-width: 100%; }
.schedule-wrap, .rev-edit-wrap { max-width: 100%; }
.modal-back { padding: clamp(10px, 3vw, 24px); }
.modal { border-radius: 20px; }

@media (max-width: 1120px) {
  .app { grid-template-columns: 218px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .top-controls { width: 100%; justify-content: flex-start; }
  .content { padding-inline: 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 9px 12px;
    gap: 4px 10px;
  }
  .sidebar > .brand { padding: 3px 7px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 8px; }
  .sidebar .rolebox { grid-column: 1 / -1; margin: 5px 0 0; }
  .mobile-nav { display: block; grid-column: 2; grid-row: 1; min-width: 0; }
  .mobile-nav > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgb(233 246 237 / 25%);
    border-radius: 11px;
    background: rgb(255 255 255 / 8%);
    color: #f4faf6;
    list-style: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
  }
  .mobile-nav > summary::-webkit-details-marker { display: none; }
  .mobile-nav > summary::before { content: "☰"; font-size: 15px; }
  .mobile-nav > #nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 8px 0 2px; }
  .mobile-nav:not([open]) > #nav { display: none; }
  .nav button { min-width: 0; min-height: 42px; padding: 8px 9px; font-size: 11px; white-space: normal; line-height: 1.25; }
  .nav button:hover { transform: none; }
  .sidebar .side-foot { display: none; }
  .topbar {
    position: relative;
    min-height: 0;
    padding: 11px 13px 13px;
    gap: 8px;
  }
  .crumb { width: 100%; font-size: 10px; }
  .crumb strong { font-size: 12px; }
  .top-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }
  .top-controls select, .top-controls button, .top-controls .btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 9px;
    font-size: 11px;
    white-space: normal;
  }
  .top-controls .account-chip, .top-controls #topAction { grid-column: 1 / -1; max-width: none; }
  .content { padding: 16px 12px calc(32px + env(safe-area-inset-bottom)); }
  .title-row { gap: 8px; margin-bottom: 14px; }
  .title-row h1 { font-size: clamp(21px, 6vw, 26px); }
  .title-row .tag { white-space: normal; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; border-radius: 14px; }
  .kpi strong { font-size: clamp(18px, 5vw, 22px); }
  .panel { padding: 14px; margin-bottom: 11px; border-radius: 15px; }
  .panel-head { flex-wrap: wrap; gap: 9px; }
  .panel-head > :last-child { max-width: 100%; }
  .panel-head h2 { font-size: 15px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .revenue-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row, .right-actions, .acts-tabs, .expense-tabs, .rev-tools { flex-wrap: wrap; }
  .filter-row > *, .right-actions > * { min-width: 0; max-width: 100%; }
  .right-actions .btn { flex: 1 1 140px; white-space: normal; }
  .inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-form .field { min-width: 0; }
  .inline-form .field-full { grid-column: 1 / -1; }
  .docs-toolbar { grid-template-columns: minmax(0, 1fr); }
  .docs-toolbar input, .docs-toolbar select { min-width: 0; width: 100%; }
  .chart { height: 180px; }
  .chart-wrap, .chart-panel, .table-wrap { max-width: 100%; }
  .table-wrap { overflow: visible; }
  .modal-back { place-items: start center; padding: 10px; }
  .modal { width: min(100%, 560px); max-height: calc(100dvh - 20px); padding: 17px; overflow-y: auto; }
  .account-modal { width: 100%; }
  .account-form { grid-template-columns: minmax(0, 1fr); }
  .account-password-field { grid-column: auto; }
  .workday-links, .owner-workday-grid { grid-template-columns: minmax(0, 1fr); }
  .schedule-wrap { overflow: visible; }
  .schedule, .schedule.cash-schedule {
    display: block;
    width: 100%;
    min-width: 0 !important;
    table-layout: auto;
    border-collapse: separate;
  }
  .schedule thead, .schedule tbody { display: block; }
  .schedule thead tr, .schedule tbody tr {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
    min-width: 0;
  }
  .schedule thead tr { margin-bottom: 8px; }
  .schedule thead th { display: block; min-width: 0 !important; padding: 5px 2px; white-space: normal; overflow-wrap: anywhere; text-align: center; font-size: 9px; }
  .schedule thead th:first-child { grid-column: 1 / -1; text-align: left; }
  .schedule tbody { display: grid; gap: 9px; }
  .schedule tbody tr { padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 3px 12px rgb(20 50 31 / 5%); }
  .schedule tbody td { display: grid; place-items: center; min-width: 0 !important; min-height: 42px; padding: 4px 2px !important; border: 0 !important; border-radius: 8px; background: var(--surface-soft); white-space: normal; overflow-wrap: anywhere; text-align: center; font-size: 9px; }
  .schedule tbody td:first-child { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 7px; min-height: 34px; padding: 4px 2px !important; background: transparent; text-align: left; font-size: 12px; }
  .schedule tbody td:first-child > * { max-width: 100%; }
  .schedule select { min-width: 0 !important; width: 100%; padding: 3px 1px; font-size: 9px; }
  .schedule-cell-active strong { font-size: 9px; }
  .schedule-cell-active small { font-size: 8px; white-space: normal; }
  .schedule-time-picker { width: min(176px, calc(100vw - 24px)); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .week .daycell { min-width: 0; min-height: 72px; padding: 7px 4px; overflow-wrap: anywhere; }
  .week .daycell small { font-size: 9px; line-height: 1.3; white-space: normal; }
  .week.month-view { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .week.month-view .daycell { min-height: 68px; padding: 5px 2px; font-size: 9px; }
  .week.month-view .daycell small { font-size: 8px; }
}

@media (max-width: 420px) {
  .content { padding-inline: 10px; }
  .topbar { padding-inline: 10px; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .revenue-inputs, .inline-form { grid-template-columns: minmax(0, 1fr); }
  .schedule thead tr, .schedule tbody tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week.month-view { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .week.month-view .daycell { min-height: 58px; }
  .expense-tabs button, .acts-tabs button { flex: 1 1 130px; }
  .rev-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wo-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .data:not(.schedule):not(.rev-edit-table) {
    display: block;
    width: 100%;
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
  }
  .data:not(.schedule):not(.rev-edit-table) thead { display: none; }
  .data:not(.schedule):not(.rev-edit-table) tbody { display: grid; gap: 9px; }
  .data:not(.schedule):not(.rev-edit-table) tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
    box-shadow: 0 3px 12px rgb(20 50 31 / 5%);
  }
  .data:not(.schedule):not(.rev-edit-table) tbody td {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 6px 7px;
    border: 0;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--ink);
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    font-size: 11px;
  }
  .data:not(.schedule):not(.rev-edit-table) tbody td::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
    font-weight: 700;
  }
  .data:not(.schedule):not(.rev-edit-table) tbody td:first-child { grid-column: 1 / -1; font-size: 12px; font-weight: 700; }
  .data:not(.schedule):not(.rev-edit-table) tbody td:last-child { grid-column: 1 / -1; }
  .data:not(.schedule):not(.rev-edit-table) tbody td[colspan] { grid-column: 1 / -1; background: transparent; text-align: center; }
  .data:not(.schedule):not(.rev-edit-table) tbody td[colspan]::before { content: none !important; }
  .data .person { flex-wrap: wrap; }
  .data .right-actions, .data td button { max-width: 100%; }
  .data .right-actions .btn, .data td .btn { white-space: normal; }

  #payTable td:nth-child(1)::before { content: "Сотрудник"; }
  #payTable td:nth-child(2)::before { content: "Станции за месяц"; }
  #payTable td:nth-child(3)::before { content: "Часы"; }
  #payTable td:nth-child(4)::before { content: "Основная оплата"; }
  #payTable td:nth-child(5)::before { content: "Касса"; }
  #payTable td:nth-child(6)::before { content: "Барный процент"; }
  #payTable td:nth-child(7)::before { content: "Кухня"; }
  #payTable td:nth-child(8)::before { content: "Премия менеджеру"; }
  #payTable td:nth-child(9)::before { content: "Отпускные"; }
  #payTable td:nth-child(10)::before { content: "Штраф"; }
  #payTable td:nth-child(11)::before { content: "Аванс"; }
  #payTable td:nth-child(12)::before { content: "Аванс на карту"; }
  #payTable td:nth-child(13)::before { content: "К выплате"; }
  #payTable td:nth-child(14)::before { content: "Действия"; }
  #payTable td:nth-child(13) { background: var(--green2) !important; color: var(--green); font-weight: 800; }
  #page-revenue .data td:nth-child(1)::before { content: "Дата"; }
  #page-revenue .data td:nth-child(2)::before { content: "Безнал"; }
  #page-revenue .data td:nth-child(3)::before { content: "Наличные"; }
  #page-revenue .data td:nth-child(4)::before { content: "Бонусы"; }
  #page-revenue .data td:nth-child(5)::before { content: "Итого"; }
  #page-revenue .data td:nth-child(6)::before { content: "Столы"; }
  #page-acts .data td:nth-child(1)::before { content: "№"; }
  #page-acts .data td:nth-child(2)::before { content: "ФИО сотрудника"; }
  #page-acts .data td:nth-child(3)::before { content: "К выплате"; }
  #page-acts .data td:nth-child(4)::before { content: "Подпись о получении"; }
  #page-staff .data td:nth-child(1)::before { content: "ФИО"; }
  #page-staff .data td:nth-child(2)::before { content: "Станция работы"; }
  #page-staff .data td:nth-child(3)::before { content: "Номер телефона"; }
  #page-staff .data td:nth-child(4)::before { content: "Дата рождения"; }
  #page-staff .data td:nth-child(5)::before { content: "Логин"; }
  #page-staff .data td:nth-child(6)::before { content: "Роль"; }
  #page-invoices .supplier-table td:nth-child(1)::before { content: "Компания"; }
  #page-invoices .supplier-table td:nth-child(2)::before { content: "Категория"; }
  #page-invoices .supplier-table td:nth-child(3)::before { content: "Контакт"; }
  #page-invoices .supplier-table td:nth-child(4)::before { content: "Телефон"; }
  #page-invoices .supplier-table td:nth-child(5)::before { content: "Накладных"; }
  #page-invoices .supplier-table td:nth-child(6)::before { content: "Всего, ₽"; }
  #page-invoices .supplier-table td:nth-child(7)::before { content: "Статус"; }
  #page-invoices .supplier-table td:nth-child(8)::before { content: "Действия"; }
  [data-expense-pane="invoices"] .data td:nth-child(1)::before { content: "Дата поставки"; }
  [data-expense-pane="invoices"] .data td:nth-child(2)::before { content: "Поставщик"; }
  [data-expense-pane="invoices"] .data td:nth-child(3)::before { content: "Сумма"; }
  [data-expense-pane="invoices"] .data td:nth-child(4)::before { content: "Документ"; }
  [data-expense-pane="receipts"] .data td:nth-child(1)::before { content: "Дата"; }
  [data-expense-pane="receipts"] .data td:nth-child(2)::before { content: "Магазин / описание"; }
  [data-expense-pane="receipts"] .data td:nth-child(3)::before { content: "Сумма"; }
  [data-expense-pane="receipts"] .data td:nth-child(4)::before { content: "Вложения"; }
  [data-expense-pane="receipts"] .data td:nth-child(5)::before { content: "Комментарий"; }
  .rev-history-table td:nth-child(1)::before { content: "Дата"; }
  .rev-history-table td:nth-child(2)::before { content: "Категория"; }
  .rev-history-table td:nth-child(3)::before { content: "Позиции"; }
  .rev-history-table td:nth-child(4)::before { content: "Фактический остаток"; }
  .rev-history-table td:nth-child(5)::before { content: "Действия"; }
  .wo-history-table td:nth-child(1)::before { content: "Дата"; }
  .wo-history-table td:nth-child(2)::before { content: "Причина"; }
  .wo-history-table td:nth-child(3)::before { content: "Позиции"; }
  .wo-history-table td:nth-child(4)::before { content: "Количество"; }
  .wo-history-table td:nth-child(5)::before { content: "Виновное лицо"; }
  .wo-history-table td:nth-child(6)::before { content: "Файл"; }
  .rev-history-table, .wo-history-table { min-width: 0 !important; }
  .rev-history-table tbody tr, .wo-history-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rev-edit-wrap { overflow: visible; }
}

@media (max-width: 360px) {
  .mobile-nav > #nav { grid-template-columns: minmax(0, 1fr); }
  .top-controls { gap: 6px; }
  .top-controls select, .top-controls button, .top-controls .btn { padding-inline: 7px; font-size: 10px; }
  .panel { padding: 12px; }
}

body[data-theme="dark"] {
  --ink: #e4eee7;
  --muted: #a0b0a5;
  --line: #30443a;
  --paper: #111a15;
  --white: #1a261f;
  --green: #86cba2;
  --green2: #234331;
  --lime: #a9d9b8;
  --orange: #e2b566;
  --red: #e58a80;
  --nav: #0b2117;
  --accent: #86cba2;
  --shadow: 0 12px 32px rgb(0 0 0 / 24%);
  --surface-soft: #202e25;
  --focus: #83c79e;
  color-scheme: dark;
  background:
    radial-gradient(ellipse at 91% 14%, rgb(38 76 53 / 34%), transparent 32rem),
    radial-gradient(ellipse at 20% 82%, rgb(28 63 43 / 23%), transparent 36rem),
    var(--paper);
  color: var(--ink);
}
body[data-theme="dark"] .sidebar { background: linear-gradient(158deg, #123d2a, #0b2a1c 60%, #081f16); }
body[data-theme="dark"] .topbar { background: rgb(22 33 26 / 92%); }
body[data-theme="dark"] .rolebox, body[data-theme="dark"] .calc-strip, body[data-theme="dark"] .pay-total,
body[data-theme="dark"] .muted-box, body[data-theme="dark"] .station, body[data-theme="dark"] .tag,
body[data-theme="dark"] .kpi .good { color: var(--ink); }
body[data-theme="dark"] .rolebox select { background: #12261a; }
body[data-theme="dark"] .data th { background: #202e25; color: #b2c5b8; }
body[data-theme="dark"] .data tbody tr:hover td { background: #202e25; }
body[data-theme="dark"] .calc-strip, body[data-theme="dark"] .pay-total, body[data-theme="dark"] .tag,
body[data-theme="dark"] .station, body[data-theme="dark"] .muted-box { background: var(--surface-soft); border-color: var(--line); }
body[data-theme="dark"] .role-note { background: #392f1d; border-color: #66542e; color: #f1d594; }
body[data-theme="dark"] .panel-head p, body[data-theme="dark"] .subtitle, body[data-theme="dark"] .tiny { color: var(--muted); }
body[data-theme="dark"] .field input, body[data-theme="dark"] .field select, body[data-theme="dark"] .field textarea,
body[data-theme="dark"] .docs-toolbar input, body[data-theme="dark"] .docs-toolbar select,
body[data-theme="dark"] .top-controls select, body[data-theme="dark"] .top-controls button:not(.primary),
body[data-theme="dark"] .btn:not(.primary) { background-color: var(--white); color: var(--ink); border-color: var(--line); }
body[data-theme="dark"] .schedule tbody tr, body[data-theme="dark"] .data tbody tr { background: var(--white); border-color: var(--line); }
body[data-theme="dark"] .schedule tbody td, body[data-theme="dark"] .data tbody td { background: var(--surface-soft); color: var(--ink); }
body[data-theme="dark"] .schedule tbody td:first-child { background: transparent; }
body[data-theme="dark"] .expense-tabs button.active, body[data-theme="dark"] .acts-tabs button.active,
body[data-theme="dark"] .rev-tabs button.active { background: #254b34; border-color: #3a6b4d; color: #c1e6cc; }
body[data-theme="dark"] .workday-links button:hover, body[data-theme="dark"] .owner-workday-grid button:hover { background: #223b2b; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
