/* Basement Operations portal — redesign 25 Nov 2026.
   One stylesheet replacing portal.css, portal-extra, -business, -atelier and -command.
   Layout: icon rail (desktop) / bottom tab bar (phone) · sticky top bar · section tabs · work area.
   Tokens are shared with the Basement PMS (gold = owner view, Basement blue = staff view). */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("fonts/poppins-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #eef1f6; --surface: #ffffff; --surface-2: #f6f8fb; --surface-3: #e9edf3;
  --line: #dde3ec; --line-strong: #c5cfdc;
  --fg: #0d1626; --fg-2: #465267; --fg-3: #5d6980;
  --solid: #142035; --on-solid: #ffffff;
  --blue: #2445ac; --blue-solid: #2445ac; --gold: #8f661f; --gold-solid: #a87a2f;
  --ok: #16834f; --warn: #a5630a; --due: #c2223d; --info: #0870b8;
  --wa: #128c5a; --chat: #3b5bd6; --phone: #8d3cab;
  --shadow-1: 0 1px 2px rgb(13 22 38 / 6%); --shadow-2: 0 18px 50px rgb(13 22 38 / 16%);
  --scrim: rgb(13 22 38 / 40%); --tint: 12%;
  --chart-card: #2445ac; --chart-cash: #16834f; --chart-line: #0d1626;
  color-scheme: light;

  --mode: var(--blue); --mode-solid: var(--blue-solid);
  --mode-tint: color-mix(in srgb, var(--mode) var(--tint), var(--surface));
  --due-tint: color-mix(in srgb, var(--due) var(--tint), var(--surface));
  --ok-tint: color-mix(in srgb, var(--ok) var(--tint), var(--surface));
  --warn-tint: color-mix(in srgb, var(--warn) var(--tint), var(--surface));
  --info-tint: color-mix(in srgb, var(--info) var(--tint), var(--surface));

  --font-display: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --t-xs: .75rem; --t-sm: .8125rem; --t-md: .875rem; --t-lg: 1rem; --t-xl: 1.25rem; --t-2xl: 1.625rem;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --rail: 216px; --topbar: 56px; --tabbar: 60px;
}
:root[data-mode="owner"] { --mode: var(--gold); --mode-solid: var(--gold-solid); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d18; --surface: #0c1524; --surface-2: #111d31; --surface-3: #18273f; --line: #1f2e48; --line-strong: #2c3f60;
    --fg: #e7ecf4; --fg-2: #a6b1c3; --fg-3: #8592a9; --solid: #233657; --on-solid: #fff;
    --blue: #8ba6f7; --blue-solid: #2f55c9; --gold: #d9b06e; --gold-solid: #a8792f;
    --ok: #4fd18b; --warn: #f2b45c; --due: #ff6178; --info: #5cc4ff; --wa: #3fd39a; --chat: #8ea4ff; --phone: #d58cf0;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 30%); --shadow-2: 0 24px 64px rgb(0 0 0 / 50%); --scrim: rgb(0 0 0 / 55%); --tint: 16%;
    --chart-card: #8ba6f7; --chart-cash: #4fd18b; --chart-line: #e7ecf4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070d18; --surface: #0c1524; --surface-2: #111d31; --surface-3: #18273f; --line: #1f2e48; --line-strong: #2c3f60;
  --fg: #e7ecf4; --fg-2: #a6b1c3; --fg-3: #8592a9; --solid: #233657; --on-solid: #fff;
  --blue: #8ba6f7; --blue-solid: #2f55c9; --gold: #d9b06e; --gold-solid: #a8792f;
  --ok: #4fd18b; --warn: #f2b45c; --due: #ff6178; --info: #5cc4ff; --wa: #3fd39a; --chat: #8ea4ff; --phone: #d58cf0;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 30%); --shadow-2: 0 24px 64px rgb(0 0 0 / 50%); --scrim: rgb(0 0 0 / 55%); --tint: 16%;
  --chart-card: #8ba6f7; --chart-cash: #4fd18b; --chart-line: #e7ecf4;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--t-md)/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--t-xl); line-height: 1.2; }
h2 { font-size: var(--t-lg); line-height: 1.3; }
h3 { font-size: var(--t-md); line-height: 1.35; }
p { margin: 0; }
small { font-size: var(--t-xs); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mode); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .hint { color: var(--fg-3); }
.hint { font-size: var(--t-xs); }
.kicker { font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.portal-skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 12px; border-radius: var(--r-sm); background: var(--solid); color: var(--on-solid); }
.portal-skip:focus { top: 12px; }
table { font-variant-numeric: tabular-nums; }

/* ---------- buttons & fields ---------- */
.button, .text-button, .icon-button, .search-command {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none;
  border-radius: var(--r-sm); font-weight: 500; font-size: var(--t-sm); transition: background .12s, border-color .12s, color .12s;
}
.button { min-height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); }
.button:hover { background: var(--surface-2); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.primary { background: var(--mode-solid); border-color: var(--mode-solid); color: #fff; }
.button.primary:hover { background: color-mix(in srgb, var(--mode-solid) 86%, #000); }
.button.small { min-height: 28px; padding: 0 10px; font-size: var(--t-xs); }
.button.wide { width: 100%; min-height: 40px; }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; }
.text-button { border: 0; background: none; padding: 4px 6px; color: var(--fg-2); }
.text-button:hover { color: var(--fg); background: var(--surface-2); }
.icon-button { width: 34px; height: 34px; border: 1px solid transparent; background: none; color: var(--fg-2); }
.icon-button:hover { background: var(--surface-2); color: var(--fg); }
.danger-text { color: var(--due) !important; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--fg);
}
textarea { padding: 10px; line-height: 1.55; resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--mode) 45%, transparent); outline-offset: 0; border-color: var(--mode); }
input[readonly] { background: var(--surface-2); color: var(--fg-2); }
input[type=checkbox], input[type=radio] { accent-color: var(--mode-solid); width: 16px; height: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-sm); font-weight: 500; color: var(--fg); min-width: 0; }
label small { font-weight: 400; color: var(--fg-3); }
.inline-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.money-input { display: flex; align-items: stretch; }
.money-input b { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--surface-2); color: var(--fg-3); font-weight: 500; }
.money-input input { border-radius: 0 var(--r-sm) var(--r-sm) 0 !important; text-align: right; font-variant-numeric: tabular-nums; }
.form-grid, .cashup-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.cashup-form-grid.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cashup-form-grid.three { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.password-input-wrap { position: relative; display: block; }
.password-input-wrap input { padding-right: 64px; }
.password-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; border: 0; border-radius: 4px; background: var(--surface-3); color: var(--fg-2); padding: 0 10px; font-size: var(--t-xs); font-weight: 600; }

