:root {
  --bg: #F3F6FB; --surface: #FFFFFF; --surface-2: #F7F9FC; --line: #E3E7EC; --line-2: #F0F2F5; --line-strong: #D5DBE2;
  --text: #0F1B2D; --text-2: #33404F; --muted: #5B6676;
  --accent: #0E2FA8; --accent-hover: #0A84F0; --accent-soft: #E8EEFC; --navy: #0B2489; --mint: #5EF2E4;
  --ok-bg: #E4F4EA; --ok: #16653A; --ok-line: #BFE3CB;
  --err-bg: #FDECEA; --err: #A11F14; --err-line: #F0C9C2; --err-soft: #FFF4F2;
  --info-bg: #EEF3FE; --info: #1B2F7A;
  --blue-bg: #E3F2FE; --blue: #0A4F8F; --teal-bg: #DDF8F5; --teal: #0B6E66;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 'Onest', system-ui, -apple-system, sans-serif; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1 { margin: 0 0 4px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }
.block { display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.main { padding-top: 24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 18px; }

/* ── header ─────────────────────────────────────────── */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.top.scrolled { box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08); }
html { scroll-padding-top: 140px; }   /* links to #anchors land below the fixed header */
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 10px; }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.top-right form { margin: 0; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-logo { width: 44px; height: 44px; margin: -4px; }
.brand-text, .me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.brand-text b { font-size: 18px; letter-spacing: -0.01em; }
.brand-text small, .me-text small { color: var(--muted); }
.me, .person { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.avatar-om { background: var(--blue-bg); color: var(--blue); }
.avatar-guard { background: var(--teal-bg); color: var(--teal); }
.btn-logout { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--err-line); background: #FFF7F6; color: #A8362B; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-logout:hover { background: var(--err-bg); }

.langs { display: flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.lang { min-width: 40px; min-height: 34px; padding: 0 8px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; }
.lang:hover { color: var(--accent); }
.lang.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(15, 27, 45, 0.12); }
.langs-long { background: var(--surface); border-radius: 12px; padding: 4px; }
.langs-long .lang { min-height: 38px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 600; }
.langs-long .lang.on { background: var(--accent-soft); box-shadow: none; }

.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav-soon { display: flex; align-items: center; min-height: 44px; padding: 0 10px; white-space: nowrap; font-weight: 500; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; }
.nav a.on { font-weight: 600; color: var(--accent); border-bottom-color: var(--accent); }
.nav-soon { color: #A3ABB7; cursor: default; }

/* ── buttons, forms ─────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #0B2489; border-color: #0B2489; color: #fff; }
.btn-lg { min-height: 48px; font-size: 15px; width: 100%; }
.btn-small { min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 12px; color: var(--accent); }
.btn-danger { color: var(--err); border-color: var(--err-line); background: var(--err-soft); }
.btn-danger:hover { color: var(--err); border-color: var(--err); }
.btn-success { color: var(--ok); border-color: var(--ok-line); background: #F0F9F3; }
.btn-success:hover { color: var(--ok); border-color: var(--ok); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: none; background: var(--bg); color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: none; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=search], input[type=number], select {
  height: 46px; width: 100%; border-radius: 10px; border: 1px solid var(--line-strong); padding: 0 14px;
  font: inherit; font-size: 15px; background: var(--surface); color: var(--text);
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 47, 168, 0.12); }
input.mono { font-size: 14px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 3px; right: 3px; width: 40px; height: 40px; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pw-toggle:hover, .pw-toggle.on { color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ── sign-in pages ──────────────────────────────────── */
body.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; font-size: 15px; }
.auth-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.auth-langs { display: flex; justify-content: center; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.auth-brand img { width: 72px; height: 72px; border-radius: 18px; }
.auth-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 24px rgba(15, 27, 45, 0.06); }
.card-title { font-size: 18px; margin: 0; letter-spacing: -0.01em; }
.forgot { align-self: flex-end; font-size: 14px; text-decoration: none; margin-top: -4px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color 0.12s, background-color 0.12s, color 0.12s; }
.back-link:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.page-head .back-link { margin-bottom: 10px; }
.auth-hint { display: flex; gap: 10px; align-items: flex-start; background: var(--info-bg); color: var(--info); border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 1.5; }
.auth-hint svg { flex: none; margin-top: 1px; }

/* ── page blocks ────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card-flush { padding: 0; gap: 0; overflow: hidden; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.card.narrow { max-width: 460px; width: 100%; margin: 0 auto; gap: 14px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head p { max-width: 640px; }
.banner { display: flex; gap: 12px; align-items: flex-start; background: var(--navy); color: #DCE4FA; border-radius: 14px; padding: 14px 18px; line-height: 1.5; }
.banner b { color: #fff; }
.banner-icon { color: var(--mint); flex: none; margin-top: 1px; display: flex; }
.alert { margin: 0; padding: 12px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.alert-error { background: var(--err-bg); color: var(--err); font-size: 13px; }
.alert-info { background: var(--info-bg); color: var(--info); }
.notice-text { font-weight: 600; overflow-wrap: anywhere; }
.hint-box { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }

/* ── tables ─────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table .right { text-align: right; }
.table .center { text-align: center; }
.row-off .person, .row-off code { opacity: 0.55; }
.actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.actions form, .matrix form { margin: 0; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-off, .badge-soon { background: #F0F2F5; color: var(--muted); }
.badge-role-admin { background: var(--accent-soft); color: var(--accent); }
.badge-role-om { background: var(--blue-bg); color: var(--blue); }
.badge-role-guard { background: var(--teal-bg); color: var(--teal); }

.matrix { min-width: 560px; }
.level { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: none; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.level-locked { cursor: default; }
.level-full { background: var(--accent); color: #fff; }
.level-view { background: #D6E8FD; color: var(--blue); }
.level-own { background: #D3F4F0; color: var(--teal); }
.level-none { background: #F0F2F5; color: var(--muted); }
button.level:hover { box-shadow: 0 0 0 2px rgba(14, 47, 168, 0.25); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 20px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot-full { background: var(--accent); }
.dot-view { background: #7FB6F5; }
.dot-own { background: #2FBFB0; }
.dot-none { background: var(--line); }

.sections { list-style: none; margin: 0; padding: 0; }
.sections li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.section-name { display: flex; flex-direction: column; }

/* ── dialog ─────────────────────────────────────────── */
.dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: none; border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 27, 45, 0.25); color: var(--text); }
.dialog::backdrop { background: rgba(15, 27, 45, 0.45); }
.dialog-body { display: flex; flex-direction: column; margin: 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #EEF1F4; }
.dialog-head h2 { font-size: 19px; }
.dialog-main { padding: 20px 24px; gap: 14px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid #EEF1F4; background: #FAFBFD; }
.role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.role-card { position: relative; cursor: pointer; }
.role-card input { position: absolute; opacity: 0; }
.role-card span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-height: 56px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); }
.role-card small { color: var(--muted); }
.role-card input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.role-card input:checked + span small { color: #DCE4FA; }
.role-card input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .me-text { display: none; }
  .btn-logout span { display: none; }
  h1 { font-size: 22px; }
  .grid-2, .role-cards { grid-template-columns: 1fr; }
}

