:root {
  --bg: #f4f6f9; --surface: #fff; --surface-2: #f0f3f7; --text: #18212d; --muted: #667384;
  --line: #e0e5ec; --brand: #1f4f8b; --brand-soft: #e4edf8; --side: #16273c; --side-text: #b9c6d6;
  --ok: #1e8a5a; --ok-soft: #e0f3ea; --late: #b86a00; --late-soft: #fde9cb;
  --bad: #c0392f; --bad-soft: #fadcd9; --weekend: #dfeafa; --weekend-text: #2b5c9c;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 35, 55, .06), 0 4px 16px rgba(20, 35, 55, .05);
  --series-1: #2a78d6; --grid: #e6eaf0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161e; --surface: #18212c; --surface-2: #202b38; --text: #e6ebf1; --muted: #93a1b2;
    --line: #2b3746; --brand: #6ea3e6; --brand-soft: #1f3148; --side: #0c1219; --side-text: #9fb0c3;
    --ok: #4cc08c; --ok-soft: #173a2c; --late: #f0ac55; --late-soft: #453012;
    --bad: #f0897f; --bad-soft: #4a2320; --weekend: #1d2f47; --weekend-text: #8db8ee;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
    --series-1: #3987e5; --grid: #2b3746;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
p { margin: 0; }
a { color: var(--brand); }
.muted { color: var(--muted); }

.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--side); color: var(--side-text); padding: 20px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: #fff; padding: 0 8px 20px; }
.brand-mark { width: 34px; height: 34px; flex: none; transform-origin: 50% 90%; transition: transform .2s; }
.brand:hover .brand-mark { animation: hop .45s ease-out; }
.login-card .brand-mark { width: 56px; height: 56px; }
@keyframes hop { 40% { transform: translateY(-5px) rotate(-5deg); } 70% { transform: translateY(0) rotate(3deg); } }
nav { display: grid; gap: 2px; }
nav a { display: flex; align-items: center; gap: 10px; transition: background-color .15s, color .15s; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--side-text); text-decoration: none; }
nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
nav a.active { background: rgba(110, 163, 230, .2); color: #fff; font-weight: 600; }
nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 8px; }
.panel-pill { display: flex; gap: 8px; align-items: center; font-size: 12px; cursor: pointer; }
.panel-pill i { width: 8px; height: 8px; border-radius: 50%; background: #7d8a99; flex: none; }
.panel-pill.on i { background: #3fce8d; }
.panel-pill.off i { background: #ec6a5e; }
.link { background: none; border: 0; color: inherit; padding: 0; text-align: left; cursor: pointer; font: inherit; opacity: .8; }

main { padding: 26px 28px 40px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }

label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
input, select { transition: border-color .15s; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 36px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
input[type=checkbox] { min-height: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); font-weight: 400; cursor: pointer; }

.btn { display: inline-flex; align-items: center; text-decoration: none; font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; padding: 7px 14px; min-height: 36px; cursor: pointer; white-space: nowrap; }
.btn { transition: background-color .15s, border-color .15s, filter .15s, transform .08s; }
.btn:hover { background: var(--surface-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0c1219; } }

.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.quick { display: flex; gap: 4px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { transition: background-color .15s, border-color .15s, color .15s; font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.filter-row > span { color: var(--muted); font-size: 12px; font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 8px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.table-wrap { overflow: auto; max-height: calc(100vh - 150px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; font-size: 12px; color: var(--muted); font-weight: 600; }
td { transition: background-color .12s; }
tbody tr:hover td { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; }

.matrix th, .matrix td { padding: 0; text-align: center; border-right: 1px solid var(--line); font-size: 12px; font-variant-numeric: tabular-nums; }
.matrix thead th { padding: 5px 0; min-width: 40px; line-height: 1.2; }
.matrix thead th small { display: block; font-weight: 400; }
.matrix thead th.we { background: var(--weekend); color: var(--weekend-text); }
.matrix .name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 6px 12px; font-size: 13px; min-width: 240px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.matrix thead .name { z-index: 3; background: var(--surface-2); }
.matrix td { height: 32px; min-width: 40px; }
.matrix td.we { background: var(--weekend); }
.matrix td.late { background: var(--late-soft); color: var(--late); font-weight: 600; }
.matrix td.incomplete { background: var(--bad-soft); color: var(--bad); font-weight: 700; }
.matrix .total { min-width: 52px; background: var(--surface-2); padding: 0 6px; font-weight: 600; }
.matrix .group td { background: var(--brand-soft); color: var(--brand); font-weight: 700; text-align: left; padding: 6px 12px; font-size: 12px; position: sticky; left: 0; }
.matrix tfoot td { position: sticky; bottom: 0; background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--line); }
.matrix tfoot .name { z-index: 3; background: var(--surface-2); }

.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.block > header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface-2); font-weight: 700; }
.block > header span { font-weight: 400; color: var(--muted); font-size: 13px; }
.block .scroll, .card .scroll { overflow-x: auto; }
.tag { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; margin-right: 4px; }
.tag.late { background: var(--late-soft); color: var(--late); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.we { background: var(--weekend); color: var(--weekend-text); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .wide { grid-column: 1 / -1; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline input[type=text], .inline input:not([type]) { flex: 1 1 160px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.compact input, .compact select { min-height: 30px; padding: 3px 8px; }
.compact input.time { width: 96px; }
.compact input.mins { width: 76px; }

.report { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.report:first-of-type { border-top: 0; }
.report b { display: block; }
.dash { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash .card { margin-bottom: 0; min-width: 0; }
.dash-col { display: grid; gap: 16px; min-width: 0; }
.dash-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card h2 + .sub { color: var(--muted); font-size: 12px; margin: -9px 0 12px; }
.chart { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); height: 190px; }
.chart .yaxis { position: relative; font-size: 11px; color: var(--muted); margin-bottom: 20px; }
.chart .yaxis span { position: absolute; right: 6px; transform: translateY(50%); }
.chart .plot { position: relative; display: flex; align-items: flex-end; gap: 2px; margin-bottom: 20px; }
.chart .gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.chart .col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart .col:hover { background: var(--surface-2); }
.chart .bar { position: relative; width: 100%; max-width: 24px; background: var(--series-1); border-radius: 4px 4px 0 0; min-height: 0; }
.chart .col:hover .bar { filter: brightness(1.12); }
.chart .tick { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart .peak { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; padding-bottom: 2px; }
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--text); color: var(--surface); font-size: 12px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; }
.rank { display: grid; gap: 8px; }
.rank > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.rank .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .track { display: flex; align-items: center; gap: 6px; }
.rank .fill { height: 14px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.rank b { font-variant-numeric: tabular-nums; font-size: 12px; }
.people { display: grid; gap: 2px; }
.person { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.avatar { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.person b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .when { text-align: right; font-variant-numeric: tabular-nums; }
.person .when b { font-size: 15px; }
details.table-view { margin-top: 10px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--muted); }
details.table-view .scroll { max-height: 220px; overflow: auto; margin-top: 6px; }
.status { display: flex; gap: 14px; align-items: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 5px var(--ok-soft); }
.dot.off { background: var(--bad); box-shadow: 0 0 0 5px var(--bad-soft); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 14px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.notice { background: var(--late-soft); color: var(--text); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.login { min-height: 100%; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% -10%, #24466f, var(--side)); padding: 16px; }
.login-card { width: min(380px, 100%); background: var(--surface); padding: 28px; border-radius: 14px; display: grid; gap: 16px; box-shadow: 0 16px 48px rgba(0, 0, 0, .3); animation: rise .25s ease-out; }
.login-card .btn { justify-content: center; }
.login-card .brand { color: var(--text); padding: 0; }
.error { color: var(--bad); font-size: 13px; }
.toast { animation: rise .18s ease-out; position: fixed; right: 20px; bottom: 20px; background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 8px; z-index: 20; box-shadow: var(--shadow); max-width: min(420px, calc(100vw - 32px)); }
.toast.bad { background: var(--bad); color: #fff; }

.fade { animation: fade .16s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; overflow: hidden; background: var(--brand-soft); }
.loadbar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--brand); animation: slide 1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.skeleton { display: grid; gap: 14px; }
.skeleton i { display: block; height: 96px; border-radius: var(--radius); background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite; }
.skeleton i:first-child { height: 42px; width: 40%; }
@keyframes pulse { 50% { opacity: .55; } }
.ask { border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 16px 48px rgba(0, 0, 0, .3); }
.ask[open] { animation: rise .16s ease-out; }
.ask::backdrop { background: rgba(10, 20, 32, .5); }
.ask form { display: grid; gap: 12px; }
.ask h2 { margin: 0; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn.primary.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.avatar { transition: transform .15s; }
img.avatar:hover { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.days { display: flex; gap: 3px; }
.day { font: inherit; font-size: 12px; min-width: 32px; min-height: 30px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.day.on { background: var(--weekend); border-color: var(--weekend-text); color: var(--weekend-text); font-weight: 700; }
.topbar, .tabbar { display: none; }
.sheet { border: 0; border-radius: 16px 16px 0 0; margin: auto 0 0; width: 100%; max-width: none; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); color: var(--text); }
.sheet[open] { animation: rise .18s ease-out; }
.sheet::backdrop { background: rgba(10, 20, 32, .5); }
.sheet nav a { color: var(--text); min-height: 48px; }
.sheet nav a.active { background: var(--brand-soft); color: var(--brand); }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 0; margin-top: 8px; border-top: 1px solid var(--line); }
details.more-filters > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 12px; }
.new-emp > summary { list-style: none; cursor: pointer; }
.new-emp > summary::-webkit-details-marker { display: none; }
.new-emp > summary h2 { margin: 0; }
.new-emp[open] > summary { margin-bottom: 12px; }
.block > summary { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface-2); font-weight: 700; cursor: pointer; list-style: none; }
.block > summary::-webkit-details-marker { display: none; }
.block > summary span { font-weight: 400; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  body { font-size: 15px; -webkit-text-size-adjust: 100%; }
  .shell { display: block; padding-top: calc(52px + env(safe-area-inset-top)); }
  .side { display: none; }
  .topbar { display: flex; position: fixed; inset: 0 0 auto; z-index: 15; justify-content: space-between; align-items: center; gap: 10px; background: var(--side); color: var(--side-text); padding: calc(8px + env(safe-area-inset-top)) 16px 8px; height: calc(52px + env(safe-area-inset-top)); }
  .topbar .brand { padding: 0; font-size: 16px; }
  .topbar .brand-mark { width: 30px; height: 30px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; inset: auto 0 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 2px; border: 0; border-radius: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 500; text-decoration: none; cursor: pointer; }
  .tabbar a svg, .tabbar button svg { width: 22px; height: 22px; }
  .tabbar a:hover { background: none; color: var(--muted); }
  .tabbar a.active { background: none; color: var(--brand); font-weight: 700; }
  main { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  h1 { font-size: 22px; }
  .head { align-items: stretch; flex-direction: column; gap: 10px; }
  .head .btn, .head > input { width: 100%; justify-content: center; }
  input, select { font-size: 16px; min-height: 44px; }
  input[type=checkbox] { width: 22px; height: 22px; min-height: 0; }
  .compact input, .compact select { min-height: 44px; padding: 6px 10px; }
  .compact input.time, .compact input.mins { width: 100%; }
  .btn { min-height: 44px; justify-content: center; }
  .btn.small { min-height: 44px; font-size: 14px; padding: 6px 12px; }
  .chip { min-height: 40px; padding: 7px 14px; }
  .day { flex: 1 1 0; min-width: 0; min-height: 44px; font-size: 13px; }
  .check { min-height: 44px; }
  .inline { flex-direction: column; align-items: stretch; }
  .inline > * { flex: 1 1 auto !important; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filters .quick { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .filters .quick .btn { flex: none; }
  .filters input[type=date] { width: 100%; min-width: 0; }
  .card { padding: 14px; }
  .stats, .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats:not(.dash-stats) .stat:last-child { grid-column: 1 / -1; }
  .stat b { font-size: 22px; }
  .dash, .grid2, .form { grid-template-columns: minmax(0, 1fr); }
  .tabs button { flex: 1 0 auto; min-height: 44px; }
  .table-wrap { max-height: calc(100vh - 210px); }
  .matrix .name { min-width: 132px; max-width: 150px; padding: 6px 8px; font-size: 12px; }
  .matrix .name .muted { display: none; }
  .matrix td { height: 38px; }
  .block td, .block th { padding: 8px 6px; font-size: 13px; }
  .report { flex-direction: column; align-items: stretch; }
  .row-actions { flex-wrap: wrap; justify-content: stretch; }
  .row-actions .btn { flex: 1 1 auto; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 10px; }
  .toast { left: 16px; right: 16px; bottom: calc(68px + env(safe-area-inset-bottom)); max-width: none; }
  .tip { display: none; }

  /* таблицы настроек превращаются в карточки */
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 4px 0; white-space: normal; text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
  table.stack td.num { display: flex; justify-content: space-between; }
  table.stack td.num::before { margin: 0; }
  table.stack tbody tr:hover td { background: none; }
  .table-wrap:has(table.stack) { max-height: none; overflow: visible; padding: 0 14px; }
  table.stack input:not([type=checkbox]), table.stack select { width: 100%; min-width: 0 !important; }
  table.stack td.inline-check { display: flex; align-items: center; justify-content: space-between; }
  table.stack td.inline-check::before { margin: 0; }

  /* компактная карточка сотрудника: 93 человека нужно быстро пролистывать */
  table.staff tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
  table.staff td { padding: 0; width: auto; }
  table.staff td::before { display: none !important; }
  table.staff td:nth-child(2), table.staff td:nth-child(3) { grid-column: 1 / -1; }
  table.staff td:nth-child(1) { display: none; }
  table.staff td:nth-child(4) { grid-column: 1; font-size: 12px; }
  table.staff td:nth-child(5) { display: none; }
  table.staff td.inline-check { grid-column: 2; grid-row: 3; }
  table.staff td.inline-check::after { content: "В табеле"; font-size: 12px; color: var(--muted); margin-left: 6px; }
}
@media print {
  .topbar, .tabbar, .loadbar, .toast,
  .side, .filters, .tabs, .head .btn { display: none; }
  .shell { display: block; }
  .table-wrap { max-height: none; overflow: visible; }
}