/* chips & badges */
.chip, .badge, .language-pill, .quality-flag, .trend-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: var(--t-xs); font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--fg-2);
}
.chip svg.i { width: 13px; height: 13px; }
.chip.due, .badge.urgent, .quality-flag.high, .quality-flag.critical, .trend-chip.down { background: var(--due-tint); color: var(--due); }
.chip.warn, .badge.waiting, .badge.in_progress, .quality-flag.medium, .quality-flag.warning { background: var(--warn-tint); color: var(--warn); }
.chip.ok, .badge.completed, .trend-chip.up { background: var(--ok-tint); color: var(--ok); }
.chip.mode, .badge.new { background: var(--mode-tint); color: var(--mode); }
.chip.outline { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge.private { background: var(--mode-tint); color: var(--mode); }
.alert { padding: 10px 14px; border-radius: var(--r-md); background: var(--info-tint); font-size: var(--t-sm); }
.alert.error { background: var(--due-tint); color: var(--fg); }
.alert.success { background: var(--ok-tint); }

/* ---------- login ---------- */
.login-shell { min-height: 100%; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.login-panel { width: min(420px, 100%); display: flex; flex-direction: column; gap: 20px; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand strong { display: block; font: 600 var(--t-lg)/1.1 var(--font-display); }
.login-brand small { color: var(--fg-3); }
.login-form { display: flex; flex-direction: column; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.login-form h1 { font-size: var(--t-2xl); margin-bottom: 6px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label { display: block; }
.login-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--fg-3); font-size: var(--t-xs); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--solid); color: var(--on-solid); font: 600 16px/1 var(--font-display); }

/* ---------- shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; }
.app-shell[hidden] { display: none !important; }
.rail { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; padding: 12px 8px; padding-left: max(8px, env(safe-area-inset-left, 0px)); background: var(--surface); border-right: 1px solid var(--line); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-text strong { display: block; font: 600 var(--t-md)/1.15 var(--font-display); }
.brand-text small { color: var(--fg-3); }
#main-nav { display: flex; flex-direction: column; gap: 2px; }
.place { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--fg-2); font-weight: 500; text-align: left; width: 100%; }
.place:hover { background: var(--surface-2); color: var(--fg); }
.place[aria-current="page"] { background: var(--mode-tint); color: var(--fg); }
.place[aria-current="page"] svg { color: var(--mode); }
.place b { margin-left: auto; font: 500 var(--t-xs)/1 var(--font-mono); color: var(--fg-3); }
.place b.hot { color: var(--due); }
.place b:empty { display: none; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.suite-home { display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 0 12px; border-radius: var(--r-sm); color: var(--fg-2); text-decoration: none; font-size: var(--t-sm); }
.suite-home:hover { background: var(--surface-2); color: var(--fg); }
.side-bottom { display: flex; align-items: center; gap: 10px; padding: 8px; }
.user-avatar, .mini-avatar, .on-call-avatar, .sender-avatar {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--surface-3); color: var(--fg-2); font-weight: 600; text-transform: uppercase;
}
.user-avatar { width: 32px; height: 32px; font-size: var(--t-xs); }
.mini-avatar { width: 20px; height: 20px; font-size: 9px; }
.who-text { min-width: 0; flex: 1; }
.who-text strong { display: block; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text small { color: var(--fg-3); }
.navigation-shade { display: none; }

.workspace { min-width: 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 12px; min-height: var(--topbar); padding: 8px max(24px, env(safe-area-inset-right, 0px)) 8px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.title-block { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1; }
.title-block h1 { font-size: var(--t-lg); white-space: nowrap; flex: none; }
.crumb { color: var(--fg-3); font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.search-command { height: 34px; width: min(300px, 30vw); padding: 0 10px; justify-content: flex-start; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg-3); }
.search-command:hover { border-color: var(--line-strong); }
.search-command span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 11px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--fg-3); }
.health-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 500; white-space: nowrap; background: var(--warn-tint); color: var(--warn); }
.health-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.health-pill.ok { background: none; color: var(--fg-3); }
.health-pill.ok::before { background: var(--ok); }
.health-pill[data-view] { cursor: pointer; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-sm); background: var(--surface-3); gap: 2px; }
.seg button { border: 0; background: none; min-height: 28px; padding: 0 9px; border-radius: 5px; color: var(--fg-2); font-size: var(--t-xs); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.seg button svg.i { width: 15px; height: 15px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1); }

.subnav { display: flex; gap: 4px; padding: 8px max(24px, env(safe-area-inset-right, 0px)) 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--topbar) + env(safe-area-inset-top, 0px)); z-index: 19; }
.subnav::-webkit-scrollbar { display: none; }
.subtab { display: none; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 10px 10px; color: var(--fg-2); font-weight: 500; font-size: var(--t-sm); white-space: nowrap; border-bottom: 2px solid transparent; }
.subtab.in-area { display: inline-flex; }
.subtab.in-area[hidden] { display: none !important; }
.subtab:hover { color: var(--fg); }
.subtab[aria-current="page"] { color: var(--fg); border-bottom-color: var(--mode); }
.subtab b { font: 500 11px/1 var(--font-mono); color: var(--fg-3); }
.subtab b.zero { opacity: .55; }
.subtab[aria-current="page"] b { color: var(--mode); }
.subtab svg.i { width: 14px; height: 14px; color: var(--fg-3); }
.tabbar { display: none; }

/* ---------- views & surfaces ---------- */
.view { display: none; padding: 24px max(24px, env(safe-area-inset-right, 0px)) 40px 24px; max-width: 1320px; width: 100%; flex-direction: column; gap: 20px; }
.view.active { display: flex; }
#inbox.view { max-width: none; padding: 0; flex: 1; min-height: 0; overflow: hidden; }
body[data-area="inbox"] .workspace:has(#inbox.active) { overflow: hidden; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; min-width: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-heading > div { min-width: 0; }
.section-heading h2 { font-size: var(--t-lg); }
.section-heading p { color: var(--fg-2); font-size: var(--t-sm); margin-top: 2px; max-width: 62ch; }
.section-heading .kicker { display: none; }
.dashboard-hero, .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dashboard-hero .kicker { display: none; }
.dashboard-hero h2, .page-head h2 { font-size: var(--t-2xl); line-height: 1.2; }
.dashboard-hero p, .page-head .sub { color: var(--fg-2); margin-top: 4px; }
.dashboard-hero time, .page-head time { color: var(--fg-3); font-size: var(--t-sm); }
.command-grid, .settings-grid, .operations-grid, .pnl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.command-metrics, .call-workspace-summary, .pnl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.command-metric, .call-workspace-summary > article, .pnl-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.command-metric span, .call-workspace-summary span, .pnl-kpi > span { font-size: var(--t-xs); color: var(--fg-3); font-weight: 500; }
.command-metric strong, .call-workspace-summary strong, .pnl-kpi strong { font: 600 var(--t-xl)/1.2 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.command-metric small, .pnl-kpi small { color: var(--fg-3); }
.attention-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.attention-card { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--fg); font-weight: 500; }
.attention-card strong { font: 600 var(--t-lg)/1 var(--font-display); }
.attention-card.danger strong { color: var(--due); }
.attention-card.amber strong { color: var(--warn); }
.attention-card.success strong { color: var(--ok); }
.attention-card b { color: var(--fg-3); }
.inline-summary { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 12px; }
.inline-summary > div { display: flex; flex-direction: column; }
.inline-summary span { font-size: var(--t-xs); color: var(--fg-3); }
.inline-summary strong { font: 600 var(--t-lg)/1.3 var(--font-display); font-variant-numeric: tabular-nums; }
.variance-alert { color: var(--warn) !important; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; font-size: var(--t-sm); }
.kv dt { color: var(--fg-2); }
.kv dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.kv .total { font-weight: 600; color: var(--fg); border-top: 1px solid var(--line); padding-top: 8px; }

/* lists used across dashboards */
.dashboard-list { display: flex; flex-direction: column; }
.dashboard-list-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: inherit; }
.dashboard-list-row:last-child { border-bottom: 0; }
button.dashboard-list-row:hover { background: var(--surface-2); }
.dashboard-list-row strong { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-list-row small { color: var(--fg-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-list-row b { color: var(--fg-3); }
.list-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--fg-2); font-size: 13px; }
.list-icon.danger { background: var(--due-tint); color: var(--due); }
.list-icon.amber { background: var(--warn-tint); color: var(--warn); }
.list-icon.success { background: var(--ok-tint); color: var(--ok); }
.list-icon.blue { background: var(--info-tint); color: var(--info); }
.dashboard-empty { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); color: var(--fg-2); font-size: var(--t-sm); }
.dashboard-empty strong { display: block; color: var(--fg); }
.dashboard-empty.warning { background: var(--warn-tint); }
.dashboard-empty.success { background: var(--ok-tint); }
.on-call-person { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.on-call-avatar { width: 36px; height: 36px; font-size: var(--t-sm); }
.on-call-person strong { display: block; }
.on-call-person a { font-family: var(--font-mono); font-size: var(--t-sm); display: block; }
.on-call-person small { color: var(--fg-3); }
.handover-note strong { display: block; margin-bottom: 4px; }
.handover-note p { color: var(--fg-2); }
.handover-note small { color: var(--fg-3); }
.check-list { display: flex; flex-direction: column; gap: 6px; }
.check-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: var(--t-sm); }
.check-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.check-row.ok i { background: var(--ok); }
.check-row small { color: var(--fg-3); }
.system-warning-summary { margin-top: 8px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: var(--r-md); background: var(--warn-tint); }
.system-warning-summary strong, .system-warning-summary small { display: block; }
.workload-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 80px 24px; gap: 10px; align-items: center; padding: 6px 0; font-size: var(--t-sm); }
.workload-row strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workload-meter { width: 100%; height: 6px; }
.workload-row b { text-align: right; font-family: var(--font-mono); }
.daily-brief { display: flex; flex-direction: column; gap: 10px; }
.brief-line { color: var(--fg-2); font-size: var(--t-sm); }

/* ---------- Today ---------- */
.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.fact { display: flex; align-items: baseline; gap: 8px; }
.fact b { font: 600 var(--t-xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.fact span { color: var(--fg-2); font-size: var(--t-sm); }
.fact.hot b { color: var(--due); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.today-main, .today-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.queue { padding: 0; overflow: hidden; }
.q-group + .q-group { border-top: 1px solid var(--line); }
.q-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px 6px; }
.q-head h3 { font: 600 var(--t-md)/1.3 var(--font-body); }
.q-head .n { font: 500 var(--t-xs)/1 var(--font-mono); color: var(--fg-3); }
.q-head .text-button { margin-left: auto; }
.q-row { display: grid; grid-template-columns: 4px 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 20px 8px 0; border: 0; background: none; text-align: left; color: inherit; }
.q-row:hover { background: var(--surface-2); }
.q-row .sev, .row .sev { align-self: stretch; border-radius: 0 3px 3px 0; }
.sev.due { background: var(--due); }
.sev.warn { background: var(--warn); }
.q-text { min-width: 0; display: flex; flex-direction: column; }
.q-row .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .d { color: var(--fg-3); font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .r { display: flex; align-items: center; gap: 8px; }
.q-empty { display: flex; align-items: center; gap: 10px; padding: 6px 20px 14px; color: var(--fg-3); font-size: var(--t-sm); }
.q-empty svg.i { color: var(--ok); }
.ch { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; flex: none; background: var(--surface-3); color: var(--fg-2); }
.ch svg.i { width: 15px; height: 15px; }
.ch.email { background: var(--info-tint); color: var(--info); }
.ch.chat { background: color-mix(in srgb, var(--chat) var(--tint), var(--surface)); color: var(--chat); }
.ch.phone { background: color-mix(in srgb, var(--phone) var(--tint), var(--surface)); color: var(--phone); }
.ch.receipt, .ch.cash { background: var(--warn-tint); color: var(--warn); }
.ch.task, .ch.person { background: var(--mode-tint); color: var(--mode); }

/* ---------- Inbox ---------- */
.inbox-layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); flex: 1; min-height: 0; }
.list-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.inbox-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.inbox-toolbar-title strong { display: block; font-weight: 600; }
.inbox-toolbar-title small { color: var(--fg-3); }
.toolbar-actions { display: flex; gap: 6px; align-items: flex-start; }
.inbox-toolbar .search { grid-column: 1 / -1; position: relative; }
.inbox-toolbar .search svg { position: absolute; left: 10px; top: 9px; color: var(--fg-3); pointer-events: none; }
.inbox-toolbar .search input { padding-left: 34px; min-height: 34px; }
.inbox-toolbar .filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.inbox-toolbar .filters select { width: auto; flex: 1 1 140px; min-height: 32px; font-size: var(--t-sm); }
.inquiry-list { flex: 1; overflow-y: auto; min-height: 0; }
.inquiry-list[aria-busy="true"] { opacity: .5; }
.row { display: grid; grid-template-columns: 4px minmax(0, 1fr); width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: inherit; }
.row:hover { background: var(--surface-2); }
.row.active { background: var(--mode-tint); }
.row-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px 12px 12px; min-width: 0; }
.row-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-top .ch { width: 22px; height: 22px; border-radius: 6px; }
.row-top .ch svg.i { width: 13px; height: 13px; }
.row-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row.unread .row-name { font-weight: 600; }
.row.unread .row-name::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-right: 7px; vertical-align: 1px; }
.row-time { margin-left: auto; font: 400 var(--t-xs)/1 var(--font-mono); color: var(--fg-3); white-space: nowrap; flex: none; }
.row-subject { font-size: var(--t-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-preview { font-size: var(--t-sm); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.who-sm { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-xs); color: var(--fg-2); }
.staff-record-group { padding: 12px 16px 4px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.staff-record-group span { display: block; font-size: var(--t-xs); color: var(--fg-3); }
.staff-record-subgroup { padding: 6px 16px; font-size: var(--t-xs); color: var(--fg-2); border-bottom: 1px solid var(--line); }
.list-more { display: block; width: calc(100% - 32px); margin: 12px 16px; min-height: 34px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.list-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; color: var(--fg-3); font-size: var(--t-sm); text-align: center; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 48px 24px; color: var(--fg-2); max-width: 420px; margin: auto; }
.empty-state > span { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--fg-3); font-size: 18px; margin-bottom: 4px; }
.empty-state h2 { color: var(--fg); font-size: var(--t-lg); }
.empty-state p { font-size: var(--t-sm); }

.inquiry-detail { min-width: 0; min-height: 0; overflow-y: auto; background: var(--bg); display: flex; flex-direction: column; }
.mail-detail-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.toolbar-spacer { flex: 1; }
.mobile-back { display: none; }
.mail-reading-pane { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 40px; max-width: 900px; width: 100%; }
.mail-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.sender-avatar { width: 34px; height: 34px; font-size: var(--t-xs); }
.sender-avatar.large { width: 42px; height: 42px; font-size: var(--t-sm); }
.mail-header-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mail-header-main .channel { font-size: var(--t-xs); color: var(--fg-3); font-weight: 500; }
.mail-header-main h2 { font-size: var(--t-xl); overflow-wrap: anywhere; }
.sender-line { display: flex; gap: 8px; flex-wrap: wrap; font-size: var(--t-sm); }
.sender-line span { color: var(--fg-3); font-family: var(--font-mono); font-size: var(--t-xs); overflow-wrap: anywhere; }
.mail-header time { color: var(--fg-3); font: 400 var(--t-xs)/1.3 var(--font-mono); white-space: nowrap; }
.mail-header small { color: var(--fg-3); }
.ai-summary { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--info-tint); font-size: var(--t-sm); }
.ai-summary strong { display: block; margin-bottom: 2px; }
.ai-star { color: var(--info); }
.mail-message, .conversation-history, .attachments, .workflow-panel, .reply-box, .phone-reply-composer, .invoice-payment-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; min-width: 0; }
.mail-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mail-section-heading h3 { font-size: var(--t-md); }
.mail-section-heading span { font-size: var(--t-xs); color: var(--fg-3); }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.translation-note { margin-top: 10px; font-size: var(--t-xs); color: var(--fg-3); }
.original-message { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.original-message summary, .conversation-entry summary, .workflow-panel summary, details summary { cursor: pointer; }
.original-message summary { display: flex; justify-content: space-between; font-size: var(--t-sm); color: var(--fg-2); }
.original-message .message-body { margin-top: 8px; color: var(--fg-2); }
.conversation-timeline { display: flex; flex-direction: column; gap: 10px; }
.conversation-entry { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.conversation-entry.ai, .conversation-entry.staff { background: var(--mode-tint); margin-left: 32px; }
.conversation-entry header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: var(--t-sm); margin-bottom: 4px; }
.conversation-entry header span { color: var(--fg-3); font-size: var(--t-xs); }
.conversation-entry > div { white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation-original { margin-top: 6px; color: var(--fg-2); white-space: pre-wrap; }
.attachments h3 { font-size: var(--t-md); margin-bottom: 10px; }
.attachment { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.attachment:first-of-type { border-top: 0; }
.attachment strong { display: block; overflow-wrap: anywhere; }
.attachment small { color: var(--fg-3); }
.attachment-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.workflow-panel { padding: 0; }
.workflow-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; list-style: none; }
.workflow-panel > summary::-webkit-details-marker { display: none; }
.workflow-panel summary strong { display: block; font-size: var(--t-sm); }
.workflow-panel summary small { color: var(--fg-3); }
.workflow-panel[open] .chevron { transform: rotate(180deg); }
.workflow-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.detail-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.notes-box { display: flex; flex-direction: column; gap: 10px; }
.detail-actions { display: flex; justify-content: flex-end; gap: 8px; }
.reply-box, .email-composer, .phone-reply-composer { border-color: var(--mode); box-shadow: 0 0 0 4px var(--mode-tint); display: flex; flex-direction: column; gap: 12px; }
.reply-box.closed-conversation { border-color: var(--line); box-shadow: none; flex-direction: row; align-items: flex-start; gap: 12px; color: var(--fg-2); }
.reply-box.closed-conversation > span { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.reply-box.closed-conversation h3 { color: var(--fg); margin-bottom: 2px; }
.composer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.composer-heading > div { display: flex; gap: 10px; align-items: center; min-width: 0; }
.composer-heading p { color: var(--fg-3); font-size: var(--t-xs); overflow-wrap: anywhere; }
.composer-icon, .callback-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--mode-tint); color: var(--mode); flex: none; }
.composer-step { display: flex; flex-direction: column; gap: 6px; }
.composer-step-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: var(--t-sm); }
.composer-step-head b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--mode-tint); color: var(--mode); font-size: 11px; margin-right: 6px; }
.composer-step-head small { color: var(--fg-3); }
.translate-button { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; min-height: 32px; padding: 0 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--t-sm); }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.composer-footer small { color: var(--fg-3); flex: 1 1 200px; }
.composer-footer .button.primary { min-height: 38px; padding: 0 18px; }
.callback-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reject-reply-button { color: var(--due); }
.more-menu { position: relative; }
.more-menu > summary { list-style: none; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
.more-menu-panel button { text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; }
.more-menu-panel button:hover { background: var(--surface-2); }
.invoice-payment-panel { display: flex; gap: 12px; align-items: flex-start; }
.invoice-payment-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--warn-tint); color: var(--warn); }
.invoice-payment-panel.paid .invoice-payment-icon { background: var(--ok-tint); color: var(--ok); }
.invoice-payment-panel p { color: var(--fg-2); font-size: var(--t-sm); }