/* ── expenses ───────────────────────────────────────── */
:root { --m-corp: #0A84F0; --m-bank: #0E2FA8; --m-personal: #C2621C; --minus: #B42318; --rose: #FDF3F4; --rose-line: #F2D7DA; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-outline { border-color: #BFD3F5; color: var(--accent); }
.btn-expense { border-color: #F2CFD3; background: #FDF0F1; color: #A3343F; }
.btn-expense:hover { border-color: #A3343F; color: #A3343F; }
.req { color: #C62B1F; }
.nowrap { white-space: nowrap; }
.minus { color: var(--minus); font-variant-numeric: tabular-nums; }
.back-link { align-self: flex-start; }

.filters { gap: 14px; padding: 18px 20px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg a { min-height: 40px; padding: 0 14px; border-radius: 10px; display: flex; align-items: center; font-weight: 500; color: var(--text-2); text-decoration: none; }
.seg a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.chip.on { border-color: #BFD3F5; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.search-row input[type=search] { flex: 1 1 280px; height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); padding: 0 14px; font: inherit; }
.search-row select { flex: 0 1 240px; height: 44px; font-size: 14px; }
.mdot, .cdot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; flex: none; }
.m-corp { background: var(--m-corp); } .m-bank { background: var(--m-bank); } .m-personal { background: var(--m-personal); }
.m-text-corp { color: var(--m-corp); } .m-text-bank { color: var(--m-bank); } .m-text-personal { color: var(--m-personal); }
.c0 { background: #8A94A3; } .c1 { background: #0E2FA8; } .c2 { background: #0A84F0; } .c3 { background: #2FBFB0; }
.c4 { background: #7A5AF0; } .c5 { background: #C2621C; } .c6 { background: #D1437A; }

.exp-table { min-width: 820px; }
.exp-row td:first-child { border-left: 3px solid transparent; padding-left: 17px; }
.m-line-corp td:first-child { border-left-color: var(--m-corp); }
.m-line-bank td:first-child { border-left-color: var(--m-bank); }
.m-line-personal td:first-child { border-left-color: var(--m-personal); }
.exp-title { font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; }
.exp-title:hover { color: var(--accent); }
.soft-pill { display: inline-block; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--bg); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cat { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.exp-table .minus { font-size: 16px; }
.tag-warn { display: inline-block; font-size: 11px; font-weight: 600; color: #8A4A10; background: #FFF4E8; padding: 2px 8px; border-radius: 999px; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px !important; font-size: 15px; }
.totals { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 16px 20px; background: var(--rose); border-top: 1px solid var(--rose-line); }
.totals > div { display: flex; flex-direction: column; gap: 2px; }
.t-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #A3343F; }
.t-big { font-size: 20px; font-variant-numeric: tabular-nums; }
.totals .t-chips { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.t-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid #EBD5D8; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.t-chip b { font-variant-numeric: tabular-nums; }

/* expense form */
.dialog-wide { width: min(760px, calc(100% - 32px)); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile, .pill { position: relative; cursor: pointer; }
.tile input, .pill input { position: absolute; opacity: 0; pointer-events: none; }
.tile span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; min-height: 52px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); }
.tile b { font-size: 14px; }
.tile small { font-size: 11px; color: var(--muted); }
.tile-other span, .pill-other span { border-style: dashed; border-color: #9FB0D8; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill span { display: flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; color: var(--text-2); }
.pill-other span { color: var(--accent); }
.tile input:checked + span, .pill input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile input:checked + span small { color: #DCE4FA; }
.tile input:focus-visible + span, .pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.other-field { margin-top: 10px; }
.js .other-field { display: none; }
.js .other-field.show { display: flex; }
input[type=date], input[type=datetime-local] { height: 46px; width: 100%; border-radius: 10px; border: 1px solid var(--line-strong); padding: 0 12px; font: inherit; font-size: 15px; background: var(--surface); color: var(--text); }
input.num { font-variant-numeric: tabular-nums; }
.file { font: inherit; font-size: 14px; padding: 10px; border: 1px dashed #9FB0D8; border-radius: 10px; background: #F7F9FE; width: 100%; }
.warn { font-size: 13px; color: #9A4512; background: #FFF4E8; border-radius: 10px; padding: 10px 12px; }
.js .warn { display: none; }
.js .warn.show { display: block; }
.dialog-foot-split { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.foot-buttons { display: flex; gap: 10px; }
.preview b { font-size: 16px; }

/* expense page */
.exp-card { gap: 18px; padding: 24px; }
.exp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.exp-head h1 { font-size: 22px; margin-top: 2px; }
.amount-big { font-size: 28px; font-weight: 700; }
.m-badge-corp { background: #E3F2FE; color: #0A5BB0; } .m-badge-bank { background: var(--accent-soft); color: var(--accent); } .m-badge-personal { background: #FFF1E3; color: #9A4512; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 24px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.receipt-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.receipt-missing { border-color: #F3D3B0; background: #FFFAF3; }
.receipt-info { display: flex; flex-direction: column; gap: 4px; }
.receipt-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.receipt-form .file { width: auto; max-width: 260px; padding: 8px; }
.sub-h { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.history li { display: flex; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.exp-actions { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.exp-actions form { margin: 0; }

@media (max-width: 560px) {
  .tiles-3 { grid-template-columns: 1fr; }
  .dialog-foot-split { flex-direction: column; align-items: stretch; }
  .foot-buttons { justify-content: flex-end; }
}

.receipt-info .tag-warn { align-self: flex-start; }

/* Expense list as cards on phones: title and date on the left, amount on the right. */
@media (max-width: 640px) {
  .exp-table, .exp-table tbody { display: block; min-width: 0; }
  .exp-table thead { display: none; }
  .exp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px;
             padding: 12px 16px 12px 13px; border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent; }
  .m-line-corp { border-left-color: var(--m-corp); }
  .m-line-bank { border-left-color: var(--m-bank); }
  .m-line-personal { border-left-color: var(--m-personal); }
  .exp-row td { display: block; padding: 0 !important; border: none !important; }
  .exp-row td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .exp-row td:nth-child(3) { grid-column: 1; grid-row: 2; font-size: 12px; }
  .exp-row td:nth-child(3) small { display: inline; margin-left: 6px; }
  .exp-row td:nth-child(5) { grid-column: 2; grid-row: 1 / span 2; }
  .exp-row td:nth-child(2), .exp-row td:nth-child(4) { display: none; }
  .exp-table .empty { display: block; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-3 { grid-template-columns: 1fr; }
  .tile span { padding: 8px 10px; }
  .dialog-head, .dialog-main, .dialog-foot { padding-left: 16px; padding-right: 16px; }
}

/* Optional "for whom" block: a dashed button that opens a small card with a remove button. */
.for-whom > summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; cursor: pointer; width: fit-content; }
.for-whom > summary::-webkit-details-marker { display: none; }
.for-add { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px dashed #9FB0D8; background: var(--surface); color: var(--accent); font-weight: 600; }
.for-whom > summary:hover .for-add { border-color: var(--accent); background: var(--accent-soft); }
.for-whom > summary:focus-visible { outline: none; }
.for-whom > summary:focus-visible .for-add { outline: 2px solid var(--accent); outline-offset: 2px; }
.for-card { border: 1px solid #BFD3F5; background: var(--info-bg); border-radius: 12px; padding: 12px 14px 14px; }
.for-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--info); }
.for-remove { display: none; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--err-line); background: var(--surface); color: var(--err); font: inherit; font-weight: 600; cursor: pointer; }
.for-remove:hover { background: var(--err-bg); }
.js .for-remove { display: inline-flex; }
.js .for-whom[open] > summary { display: none; }
.for-whom:not([open]) .for-card { display: none; }
.for-whom[open] > summary { margin-bottom: 8px; }

/* Rows that open the expense on click. */
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-2); }
.row-link:hover .exp-title { color: var(--accent); }

.month-pick { width: auto; min-height: 40px; }

/* ── Requests ─────────────────────────────────────────────────────────── */
.btn-google { justify-content: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font-weight: 600; text-decoration: none; }
.btn-google:hover { border-color: var(--accent); background: var(--surface-2); }
.or-line { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.center { text-align: center; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.links a { overflow-wrap: anywhere; }
.req-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.req-layout h2, .req-actions h2 { margin: 0; font-size: 17px; }
.req-mine { position: sticky; top: 16px; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li + li { border-top: 1px solid var(--line-2); }
.req-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; text-decoration: none; color: var(--text); }
.req-item:hover { background: var(--surface-2); }
.req-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req-item-main b { overflow-wrap: anywhere; }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reason-field { margin-top: 10px; }
.js .reason-field { display: none; }
.js .reason-field.show { display: flex; }
textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); resize: vertical; min-height: 44px; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-new { background: #FFF4E0; color: #8A5300; }
.status-approved { background: var(--blue-bg); color: var(--blue); }
.status-purchasing { background: var(--accent-soft); color: var(--accent); }
.status-done { background: var(--ok-bg); color: var(--ok); }
.status-rejected { background: var(--err-bg); color: var(--err); }
.prio { font-weight: 600; font-size: 13px; }
.prio-blocker { color: #B42318; }
.prio-urgent { color: #C2621C; }
.prio-standard { color: var(--text-2); }
.prio-planned { color: var(--muted); }
.tile-prio-blocker input:checked + span { background: #B42318; border-color: #B42318; }
.tile-prio-urgent input:checked + span { background: #C2621C; border-color: #C2621C; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: step; }
.steps li { position: relative; padding: 30px 4px 0; text-align: center; font-size: 12px; color: var(--muted); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--line-2); color: var(--muted); font-weight: 600; font-size: 12px; }
.steps li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.steps li.now { color: var(--text); font-weight: 600; }
.steps li.now::before { background: var(--accent); color: #fff; }
.steps-rejected { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--err-bg); color: var(--err); font-weight: 600; }
.file-list { margin: 0; padding-left: 18px; font-weight: 400; }
.req-detail { display: flex; flex-direction: column; gap: 16px; }
.status-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.status-pick span { justify-content: center; text-align: center; min-height: 44px; }
.status-pick-rejected input:checked + span { background: var(--err); border-color: var(--err); }
.status-pick-done input:checked + span { background: var(--ok); border-color: var(--ok); }
.seg .count { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.badge-role-emp { background: #F3EEFE; color: #5B3BA8; }
.avatar-emp { background: #F3EEFE; color: #5B3BA8; }
.qr-sheet { align-items: center; text-align: center; max-width: 520px; margin: 0 auto; padding: 36px 28px; gap: 10px; }
.qr-sheet h1 { margin: 6px 0 0; font-size: 28px; }
.qr-text { margin: 0; font-size: 16px; color: var(--text-2); }
.qr-code svg { width: 300px; height: 300px; display: block; }
.qr-url { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
@media (max-width: 900px) {
  .req-layout { grid-template-columns: 1fr; }
  .req-mine { position: static; }
  .status-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li { font-size: 11px; }
  .req-table th:nth-child(2), .req-table td:nth-child(2), .req-table th:nth-child(4), .req-table td:nth-child(4) { display: none; }
}
@media print {
  .top, .no-print { display: none !important; }
  body { background: #fff; }
  .qr-sheet { border: none; }
}

@media (min-width: 901px) { .mine-jump { display: none; } }

/* A required field that was missed when sending. */
.field-error > .field-label, .field-error > legend { color: var(--err); }
.field-error input:not([type=radio]), .field-error textarea, .field-error .tile span, .field-error .pill span { border-color: var(--err); }
.field-error-msg { color: var(--err); font-size: 13px; font-weight: 600; }

/* ── Tickets ──────────────────────────────────────────────────────────── */
.tickets-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tickets-main { display: flex; flex-direction: column; gap: 12px; }
.tickets-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.pills-filter { gap: 6px; }
.pill-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.pill-link:hover { border-color: var(--accent); }
.pill-link.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ticket-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); padding: 16px 20px; }
.ticket-card:hover { border-color: var(--accent); }
.ticket-urgent { border-left: 1px solid var(--line); box-shadow: inset 4px 0 0 #B42318; }
.ticket-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ticket-where { font-size: 15px; overflow-wrap: anywhere; }
.ticket-text { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.age { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.age-fresh { background: #E8EEFC; color: #0E2FA8; }
.age-day { background: #FFF1E3; color: #9A4512; }
.age-late { background: #FDECEA; color: #A11F14; }
.age-closed { background: var(--surface-2); color: var(--text-2); }
.tstatus-new { background: #E8EEFC; color: #0E2FA8; }
.tstatus-work { background: #FFF1E3; color: #9A4512; }
.tstatus-done { background: #E3F5EE; color: #1B6E50; }
.tstatus-rated { background: #FFF6DC; color: #7A5D00; }
.tstatus-rejected { background: var(--err-bg); color: var(--err); }
.stars { color: #C98A1E; letter-spacing: 1px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.stat-grid dt { font-size: 12px; color: var(--muted); }
.stat-grid dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; }
.stat-grid dd small { font-size: 12px; font-weight: 400; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 13px; }
progress.bar { grid-column: 1 / -1; width: 100%; height: 6px; border: none; border-radius: 3px; background: var(--line-2); appearance: none; }
progress.bar::-webkit-progress-bar { background: var(--line-2); border-radius: 3px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
.pill-urgent input:checked + span { background: #B42318; border-color: #B42318; color: #fff; }
.ticket-actions { gap: 20px; }
.ticket-actions form + form { border-top: 1px solid var(--line-2); padding-top: 18px; }
.ticket-text.pre { font-size: 16px; color: var(--text); }
.photo-rows { display: flex; flex-direction: column; gap: 12px; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.reopen > summary { list-style: none; width: fit-content; cursor: pointer; }
.reopen > summary::-webkit-details-marker { display: none; }
.reopen[open] > summary { margin-bottom: 12px; }
.rate-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 6px; }
.rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-stars label { width: 48px; height: 48px; border-radius: 10px; border: 1px solid #F0DDB0; background: #FFF9EA; color: #E3C98A; font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { color: #C98A1E; background: #FFF1CC; }
.rate-stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.qr-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 1000px) {
  .tickets-layout { grid-template-columns: 1fr; }
  .tickets-side { position: static; }
}

/* ── Dashboard ────────────────────────────────────────────────────────── */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.dash-head h1 { margin: 0; font-size: 28px; display: flex; align-items: center; gap: 12px; }
.sun { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.sun-day { background: #F2A93B; }
.sun-night { background: #7B8BD1; }
.dash-date { font-size: 15px; }
.weather-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--text-2); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.quick { width: auto; gap: 10px; font-weight: 600; text-decoration: none; padding: 0 22px; }
.quick-ticket { background: #E9F8F6; border-color: #BDE8E2; color: #0B6B63; }
.quick-request { background: var(--accent-soft); border-color: #C9D5F6; color: var(--accent); }
.quick-expense { background: var(--rose); border-color: var(--rose-line); color: #A3343F; }
.quick:hover { filter: brightness(0.97); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.col-title { margin: 8px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dash-accent { box-shadow: inset 4px 0 0 var(--accent); }
.dash-block { padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.dash-block + .dash-block { border-top: 1px solid var(--line-2); }
.dash-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dash-block-head h3 { margin: 0; font-size: 17px; }
.dash-block-head h3.dash-warn { color: #9A4512; }
.dash-block-head a { font-size: 14px; text-decoration: none; }
.wait-list, .dash-list, .soon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wait-item { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; color: var(--text); text-decoration: none; }
.wait-item:hover b { color: var(--accent); }
.wait-icon { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent); flex: none; margin-top: 2px; }
.wait-tick_urgent, .wait-tick_overdue { border-color: #B42318; background: #FDECEA; }
.wait-req_approved { border-color: var(--ok); background: var(--ok-bg); }
.dash-list li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; color: var(--text); text-decoration: none; }
.dash-list li + li a { border-top: 1px solid var(--line-2); }
.dash-list li a:hover b { color: var(--accent); }
.dash-list b { font-weight: 600; overflow-wrap: anywhere; }
.money-card { background: var(--accent); border: none; color: #fff; text-decoration: none; gap: 12px; padding: 22px 24px; }
.money-card:hover { filter: brightness(1.05); }
.money-label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; display: flex; justify-content: space-between; }
.money-total { font-size: 34px; font-weight: 800; letter-spacing: -0.01em; }
.money-total small { font-size: 18px; font-weight: 600; opacity: 0.85; }
.money-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.money-pills > span { background: rgba(255, 255, 255, 0.14); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.money-pills small { font-weight: 400; opacity: 0.85; }
.money-bar { width: 100%; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); display: block; overflow: hidden; }
.money-bar .fill-corp { fill: #7CC4FF; } .money-bar .fill-bank { fill: #FFFFFF; } .money-bar .fill-personal { fill: #F5A65B; }
.money-legend { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.money-legend .dot { margin-right: 8px; }
.money-legend .m-bank { background: #fff; }
.money-legend .m-corp { background: #7CC4FF; }
.money-legend .m-personal { background: #F5A65B; }
.money-legend b { margin-left: 4px; }
.soon-list li { display: flex; flex-direction: column; padding: 8px 0; }
.soon-list li + li { border-top: 1px solid var(--line-2); }
.soon-card { gap: 6px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-head h1 { font-size: 22px; }
  .quick { flex: 1 1 100%; justify-content: center; }
}

/* Dashboard rows: the whole row is the link, and it lights up under the pointer. */
.wait-item, .dash-list li a { margin: 0 -12px; padding: 10px 12px; border-radius: 10px; transition: background-color 0.12s; }
.dash-list li + li a { border-top: none; }
.dash-list li + li { border-top: 1px solid var(--line-2); }
.wait-item:hover, .dash-list li a:hover { background: var(--accent-soft); }
.wait-item:hover b, .dash-list li a:hover b { color: var(--accent); }
.wait-item:focus-visible, .dash-list li a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── Shifts ───────────────────────────────────────────────────────────── */
.week-bar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.week-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.week-right { display: flex; gap: 8px; }
.days-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.day-card { overflow: hidden; }
.day-today { border: 2px solid var(--accent); }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.day-today .day-head { background: var(--accent-soft); }
.day-head-right { display: flex; align-items: center; gap: 8px; }
.today-badge { background: var(--accent); color: #fff; }
.slot-list { list-style: none; margin: 0; padding: 0 18px; }
.slot { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0; }
.slot + .slot { border-top: 1px solid var(--line-2); }
.slot-main { display: flex; flex-direction: column; min-width: 0; padding-left: 10px; border-left: 3px solid var(--line-strong); }
.slot-om .slot-main { border-left-color: var(--accent); }
.slot-guard .slot-main { border-left-color: #5B3BA8; }
.slot-cleaner .slot-main { border-left-color: #2FBFB0; }
.slot-tech .slot-main { border-left-color: #C2621C; }
.slot-badges { display: flex; gap: 6px; flex: none; }
.shift-plan { background: var(--surface-2); color: var(--muted); }
.shift-now { background: var(--ok-bg); color: var(--ok); }
.shift-done { background: var(--line-2); color: var(--text-2); }
.badge-swap { background: #F3EEFE; color: #5B3BA8; }
.badge-vacation { background: var(--blue-bg); color: var(--blue); }
.badge-sick { background: var(--err-bg); color: var(--err); }
.resting { margin: 0; padding: 10px 18px 14px; font-size: 13px; border-top: 1px solid var(--line-2); }
.day-form { gap: 0; }
.day-row { border: none; margin: 0; padding: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.day-row + .day-row { border-top: 1px solid var(--line-2); }
.day-row legend { padding: 0; margin-bottom: 8px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; }
.day-extra.only-note .field:nth-child(1), .day-extra.only-note .field:nth-child(2) { display: none; }
.day-extra.only-note { grid-template-columns: 1fr; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }
input[type=time] { height: 46px; width: 100%; border-radius: 10px; border: 1px solid var(--line-strong); padding: 0 12px; font: inherit; font-size: 15px; background: var(--surface); color: var(--text); }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
form.inline { display: inline; }
@media (max-width: 560px) {
  .days-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .tiles-2 { grid-template-columns: 1fr; }
}

.dash-shifts { text-decoration: none; color: var(--text); padding: 4px 0; }
.dash-shifts:hover { border-color: var(--accent); }

[hidden] { display: none !important; }
/* Whole-card links keep their own text colour under the pointer (a:hover would turn it blue). */
.money-card:hover { color: #fff; }
.dash-shifts:hover, .ticket-card:hover, .req-item:hover, .wait-item:hover, .dash-list li a:hover { color: var(--text); }

/* ── Hover feedback everywhere: whatever can be clicked or changed shows it under the pointer ── */
.tile span, .pill span { cursor: pointer; transition: border-color 0.12s, background-color 0.12s, box-shadow 0.12s, color 0.12s; }
.tile:hover input:not(:checked) + span, .pill:hover input:not(:checked) + span {
  border-color: var(--accent); background: #DCE5FB; color: var(--accent); box-shadow: 0 0 0 1px var(--accent);
}
.tile:hover input:not(:checked) + span small { color: var(--accent); }
.tile:hover input:checked + span, .pill:hover input:checked + span { box-shadow: 0 0 0 3px rgba(14, 47, 168, 0.18); }
.pill-urgent:hover input:not(:checked) + span { border-color: #B42318; background: #FDECEC; color: #B42318; }
.tile-prio-blocker:hover input:not(:checked) + span { border-color: #B42318; background: #FDECEC; }
.tile-prio-urgent:hover input:not(:checked) + span { border-color: #C2621C; background: #FFF1E3; }
.status-pick-rejected:hover input:not(:checked) + span { border-color: var(--err); background: var(--err-bg); color: var(--err); }
.status-pick-done:hover input:not(:checked) + span { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=search], input[type=date], input[type=number],
input[type=time], input[type=datetime-local], select, textarea {
  transition: border-color 0.12s, box-shadow 0.12s;
}
input[type=number]:hover, input[type=text]:hover, input[type=password]:hover, input[type=email]:hover, input[type=tel]:hover, input[type=search]:hover,
input[type=date]:hover, input[type=time]:hover, input[type=datetime-local]:hover, select:hover, textarea:hover {
  border-color: #8EA2C8;
}
input[type=number]:focus, input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, input[type=tel]:focus, input[type=search]:focus,
input[type=date]:focus, input[type=time]:focus, input[type=datetime-local]:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 47, 168, 0.15); outline: none;
}
input[type=file].file, .file { cursor: pointer; }
.file:hover { border-color: var(--accent); background: var(--accent-soft); }
select { cursor: pointer; }
.btn { transition: border-color 0.12s, background-color 0.12s, color 0.12s, box-shadow 0.12s; }
.btn:hover { background: var(--accent-soft); }
.btn-primary:hover { background: #0B2489; }
.btn-danger:hover { background: var(--err-bg); }
.btn-success:hover { background: var(--ok-bg); }
.btn:focus-visible, .tile input:focus-visible + span, .pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.day-row { border-radius: 10px; transition: background-color 0.12s; }
.day-row:hover { background: var(--surface-2); box-shadow: -12px 0 0 var(--surface-2), 12px 0 0 var(--surface-2); }
.table tbody tr { transition: background-color 0.12s; }
.table tbody tr:hover td { background: var(--surface-2); }
/* Coloured buttons keep their own colour family on hover. */
.btn-expense:hover { background: #FBE4E6; border-color: #A3343F; color: #A3343F; }
.btn-logout:hover { background: var(--err-bg); }
.btn-google:hover { background: var(--surface-2); }
.quick-ticket:hover { background: #DDF4F0; border-color: #0B6B63; color: #0B6B63; }
.quick-request:hover { background: #DCE5FB; border-color: var(--accent); color: var(--accent); }
.quick-expense:hover { background: #FBE4E6; border-color: #A3343F; color: #A3343F; }

/* ── expense report ─────────────────────────────────── */
.rep-filters { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 12px; }
.seg-right { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi span { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: var(--muted); }
.kpi-main { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi-main span, .kpi-main small { color: rgba(255, 255, 255, 0.75); }
.kpi-neg b, .neg, .neg b { color: var(--minus); }
.pos { color: var(--ok); }
.card-now { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.card-balance { display: flex; flex-direction: column; gap: 2px; }
.card-balance span { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.card-balance b { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.card-balance small { font-size: 15px; color: var(--muted); font-weight: 600; }
.card-facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; }
.card-facts dt { font-size: 12px; color: var(--muted); }
.card-facts dd { margin: 0; font-size: 16px; font-weight: 600; }
.rep-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rep-chart { width: 100%; height: auto; display: block; }
.rep-chart .grid { stroke: var(--line-2); stroke-width: 1; }
.rep-chart .zero { stroke: var(--line-strong); stroke-width: 1; }
.rep-chart .axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.rep-chart .fill-corp { fill: var(--m-corp); } .rep-chart .fill-bank { fill: var(--m-bank); } .rep-chart .fill-personal { fill: var(--m-personal); }
.rep-chart rect:hover { opacity: 0.8; }
.rep-chart .bal-line { fill: none; stroke: var(--ok); stroke-width: 2.5; stroke-linejoin: round; }
.rep-chart .bal-dot { fill: #fff; stroke: var(--ok); stroke-width: 2.5; }
.rep-chart .bal-dot.neg { stroke: var(--minus); }
.rep-chart .bal-dot:hover { fill: var(--ok); }
.rep-chart .bal-area { fill: var(--ok-bg); opacity: 0.7; }
.rep-legend { display: flex; font-size: 13px; flex-direction: row; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); }
.rep-legend span { display: inline-flex; align-items: center; gap: 6px; }
.line-key { width: 16px; height: 3px; border-radius: 2px; background: var(--ok); display: inline-block; }
.rep-h { padding: 16px 20px 12px; }
.rep-table { min-width: 0; }
.rep-table td, .rep-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rep-table td:first-child { white-space: normal; min-width: 260px; }
.rep-table td:last-child, .rep-table th:last-child { background: var(--surface-2); }
.rep-strong td { font-weight: 700; }
.rep-sub td { padding-top: 14px; padding-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--surface) !important; }
.rep-indent { padding-left: 32px !important; }
.rep-indent .lbl { display: inline-flex; align-items: center; gap: 8px; }
.rep-footer { text-align: center; padding-top: 8px; }
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-charts { grid-template-columns: 1fr; }
  .seg-right { margin-left: 0; }
}
@media (max-width: 480px) {
  .kpi b { font-size: 20px; }
  .rep-table td:first-child { min-width: 150px; }
}
@media print {
  .top, .head-actions, .rep-filters, .link-btn { display: none; }
  .rep-pos, .rep-extra { display: table-row !important; }
}
.dash-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
progress.bar.bar-c0::-webkit-progress-value { background: #8A94A3; } progress.bar.bar-c0::-moz-progress-bar { background: #8A94A3; }
progress.bar.bar-c1::-webkit-progress-value { background: #0E2FA8; } progress.bar.bar-c1::-moz-progress-bar { background: #0E2FA8; }
progress.bar.bar-c2::-webkit-progress-value { background: #0A84F0; } progress.bar.bar-c2::-moz-progress-bar { background: #0A84F0; }
progress.bar.bar-c3::-webkit-progress-value { background: #2FBFB0; } progress.bar.bar-c3::-moz-progress-bar { background: #2FBFB0; }
progress.bar.bar-c4::-webkit-progress-value { background: #7A5AF0; } progress.bar.bar-c4::-moz-progress-bar { background: #7A5AF0; }
progress.bar.bar-c5::-webkit-progress-value { background: #C2621C; } progress.bar.bar-c5::-moz-progress-bar { background: #C2621C; }
progress.bar.bar-c6::-webkit-progress-value { background: #D1437A; } progress.bar.bar-c6::-moz-progress-bar { background: #D1437A; }
.rep-chips { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 2px; }
.rep-chips:empty { display: none; }
.rep-chips .chip { min-height: 32px; padding: 0 12px; }
.rep-chips .chip:hover { border-color: var(--accent); color: var(--accent); }
.rep-filter-note { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
.link-btn { border: none; background: none; padding: 4px 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 13px; }
.link-btn:hover { color: var(--accent-hover); text-decoration: underline; }
.rep-sub-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rep-cat { cursor: pointer; }
.rep-cat:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rep-cat .chev { color: var(--muted); transition: transform 0.15s; flex: none; }
.rep-cat[aria-expanded="true"] .chev { transform: rotate(90deg); }
.rep-cat[aria-expanded="true"] td { background: var(--accent-soft); }
.rep-pos td { font-size: 13px; color: var(--text-2); background: #FBFCFE; }
.rep-indent-2 { padding-left: 64px !important; white-space: normal !important; }
.rep-positions td:first-child { min-width: 240px; }
.rep-positions td { white-space: normal; }
.rep-more { padding: 12px 20px 16px; }
.rep-table .lbl { display: inline-flex; align-items: center; gap: 8px; }
.rep-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rep-tile { gap: 8px; color: inherit; text-decoration: none; min-height: 190px; transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s; }
a.rep-tile:hover { color: inherit; border-color: var(--accent); box-shadow: 0 6px 20px rgba(14, 47, 168, 0.1); transform: translateY(-1px); }
a.rep-tile:hover .rep-open { color: var(--accent-hover); }
.rep-tile b { font-size: 17px; }
.rep-tile > .muted { font-size: 13px; }
.rep-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.rep-tile-soon { opacity: 0.75; }
.rep-tile-soon .rep-icon { background: var(--surface-2); color: var(--muted); }
.rep-tile-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rep-open { font-weight: 600; color: var(--accent); }
.rep-for { font-size: 15px; }
.seg-months { flex-basis: 100%; align-items: center; padding-top: 6px; border-top: 1px solid var(--line-2); }
.seg-months a { min-height: 34px; padding: 0 10px; font-size: 13px; }
.tag-month { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; }
.month-picks { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.month-pick-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color 0.12s, background-color 0.12s, color 0.12s; }
.month-pick-chip .tick { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; background: var(--surface); }
.month-pick-chip:hover { border-color: var(--accent); color: var(--accent); }
.month-pick-chip:hover .tick { border-color: var(--accent); }
.month-pick-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.month-pick-chip.on .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.totals-top { border-top: none; border-bottom: 1px solid var(--rose-line); border-radius: 16px 16px 0 0; }
.exp-table td:last-child { white-space: nowrap; }
@media (max-width: 700px) {
  /* Keep the fixed header short on phones: one scrollable row of sections. */
  .top .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .top .nav::-webkit-scrollbar { display: none; }
  .top-row { padding: 10px 0 6px; }
}
.backup-warn { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.backup-warn code { font-size: 12px; background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 6px; }

/* ── meeting rooms ───────────────────────────────────── */
.day-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.day-nav-title { font-size: 16px; }
.day-pick { margin-left: auto; }
.day-pick input { height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 10px; font: inherit; }
.rb-hint { padding: 4px 20px 16px; }
.booking-list { list-style: none; margin: 0; padding: 0; }
.booking-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); }

/* ── meeting rooms: calendar (rooms across, time down) ─ */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.tabs-pill { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.tab-pill { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; }
.tab-pill:hover { color: var(--navy); background: #fff; }
.tab-pill.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(15, 27, 45, 0.12); }
.cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-nav .is-on { border-color: var(--accent); color: var(--accent); }
.cal-day { font-size: 15px; margin-left: 4px; }
.cal-scroll { overflow-x: auto; }
.cal { display: grid; grid-template-rows: auto repeat(24, 30px); padding: 0 20px 8px 0; position: relative; }
.cal.rooms-1 { grid-template-columns: 64px repeat(1, minmax(190px, 1fr)); min-width: 274px; }
.cal.rooms-2 { grid-template-columns: 64px repeat(2, minmax(190px, 1fr)); min-width: 464px; }
.cal.rooms-3 { grid-template-columns: 64px repeat(3, minmax(190px, 1fr)); min-width: 654px; }
.cal.rooms-4 { grid-template-columns: 64px repeat(4, minmax(190px, 1fr)); min-width: 844px; }
.cal.rooms-5 { grid-template-columns: 64px repeat(5, minmax(190px, 1fr)); min-width: 1034px; }
.cal.rooms-6 { grid-template-columns: 64px repeat(6, minmax(190px, 1fr)); min-width: 1224px; }
.cal.rooms-7 { grid-template-columns: 64px repeat(7, minmax(190px, 1fr)); min-width: 1414px; }
.cal.rooms-8 { grid-template-columns: 64px repeat(8, minmax(190px, 1fr)); min-width: 1604px; }
.cal.rooms-9 { grid-template-columns: 64px repeat(9, minmax(190px, 1fr)); min-width: 1794px; }
.cal.rooms-10 { grid-template-columns: 64px repeat(10, minmax(190px, 1fr)); min-width: 1984px; }
.cal.rooms-11 { grid-template-columns: 64px repeat(11, minmax(190px, 1fr)); min-width: 2174px; }
.cal.rooms-12 { grid-template-columns: 64px repeat(12, minmax(190px, 1fr)); min-width: 2364px; }
.cal.rooms-13 { grid-template-columns: 64px repeat(13, minmax(190px, 1fr)); min-width: 2554px; }
.cal.rooms-14 { grid-template-columns: 64px repeat(14, minmax(190px, 1fr)); min-width: 2744px; }
.cal.rooms-15 { grid-template-columns: 64px repeat(15, minmax(190px, 1fr)); min-width: 2934px; }
.cal.rooms-16 { grid-template-columns: 64px repeat(16, minmax(190px, 1fr)); min-width: 3124px; }
.cal.rooms-17 { grid-template-columns: 64px repeat(17, minmax(190px, 1fr)); min-width: 3314px; }
.cal.rooms-18 { grid-template-columns: 64px repeat(18, minmax(190px, 1fr)); min-width: 3504px; }
.cal.rooms-19 { grid-template-columns: 64px repeat(19, minmax(190px, 1fr)); min-width: 3694px; }
.cal.rooms-20 { grid-template-columns: 64px repeat(20, minmax(190px, 1fr)); min-width: 3884px; }
.cal-corner { grid-column: 1; grid-row: 1; align-self: end; padding: 0 8px 8px; font-size: 11px; color: var(--muted); }
.cal-room { grid-row: 1; display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; min-width: 0; }
.cal-room-pic { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.room-pic-none { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 18px; }
.cal-room-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cal-room-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-room-text small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.cal-add { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); color: var(--navy); }
.cal-add:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cal-hour { grid-column: 1; font-size: 12px; color: var(--muted); text-align: right; padding-right: 10px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal-free { display: block; border-left: 1px solid var(--line-2); border-top: 1px dashed #EEF0F3; position: relative; text-decoration: none; }
.cal-free.hr { border-top: 1px solid var(--line-2); }
.cal-free span { display: none; position: absolute; inset: 2px 4px; align-items: center; padding-left: 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
a.cal-free:hover span, a.cal-free:focus-visible span { display: flex; }
.cal-free.past { background: repeating-linear-gradient(135deg, #FAFBFC 0 6px, #F3F4F6 6px 12px); }
.cal-busy { margin: 2px 4px; padding: 6px 10px; border-radius: 8px; background: #EEF0F3; border-left: 3px solid #9AA4B2; color: var(--text); display: flex; flex-direction: column; gap: 1px; overflow: hidden; font-size: 12px; line-height: 1.3; z-index: 1; }
.cal-busy b, .cal-busy span, .cal-busy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-busy b { font-size: 13px; }
.cal-busy small { color: var(--muted); }
.cal-busy.short { flex-direction: row; align-items: center; gap: 6px; padding: 2px 8px; }
.cal-busy.short span { display: none; }
.cal-busy.mine { background: #E6F4EA; border-left-color: #1E8E3E; }
.cal-now { grid-column: 2 / -1; height: 2px; background: #E5484D; align-self: start; z-index: 3; pointer-events: none; position: relative; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #E5484D; }
.cal-now.half { margin-top: 15px; }
.cc-1 { grid-column-start: 2; } .cc-2 { grid-column-start: 3; } .cc-3 { grid-column-start: 4; } .cc-4 { grid-column-start: 5; } .cc-5 { grid-column-start: 6; } .cc-6 { grid-column-start: 7; } .cc-7 { grid-column-start: 8; } .cc-8 { grid-column-start: 9; } .cc-9 { grid-column-start: 10; } .cc-10 { grid-column-start: 11; } .cc-11 { grid-column-start: 12; } .cc-12 { grid-column-start: 13; } .cc-13 { grid-column-start: 14; } .cc-14 { grid-column-start: 15; } .cc-15 { grid-column-start: 16; } .cc-16 { grid-column-start: 17; } .cc-17 { grid-column-start: 18; } .cc-18 { grid-column-start: 19; } .cc-19 { grid-column-start: 20; } .cc-20 { grid-column-start: 21; } 
.gr-1 { grid-row-start: 2; } .gr-2 { grid-row-start: 3; } .gr-3 { grid-row-start: 4; } .gr-4 { grid-row-start: 5; } .gr-5 { grid-row-start: 6; } .gr-6 { grid-row-start: 7; } .gr-7 { grid-row-start: 8; } .gr-8 { grid-row-start: 9; } .gr-9 { grid-row-start: 10; } .gr-10 { grid-row-start: 11; } .gr-11 { grid-row-start: 12; } .gr-12 { grid-row-start: 13; } .gr-13 { grid-row-start: 14; } .gr-14 { grid-row-start: 15; } .gr-15 { grid-row-start: 16; } .gr-16 { grid-row-start: 17; } .gr-17 { grid-row-start: 18; } .gr-18 { grid-row-start: 19; } .gr-19 { grid-row-start: 20; } .gr-20 { grid-row-start: 21; } .gr-21 { grid-row-start: 22; } .gr-22 { grid-row-start: 23; } .gr-23 { grid-row-start: 24; } .gr-24 { grid-row-start: 25; } 
.rs-1 { grid-row-end: span 1; } .rs-2 { grid-row-end: span 2; } .rs-3 { grid-row-end: span 3; } .rs-4 { grid-row-end: span 4; } .rs-5 { grid-row-end: span 5; } .rs-6 { grid-row-end: span 6; } .rs-7 { grid-row-end: span 7; } .rs-8 { grid-row-end: span 8; } .rs-9 { grid-row-end: span 9; } .rs-10 { grid-row-end: span 10; } .rs-11 { grid-row-end: span 11; } .rs-12 { grid-row-end: span 12; } .rs-13 { grid-row-end: span 13; } .rs-14 { grid-row-end: span 14; } .rs-15 { grid-row-end: span 15; } .rs-16 { grid-row-end: span 16; } .rs-17 { grid-row-end: span 17; } .rs-18 { grid-row-end: span 18; } .rs-19 { grid-row-end: span 19; } .rs-20 { grid-row-end: span 20; } .rs-21 { grid-row-end: span 21; } .rs-22 { grid-row-end: span 22; } .rs-23 { grid-row-end: span 23; } .rs-24 { grid-row-end: span 24; } 
.room-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 20px; }
.room-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; background: #fff; transition: box-shadow .15s, transform .15s; }
.room-card:hover { box-shadow: 0 8px 24px rgba(15, 27, 45, 0.10); transform: translateY(-1px); }
.room-card-pic { width: 100%; height: 160px; object-fit: cover; display: flex; font-size: 44px; }
.room-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex: 1; }
.room-card-body h3 { font-size: 17px; margin: 0; }
.room-card-body .btn { margin-top: auto; }
.room-meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; color: var(--muted); font-size: 13px; }
.room-meta span { display: inline-flex; align-items: center; gap: 4px; }
.room-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; font-size: 16px; }
.room-thumb-lg { width: 96px; height: 72px; }
.thumb-cell { width: 56px; }
.photo-row { display: flex; gap: 14px; align-items: flex-start; }
.book-dur { margin: -4px 0 0; }
@media (max-width: 720px) { .cal-bar { padding: 12px 16px; } .cal-day { width: 100%; margin: 0; } }
.text-error { color: #C5221F; }
.btn-primary.btn-small, .btn-primary.btn-small:hover { color: #fff; }

/* ── contacts ─────────────────────────────────────── */
.contact-hint { padding: 0 20px 8px; margin: -6px 0 0; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line-2); transition: background-color .12s; }
.contact-list li.row-link { cursor: pointer; }
.contact-list li.row-link:hover { background: var(--surface-2); }
.contact-list li:target { background: var(--accent-soft); }
.contact-main { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 260px; }
.contact-main a { color: var(--text); text-decoration: none; }
.contact-main a:hover { color: var(--accent); }
.contact-av { width: 36px; height: 36px; font-size: 14px; }
.contact-note { max-width: 560px; }
.contact-phones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.contact-phones .btn { font-size: 13px; font-variant-numeric: tabular-nums; }
.form-actions .grow { flex: 1; }

/* ── tasks ────────────────────────────────────────── */
.task-progress { display: grid; gap: 6px; min-width: 200px; }
.task-note { padding: 10px 20px; margin: 0; }
.task-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.task-groups .card { margin: 0; }
.task-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.task-head h2 { font-size: 17px; margin: 0 0 2px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.task-list li:first-child { border-top: none; }
.task-list li:target { background: var(--accent-soft); }
.task-box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line-strong); background: #fff; color: transparent; cursor: pointer; padding: 0; transition: all .12s; }
button.task-box:hover { border-color: #1E8E3E; color: #9FD3B0; }
.is-done .task-box { background: #1E8E3E; border-color: #1E8E3E; color: #fff; }
.is-late .task-box { border-color: var(--err); }
.task-time { flex: none; width: 46px; padding-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-body { flex: 1; min-width: 0; padding-top: 3px; }
.task-body .badge { margin-left: 6px; }
.is-done .task-body > b { color: var(--muted); text-decoration: line-through; }
.task-done-by { color: #1E8E3E; margin-top: 2px; }
@media (max-width: 720px) { .task-groups { grid-template-columns: 1fr; } }