/* ---------- Calls ---------- */
.calls-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.calls-toolbar strong { display: block; }
.calls-toolbar small { color: var(--fg-3); }
.segmented-control { display: inline-flex; padding: 2px; border-radius: var(--r-sm); background: var(--surface-3); gap: 2px; }
.segmented-control button { border: 0; background: none; min-height: 30px; padding: 0 12px; border-radius: 5px; color: var(--fg-2); font-size: var(--t-sm); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.segmented-control button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-1); }
.segmented-control b { font: 500 11px/1 var(--font-mono); color: var(--fg-3); }
.call-person strong, .call-person small { display: block; }
.call-person small { color: var(--fg-3); font-family: var(--font-mono); }
.call-safe-summary { margin-bottom: 6px; }
.call-actions, .quality-flags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.call-action-link { border: 0; background: var(--mode-tint); color: var(--fg); border-radius: var(--r-sm); padding: 4px 8px; font-size: var(--t-xs); text-align: left; }
.call-action-label { font-size: var(--t-xs); color: var(--fg-3); }
.privacy-note { color: var(--fg-3); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 var(--t-xs)/1.5 var(--font-mono); background: var(--surface-2); padding: 10px; border-radius: var(--r-sm); margin: 6px 0 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; min-width: 0; }
.table-wrap table, .surface > table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th { text-align: left; font-weight: 500; color: var(--fg-3); font-size: var(--t-xs); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td small { display: block; color: var(--fg-3); }
td strong { font-weight: 500; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .button { min-height: 28px; padding: 0 10px; font-size: var(--t-xs); }

/* ---------- Stays ---------- */
.stay-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.suite-shortcut { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; }
.suite-shortcut span { font-weight: 600; }
.suite-shortcut small { grid-column: 1; color: var(--fg-3); }
.suite-shortcut b { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--mode); font-size: var(--t-sm); }
.suite-shortcut:hover { border-color: var(--mode); }
.stay-calendar { overflow-x: auto; }
.stay-calendar-grid { display: grid; grid-template-columns: 110px repeat(14, minmax(34px, 1fr)); min-width: 700px; font-size: var(--t-xs); }
.stay-calendar-grid > div { min-height: 34px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; align-items: center; padding: 0 6px; position: relative; }
.stay-calendar-corner, .stay-calendar-day { color: var(--fg-3); }
.stay-calendar-day { flex-direction: column; justify-content: center; line-height: 1.15; min-height: 40px !important; }
.stay-calendar-day.today { color: var(--mode); font-weight: 600; }
.stay-calendar-room { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stay-calendar-cell.occupied { background: color-mix(in srgb, var(--blue) 16%, var(--surface)); }
.stay-calendar-cell.arrival { border-left: 3px solid var(--blue); }
.stay-calendar-cell span { position: absolute; left: 6px; z-index: 1; white-space: nowrap; font-size: 11px; font-weight: 500; }

/* ---------- Money: cash-up, daily accounts ---------- */
.cashup-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cashup-page-head .kicker { display: none; }
.cashup-page-head h2 { font-size: var(--t-2xl); }
.cashup-page-head p { color: var(--fg-2); margin-top: 4px; max-width: 60ch; }
.cashup-lang, .philsheet-head-actions, .cashup-actions, .pnl-actions, .knowledge-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cashup-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.cashup-stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.cashup-stat span { font-size: var(--t-xs); color: var(--fg-3); font-weight: 500; }
.cashup-stat strong { font: 600 var(--t-xl)/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.cashup-stat small { color: var(--fg-3); }
.cashup-stat.bank { border-color: var(--mode); background: var(--mode-tint); }
.cashup-form { display: flex; flex-direction: column; gap: 16px; }
.cashup-section { display: flex; flex-direction: column; gap: 12px; }
.cashup-section .section-heading { margin-bottom: 0; }
.cashup-payouts, .philsheet-payouts { display: flex; flex-direction: column; gap: 8px; }
.cashup-payouts > *, .philsheet-payouts > * { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr) auto; gap: 8px; align-items: end; }
.cashup-total-line { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 500; }
.cashup-total-line strong { font-variant-numeric: tabular-nums; }
.cashup-till-total { text-align: right; }
.cashup-till-total span { display: block; font-size: var(--t-xs); color: var(--fg-3); }
.cashup-till-total strong { font: 600 var(--t-xl)/1.2 var(--font-display); }
.denomination-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.denomination-grid label { padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.denomination-grid input { text-align: right; }
.cashup-notes textarea { min-height: 110px; }
.cashup-recount { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-md); background: var(--due-tint); }
.cashup-actions { justify-content: flex-end; }
.cashup-actions .button.primary { min-height: 40px; padding: 0 20px; }
.philsheet-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.philsheet-entry-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.philsheet-reconciliation { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 112px; }
.reconciliation-card { padding: 16px 18px; }
.reconciliation-card .kicker { display: none; }
.reconciliation-card h2 { margin-bottom: 10px; }
.reconciliation-card dl { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--t-sm); }
.reconciliation-card dl > div { display: flex; justify-content: space-between; gap: 10px; }
.reconciliation-card dt { color: var(--fg-2); }
.reconciliation-card dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; }
.reconciliation-total, .reconciliation-bank, .reconciliation-card-total { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 600; }
.philsheet-help { font-size: var(--t-xs); color: var(--fg-3); }

/* ---------- Money: wages, P&L, charts ---------- */
.pnl-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pnl-period-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.pnl-period-controls label { min-width: 140px; }
.pnl-status { font-size: var(--t-sm); color: var(--fg-2); }
.pnl-status:empty { display: none; }
.pnl-status.error, .pnl-status.review { padding: 10px 14px; border-radius: var(--r-md); background: var(--warn-tint); }
.pnl-chart, .wages-chart { overflow-x: auto; }
.pnl-chart svg, .wages-chart svg, .revenue-chart { width: 100%; height: auto; max-height: 340px; display: block; }
.pnl-grid-line, .chart-grid-line { stroke: var(--line); stroke-width: 1; }
.pnl-zero-line { stroke: var(--line-strong); }
.pnl-axis-label, .chart-axis-label, .wage-value-label { fill: var(--fg-3); font: 400 11px var(--font-body); }
.pnl-revenue-line { stroke: var(--chart-card); fill: none; stroke-width: 2.5; }
.pnl-expense-line { stroke: var(--warn); fill: none; stroke-width: 2.5; }
.pnl-profit-line, .chart-line { stroke: var(--chart-line); fill: none; stroke-width: 2; }
.pnl-prior-line { stroke: var(--fg-3); fill: none; stroke-width: 1.5; stroke-dasharray: 4 4; }
.pnl-profit-point, .chart-point { fill: var(--surface); stroke: var(--chart-line); stroke-width: 2; }
.chart-bar-card { fill: var(--chart-card); }
.chart-bar-cash { fill: var(--chart-cash); }
.chart-area { fill: color-mix(in srgb, var(--chart-card) 14%, transparent); }
.wage-payable-bar, .wage-payable { fill: var(--mode); }
.wage-estimate, .wage-estimate-line { stroke: var(--fg-3); stroke-dasharray: 4 4; fill: none; }
.pnl-chart-legend, .chart-legend, .wage-chart-legend, .mix-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--t-xs); color: var(--fg-2); margin: 6px 0; }
.chart-legend i, .mix-legend i, .pnl-chart-legend i, .wage-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--fg-3); vertical-align: -1px; }
.chart-legend i.card, .mix-legend i.card { background: var(--chart-card); }
.chart-legend i.cash, .mix-legend i.cash { background: var(--chart-cash); }
.chart-legend i.total { background: var(--chart-line); height: 3px; }
.analytics-suite { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.analytics-main, .analytics-side { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.chart-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.chart-heading strong { display: block; }
.chart-heading span { color: var(--fg-3); font-size: var(--t-xs); }
.analytics-kpis { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.analytics-kpis span { display: block; font-size: var(--t-xs); color: var(--fg-3); }
.analytics-kpis strong { font-variant-numeric: tabular-nums; }
.analytics-kpis small { color: var(--fg-3); margin-left: 4px; }
.mix-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.mix-donut { position: relative; width: 88px; height: 88px; flex: none; }
.mix-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mix-donut > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.mix-donut strong { font-size: var(--t-md); }
.mix-donut span { font-size: 10px; color: var(--fg-3); }
.donut-base { fill: none; stroke: var(--chart-card); stroke-width: 14; }
.donut-cash { fill: none; stroke: var(--chart-cash); stroke-width: 14; }
.mix-legend { flex-direction: column; }
.mix-legend > div { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.variance-chart { padding: 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-xs); display: flex; flex-direction: column; gap: 4px; }
.variance-chart header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.variance-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; }
.variance-row i { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; display: block; }
.variance-row b { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.variance-row.negative b { background: var(--due); }
.variance-row.positive b { background: var(--warn); }
.variance-row strong { font-variant-numeric: tabular-nums; font-weight: 500; }
.variance-row.negative strong { color: var(--due); }
.variance-row.positive strong { color: var(--warn); }
.pnl-breakdown { display: flex; flex-direction: column; gap: 8px; }
.pnl-breakdown-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: var(--t-sm); }
.pnl-completeness, .pnl-confidence-metrics { display: flex; flex-direction: column; gap: 8px; font-size: var(--t-sm); color: var(--fg-2); }
.pnl-table table { min-width: 640px; }
.pnl-muted { color: var(--fg-3); }
.profit { color: var(--ok); }
.expense { color: var(--warn); }
.boundary-note { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-sm); color: var(--fg-2); }
.boundary-note > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--info-tint); color: var(--info); font-weight: 600; }
.boundary-note strong { display: block; color: var(--fg); }
.wage-month-callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--mode-tint); }
.wage-month-callout > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--mode-solid); color: #fff; font-size: 11px; font-weight: 600; }
.wage-month-callout strong, .wage-month-callout small { display: block; }
.wage-month-callout label { grid-column: 1 / -1; }
.wages-print-document { display: none; }

/* ---------- operations, team, profile ---------- */
.system-safety-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.backup-card, .integration-card, .safety-row { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-sm); }
.safety-service-list { display: flex; flex-direction: column; gap: 6px; }
.knowledge-row, .notice-row, .rota-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); flex-wrap: wrap; }
.knowledge-row:last-child, .notice-row:last-child, .rota-row:last-child { border-bottom: 0; }
.knowledge-row strong, .notice-row strong, .rota-row strong { display: block; }
.knowledge-row p, .notice-row p { color: var(--fg-2); }
.knowledge-source { color: var(--fg-3); font-size: var(--t-xs); }
.knowledge-actions .search { position: relative; display: flex; align-items: center; }
.knowledge-actions .search span { position: absolute; left: 10px; color: var(--fg-3); }
.knowledge-actions .search input { padding-left: 28px; min-height: 34px; }
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 16px; }
.toggle-grid label { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 500; }
.toggle-grid label small { display: block; font-weight: 400; }
.workforce-launch { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.workforce-launch .kicker { display: none; }
.workforce-launch p { color: var(--fg-2); max-width: 60ch; }
.workforce-frame, .downloads-frame, .kiki-frame { width: 100%; min-height: 72vh; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }

/* ---------- dialogs, toast, palette ---------- */
dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-2); }
dialog::backdrop { background: var(--scrim); }
dialog form { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 22px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog > .dialog-heading { padding: 18px 22px 8px; }
.dialog-heading .kicker { display: none; }
.dialog-heading h2 { font-size: var(--t-lg); }
.dialog-heading button { width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: none; color: var(--fg-2); font-size: 20px; line-height: 1; }
.dialog-heading button:hover { background: var(--surface-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.compose-dialog { width: min(680px, calc(100% - 32px)); }
.pnl-entry-dialog { width: min(640px, calc(100% - 32px)); }
.sheet-dialog > .hint { padding: 0 22px; }
.assign-list, .more-list { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px 18px; }
.assign-list button, .more-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; }
.assign-list button:hover, .assign-list button[aria-pressed="true"], .more-item:hover { background: var(--mode-tint); }
.assign-list small { margin-left: auto; font-family: var(--font-mono); color: var(--fg-3); }
.more-list h3 { font: 600 var(--t-xs)/1 var(--font-body); color: var(--fg-3); letter-spacing: .06em; text-transform: uppercase; padding: 12px 10px 6px; }
.more-list .seg { margin: 0 10px 8px; }
.palette { width: min(620px, calc(100% - 32px)); margin-top: 12vh; display: flex; flex-direction: column; }
.palette:not([open]) { display: none; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-input input { border: 0 !important; background: none; min-height: 52px; font-size: var(--t-lg); padding: 0; outline: none !important; }
#workspace-search-results { overflow-y: auto; max-height: 56vh; padding: 6px; }
.palette-sec { font-size: var(--t-xs); color: var(--fg-3); padding: 8px 10px 4px; }
.palette-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; }
.palette-item small { color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--mode-tint); }
.toast { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--r-md); background: var(--solid); color: var(--on-solid); box-shadow: var(--shadow-2); font-size: var(--t-sm); animation: rise .2s ease-out; }
.toast.error { background: var(--due); color: #fff; }
.toast-action { border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .today-grid, .philsheet-main-grid { grid-template-columns: minmax(0, 1fr); }
  .philsheet-reconciliation { position: static; }
  .analytics-suite { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  :root { --rail: 64px; }
  .rail .brand-text, .place span, .place b, .suite-home span, .who-text, .side-bottom #logout { display: none; }
  .place, .suite-home { justify-content: center; padding: 0; }
  .side-brand, .side-bottom { justify-content: center; padding-inline: 0; }
  .inbox-layout { grid-template-columns: 320px minmax(0, 1fr); }
  .search-command { width: 38px; padding: 0; justify-content: center; }
  .search-command span, .search-command kbd { display: none; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
  .rail { display: none; }
  .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .crumb, .hide-sm, .health-pill { display: none !important; }
  .subnav { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .view { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); gap: 16px; }
  .surface { padding: 14px 16px; }
  .command-grid, .settings-grid, .operations-grid, .pnl-grid { grid-template-columns: minmax(0, 1fr); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--fg-3); font-size: 11px; font-weight: 500; }
  .tabbar button[aria-current="page"] { color: var(--mode); }
  .tabbar svg.i { width: 22px; height: 22px; }
  .badge-dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--due); color: #fff; font: 600 10px/17px var(--font-body); text-align: center; }
  .inbox-layout { grid-template-columns: minmax(0, 1fr); }
  .inquiry-detail { display: none; }
  .inquiry-detail.mobile-open { display: flex; position: fixed; inset: calc(var(--topbar) + env(safe-area-inset-top, 0px)) 0 calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)) 0; z-index: 25; }
  .mobile-back { display: inline-flex; }
  .mail-detail-toolbar { padding: 8px 12px; }
  .mail-reading-pane { padding: 14px 14px 28px; }
  .mail-header { grid-template-columns: minmax(0, 1fr); }
  .mail-header .sender-avatar { display: none; }
  .mail-header-main h2 { font-size: var(--t-lg); }
  .conversation-entry.ai, .conversation-entry.staff { margin-left: 12px; }
  .composer-footer .button.primary { flex: 1; }
  .q-row { padding-right: 14px; }
  .q-head { padding-inline: 14px; }
  .q-row .r .chip.outline, .q-row .r .chip.mode { display: none; }
  .cashup-payouts > *, .philsheet-payouts > * { grid-template-columns: minmax(0, 1fr); }
  dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 90vh; }
  .palette { margin: 8vh auto auto; width: calc(100% - 24px); border-radius: var(--r-lg); }
  .toast { bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- print (kept from the previous portal) ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --fg: #111; --fg-2: #333; --fg-3: #555; --line: #bbb; color-scheme: light; }
  .rail, .topbar, .subnav, .tabbar, .portal-skip, .toast { display: none !important; }
  .app-shell { display: block; height: auto; }
  .workspace { overflow: visible; }
  .badge, .chip, .trend-chip, .list-icon { background: #fff !important; color: #111 !important; }
  body:has(#cashup.active) * { visibility: hidden !important; }
  #cashup.active, #cashup.active * { visibility: visible !important; }
  #cashup.active { position: absolute; inset: 0; width: 100%; padding: 0; background: #fff; }
  #cashup .cashup-lang, #cashup .cashup-actions, #cashup .cashup-history, #cashup-add-payout, #cashup [data-remove-payout], #cashup .cashup-recount { display: none !important; }
  .cashup-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .cashup-section, .cashup-stat { box-shadow: none; break-inside: avoid; }
  body:has(#profitloss.active) .pnl-toolbar, body:has(#profitloss.active) .row-actions, body:has(#profitloss.active) .pnl-invoice-queue { display: none !important; }
  body:has(#profitloss.active) .view:not(#profitloss), body:has(#wages.active) .view:not(#wages) { display: none !important; }
  body:has(#profitloss.active) .pnl-grid { display: block; }
  body:has(#profitloss.active) .pnl-grid > .surface { margin: 12px 0; break-inside: avoid; }
  body:has(#profitloss.active) .pnl-table { overflow: visible; }
  body:has(#profitloss.active) .pnl-table table { min-width: 0; font-size: 9px; }
  body:has(#wages.active) .wages-toolbar, body:has(#wages.active) .row-actions, body:has(#wages.active) .wages-guidance { display: none !important; }
  body:has(#wages.active) .surface, body:has(#wages.active) .pnl-kpi { background: #fff !important; color: #111 !important; break-inside: avoid; }
  body:has(#wages.active) .wages-table { overflow: visible; }
  body:has(#wages.active) .wages-table table { min-width: 0; font-size: 8px; }
  body.printing-wages { background: #fff !important; color: #111 !important; }
  body.printing-wages > .app-shell, body.printing-wages > #toast, body.printing-wages > dialog { display: none !important; }
  body.printing-wages #wages-print-document { position: static !important; display: block !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #111 !important; }
  body.printing-wages #wages-print-document, body.printing-wages #wages-print-document * { visibility: visible !important; box-sizing: border-box; }
  .wage-print-sheet { position: relative; min-height: 260mm; padding: 5mm; color: #111; font-family: Arial, Helvetica, sans-serif !important; }
  .wage-print-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 8mm; border-bottom: 2px solid #153a32; }
  .print-brand { display: flex; align-items: center; gap: 10px; }
  .print-brand > b { display: grid; width: 10mm; height: 10mm; place-items: center; border-radius: 3mm; background: #153a32 !important; color: #fff !important; font-family: Georgia, serif; font-size: 20px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-brand span { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
  .print-brand small { display: block; margin-top: 2px; font-size: 8px; font-weight: 500; letter-spacing: .03em; }
  .bank-worksheet header > div:last-child { text-align: right; }
  .bank-worksheet header p, .cash-receipt header > p { margin: 0; color: #555; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
  .bank-worksheet h1 { margin: 3px 0 4px; font: 700 24px Georgia, serif !important; }
  .print-purpose { margin: 8mm 0 5mm; color: #333; font-size: 10px; line-height: 1.5; }
  .bank-worksheet table { width: 100%; border-collapse: collapse; font-size: 9px; }
  .bank-worksheet th, .bank-worksheet td { padding: 4mm 2.5mm; border: 1px solid #999; color: #111; background: #fff !important; vertical-align: middle; }
  .bank-worksheet th { background: #e9eeec !important; font-size: 7.5px; letter-spacing: .06em; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .bank-worksheet .money { text-align: right; white-space: nowrap; }
  .print-checkbox { display: block; width: 6mm; height: 6mm; margin: auto; border: 1px solid #333; }
  .bank-controls { display: grid; grid-template-columns: 1.6fr 1fr 1.6fr 1fr; gap: 7mm; margin-top: 15mm; }
  .bank-controls > div { min-height: 12mm; border-bottom: 1px solid #333; }
  .bank-controls span { display: block; margin-top: 13mm; color: #555; font-size: 8px; }
  .wage-print-sheet footer { position: absolute; right: 5mm; bottom: 5mm; left: 5mm; padding-top: 3mm; border-top: 1px solid #bbb; color: #666; font-size: 8px; text-align: center; }
  .cash-receipt .receipt-title { margin: 18mm 0 10mm; text-align: center; }
  .cash-receipt .receipt-title p { margin: 0; color: #153a32; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
  .cash-receipt h1 { margin: 4px 0; font: 700 27px Georgia, serif !important; }
  .cash-receipt h2 { margin: 0; color: #444; font-size: 17px; }
  .receipt-summary { margin: 0 0 12mm; border: 1px solid #777; }
  .receipt-summary > div { display: grid; grid-template-columns: 42mm 1fr; border-bottom: 1px solid #bbb; }
  .receipt-summary > div:last-child { border-bottom: 0; }
  .receipt-summary dt, .receipt-summary dd { margin: 0; padding: 4mm; }
  .receipt-summary dt { background: #e9eeec !important; font-size: 9px; font-weight: 700; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .receipt-summary dd { font-size: 12px; font-weight: 700; }
  .receipt-statement { margin: 8mm 0; padding: 6mm; border-left: 3px solid #153a32; font-size: 12px; line-height: 1.7; }
  .receipt-statement.english { border-left-color: #999; color: #333; }
  .receipt-signatures { display: grid; grid-template-columns: 1fr 1.5fr 1.5fr; gap: 8mm; margin-top: 28mm; }
  .receipt-signatures > div { min-height: 22mm; border-bottom: 1px solid #333; }
  .receipt-signatures span { display: block; margin-top: 23mm; color: #555; font-size: 8px; text-align: center; }
}

/* ---------- operations rows (markup from renderOperations) ---------- */
.safety-service-list { gap: 0; }
.safety-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; background: none; border-bottom: 1px solid var(--line); border-radius: 0; }
.safety-row:last-child { border-bottom: 0; }
.safety-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.safety-row.ok i { background: var(--ok); }
.safety-row strong { font-size: var(--t-xs); font-weight: 500; color: var(--warn); }
.safety-row.ok strong { color: var(--ok); }
.backup-card { display: flex; flex-direction: column; gap: 4px; }
.backup-card .kicker { display: block; }
.knowledge-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; }
.knowledge-row.muted { opacity: .6; }
.knowledge-row .channel { font-size: var(--t-xs); color: var(--fg-3); padding-top: 2px; }
.knowledge-row h3 { font: 600 var(--t-sm)/1.4 var(--font-body); margin-bottom: 2px; }
.knowledge-row p { font-size: var(--t-sm); }
.row-actions button:not(.button) { min-height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); font-size: var(--t-xs); font-weight: 500; }
.row-actions button:not(.button):hover { background: var(--surface-2); }
@media (max-width: 760px) { .knowledge-row { grid-template-columns: minmax(0, 1fr); } }
.topbar, .subnav { flex: none; }
.pnl-trend-svg, .wage-chart-svg { width: 100%; height: auto; display: block; }
.wages-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
