@font-face { font-family: 'Manrope'; font-weight: 400; src: url('/static/fonts/Manrope-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Manrope'; font-weight: 500; src: url('/static/fonts/Manrope-Medium.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Manrope'; font-weight: 600; src: url('/static/fonts/Manrope-SemiBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Manrope'; font-weight: 700; src: url('/static/fonts/Manrope-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Manrope'; font-weight: 800; src: url('/static/fonts/Manrope-ExtraBold.ttf') format('truetype'); font-display: swap; }

:root {
  --ground: #F6F8FA;
  --surface: #FFFFFF;
  --ink: #121821;
  --muted: #5A6675;
  --line: #E3E8EE;
  --line-soft: #EEF1F4;
  --accent: #1870AE;
  --accent-ink: #12588A;
  --accent-soft: #E8F1F8;
  --green: #1E8A52;
  --green-ink: #1B6B43;
  --green-soft: #E8F5EE;
  --amber: #D08A2E;
  --amber-ink: #8A4B0B;
  --amber-soft: #FDF3E7;
  --red: #C8323E;
  --red-ink: #A62A35;
  --red-soft: #FBEDEE;
  --grey-soft: #F1F4F7;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--muted); }

.app { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: none; background: var(--surface); border-right: 1px solid var(--line);
  padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side-toggle { display: none; }
.side-menu { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.brand-name { font-size: 15px; font-weight: 800; line-height: 1.2; }
.brand-sub { font-size: 12px; font-weight: 700; color: var(--muted); }
.venue {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  border: 1px solid var(--line); background: var(--ground); border-radius: 12px; padding: 10px 12px;
  font-size: 14px; font-weight: 800; text-align: left;
}
.venue[disabled] { cursor: default; }
.venue span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 700; }
.nav a:hover { background: var(--grey-soft); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.manager { display: flex; align-items: center; gap: 10px; }
.manager-name { font-size: 14px; font-weight: 800; }
.manager-role { font-size: 12px; font-weight: 700; color: var(--muted); }
.demo-flag { align-self: flex-start; font-size: 12px; font-weight: 800; color: var(--amber-ink); background: var(--amber-soft); border-radius: 999px; padding: 3px 10px; }

.main { flex: 1; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 20px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.count-pill { font-size: 14px; font-weight: 800; color: var(--muted); background: var(--grey-soft); border-radius: 999px; padding: 2px 10px; }
.sub { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.page-head > * { min-width: 0; max-width: 100%; }
.page-head h1, .title { overflow-wrap: break-word; min-width: 0; }

.btn {
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; color: var(--ink);
}
a.btn:hover { color: var(--ink); }
.btn:hover { border-color: #C9D1DA; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
a.btn-primary, a.btn-primary:hover { color: #fff; }
.btn-danger { background: var(--red-soft); border-color: var(--red-soft); color: var(--red-ink); }
.btn-danger:hover { border-color: var(--red); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--accent); }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 18px; height: 18px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 14px; font-weight: 700; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.card-note { font-size: 13px; font-weight: 600; color: var(--muted); }
.card-body { padding: 16px 18px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 14px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 13px; font-weight: 800; color: var(--muted); padding: 12px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
.sort { border: none; background: transparent; padding: 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.sort:hover { color: var(--ink); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-weight: 600; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
td.cell-text { white-space: normal; min-width: 110px; max-width: 240px; overflow-wrap: break-word; }
td .person { white-space: normal; min-width: 136px; max-width: 300px; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }
tr.total td { font-weight: 800; border-top: 1.5px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); font-weight: 700; }

.person { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.person-name { font-weight: 800; overflow-wrap: break-word; }
.person-sub { font-size: 13px; color: var(--muted); font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; background: var(--grey-soft); color: var(--muted); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.green { background: var(--green-soft); color: var(--green-ink); }
.chip.amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip.red { background: var(--red-soft); color: var(--red-ink); }
.chip.blue { background: var(--accent-soft); color: var(--accent-ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.green { background: var(--green); }
.dot.red { background: var(--red); }
.dot.grey { background: #8C96A3; }
.warn { color: var(--red-ink); font-weight: 800; }
.attention { color: var(--amber-ink); font-weight: 800; }
[hidden] { display: none !important; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--grey-soft); border-radius: 12px; flex-wrap: wrap; }
.tab { min-height: 34px; padding: 0 14px; border: none; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tab.active { background: var(--surface); color: var(--ink); font-weight: 800; box-shadow: 0 1px 2px rgba(18, 24, 33, 0.08); }
.select, .input {
  height: 40px; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; font-size: 14px; font-weight: 700;
}
.select:focus, .input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.search { min-width: 240px; }
.toggle-chip { height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 700; }
.toggle-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 13px; font-weight: 800; color: var(--muted); }
.field .input { height: 46px; font-size: 15px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.option { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.option input { margin-top: 3px; accent-color: var(--accent); }
.option.on { border-color: var(--accent); background: var(--accent-soft); }
.option-title { font-weight: 800; }
.option-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.grid-2 > *, .split > * { min-width: 0; }
.error-line { color: var(--red-ink); font-size: 14px; font-weight: 800; min-height: 18px; }

.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; border: none; background: #C9D1DA; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.switch.on { background: var(--green); }
.switch.on::after { left: 21px; }
.tri { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tri button { border: none; background: var(--surface); height: 30px; padding: 0 10px; font-size: 12px; font-weight: 800; color: var(--muted); }
.tri button.on { background: var(--accent-soft); color: var(--accent-ink); }
.right-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.right-row:last-child { border-bottom: none; }
.right-row .limit { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.right-row .limit input { width: 64px; height: 32px; }
.group-title { margin: 14px 0 2px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.role-list { display: flex; flex-direction: column; gap: 6px; }
.role-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.role-item.active { border-color: var(--accent); background: var(--accent-soft); }

.split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.facts > * { max-width: 100%; overflow-wrap: break-word; }
.facts .chip { white-space: normal; height: auto; min-height: 26px; padding: 4px 10px; }
.profile { display: flex; align-items: center; gap: 18px; flex: 1 1 480px; min-width: 0; }
.profile > div { min-width: 0; }
.profile h1 { margin: 0; font-size: 26px; font-weight: 800; }

.steps-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--grey-soft); }
.steps-bar span { display: block; height: 100%; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.legend div { display: flex; flex-direction: column; gap: 2px; }
.legend b { font-size: 18px; font-weight: 800; }

.qr-box { width: 280px; height: 280px; border: 1px solid var(--line); border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; }
.qr-box img { width: 260px; height: 260px; }
.how { display: flex; flex-direction: column; gap: 10px; counter-reset: how; }
.how div { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.how div::before { counter-increment: how; content: counter(how); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }

.menu-wrap { position: relative; display: inline-block; }
.menu { position: fixed; z-index: 45; min-width: 220px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(18, 24, 33, 0.14); padding: 6px; display: flex; flex-direction: column; }
.menu button { border: none; background: transparent; text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.menu button:hover, .menu button:focus-visible { background: var(--grey-soft); outline: none; }
.menu button.danger { color: var(--red-ink); }

.overlay { position: fixed; inset: 0; background: rgba(18, 24, 33, 0.35); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 24px 60px rgba(18, 24, 33, 0.25); }
.dialog h2 { margin: 0; font-size: 20px; font-weight: 800; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.preview { border-radius: 14px; background: var(--grey-soft); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-weight: 700; }

body.locked { overflow: hidden; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 40px); }
.toast { background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 700; box-shadow: 0 12px 32px rgba(18, 24, 33, 0.25); max-width: 380px; }
.toast.error { background: var(--red-ink); }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.login-card h1 { margin: 0; font-size: 24px; font-weight: 800; }
.password { position: relative; }
.password .input { width: 100%; padding-right: 48px; }
.password button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: none; background: transparent; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); font-weight: 600; }
.venue-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--ground); }
.venue-pick b { font-weight: 800; overflow-wrap: break-word; }

.btn-amber { color: var(--amber-ink); }
.btn-red { color: var(--red-ink); }
.label { font-size: 13px; font-weight: 800; color: var(--muted); }
.title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 220px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
td.wrap { white-space: normal; min-width: 220px; }
.more-row { padding: 14px 18px; border-top: 1px solid var(--line-soft); }

.card-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; border-bottom: 1px solid var(--line); }
.card-tab { height: 44px; padding: 0 14px; border: none; border-bottom: 3px solid transparent; background: transparent; font-size: 15px; font-weight: 700; color: var(--muted); }
.card-tab.active { border-bottom-color: var(--accent); color: var(--accent-ink); font-weight: 800; }

.head-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; }
.big-sum { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sum-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.kv { display: flex; justify-content: space-between; gap: 12px; }
.kv > span:first-child { color: var(--muted); }
.kv > b { font-weight: 800; text-align: right; }
.total-line { border-top: 1px solid var(--line); padding-top: 12px; display: flex; justify-content: space-between; font-size: 17px; font-weight: 800; }
.steps-bar { gap: 3px; height: 14px; background: transparent; }
.steps-bar span { min-width: 14px; border-radius: 3px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.legend span { display: flex; align-items: center; font-size: 14px; font-weight: 700; color: var(--muted); }
.what { display: flex; flex-direction: column; gap: 3px; white-space: normal; min-width: 150px; }
.what .chip { white-space: normal; height: auto; min-height: 26px; padding: 3px 10px; }

.avatar.square { border-radius: 10px; background: var(--grey-soft); color: var(--muted); }
.avatar.square svg { width: 18px; height: 18px; }

.check-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 700; cursor: pointer; max-width: 100%; }
.check-chip input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.check-chip.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 800; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.checklist li.off { color: var(--muted); }
.checklist svg { width: 20px; height: 20px; flex: none; }
.checklist li:not(.off) svg { color: var(--green); }

.card-title { margin: 0; font-size: 17px; font-weight: 800; }
.big { font-size: 22px; font-weight: 800; }
.role-text { display: flex; flex-direction: column; gap: 2px; }
.qr-box.off { flex-direction: column; gap: 8px; color: var(--muted); font-weight: 800; background: var(--grey-soft); text-align: center; padding: 20px; }
.tri button[disabled] { opacity: 0.45; cursor: default; }
.switch[disabled] { opacity: 0.45; cursor: default; }
.right-row .limit input { padding: 0 8px; }

.period-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.period-bar .row { gap: 12px; }
.kpi-sub { font-size: 12px; font-weight: 700; color: var(--muted); }
.chart-card { padding: 16px 18px 12px; display: flex; flex-direction: column; gap: 10px; }
.chart-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; min-height: 32px; }
.bars { display: grid; gap: 6px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; padding: 4px 0 2px; border: none; border-radius: 8px; background: transparent; cursor: pointer; }
.bar:hover { background: var(--grey-soft); }
.bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar-plot { height: 172px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar-value { min-height: 16px; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-fill { width: 70%; max-width: 46px; border-radius: 6px 6px 2px 2px; background: #BCD5EA; }
.bar-fill.zero { background: var(--line); }
.bar.now .bar-fill { background: var(--accent); }
.bar.now .bar-value, .bar.now .bar-label { color: var(--accent-ink); }
.bar.on .bar-fill { background: var(--accent-ink); }
.bar.on .bar-value, .bar.on .bar-label { color: var(--accent-ink); font-weight: 800; }
.bar.dim .bar-fill { opacity: 0.45; }
.bar-label { min-height: 16px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; }
.bar-axis { position: relative; height: 18px; }
.bar-axis span { position: absolute; top: 0; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.bar-axis span.first { transform: none; }
.bar-axis span.last { transform: translateX(-100%); }
.checks-tools { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: space-between; padding: 14px 16px; }
.checks-tools .search { flex: 1 1 240px; max-width: 360px; }
.checks-tools .toggle-chip { height: 36px; border-radius: 999px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip-count { font-variant-numeric: tabular-nums; opacity: 0.75; }
.checks-split { display: flex; align-items: flex-start; border-top: 1px solid var(--line-soft); }
.checks-main { flex: 1 1 auto; min-width: 0; }
.check-panel { flex: 0 0 360px; box-sizing: border-box; padding: 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.check-list, .check-total { display: none; }
.check-row { width: 100%; min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border: none; border-bottom: 1px solid var(--line-soft); background: var(--surface); text-align: left; cursor: pointer; }
.check-row.picked { background: var(--accent-soft); }
.check-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.check-row-main b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row-main .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.check-row-side b { font-weight: 800; font-variant-numeric: tabular-nums; }
.check-total { position: sticky; bottom: 12px; z-index: 2; margin: 12px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: #FFFFFF; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 10px 30px rgba(18, 24, 33, 0.25); }
.check-total b { font-weight: 800; }
.check-total-label { font-size: 12px; font-weight: 700; color: #C9D2DC; }
.check-total-sum { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack-xs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-dialog { display: flex; flex-direction: column; gap: 14px; }
tr[data-pick] { cursor: pointer; }
tr[data-pick]:hover td { background: var(--grey-soft); }
tr.picked td, tr.picked:hover td { background: var(--accent-soft); }
.link-btn { border: none; background: none; padding: 0; color: var(--accent); font-weight: 800; cursor: pointer; }
.link-btn:hover { color: var(--accent-ink); }
tfoot tr.total td { background: var(--ground); border-bottom: none; }
.check-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.check-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.check-block { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.check-item { display: flex; justify-content: space-between; gap: 12px; }
.check-item b { font-weight: 800; white-space: nowrap; }
.check-steps { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.check-steps li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding-left: 18px; font-size: 14px; }
.check-steps li::before { content: ''; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.check-steps li.blue::before { background: var(--accent); }
.check-steps li.green::before { background: var(--green); }
.check-steps li.amber::before { background: var(--amber); }
.check-steps li.red::before { background: var(--red); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .field.wide { grid-column: 1 / -1; }
.form-grid .select { height: 46px; }
.day-nav { display: inline-flex; align-items: center; gap: 6px; }
.day-nav .input { height: 40px; width: 160px; }
.day-nav .icon-btn { font-size: 20px; font-weight: 800; }
.tl-wrap { overflow-x: auto; padding: 4px 16px 16px; }
.tl { min-width: 760px; display: flex; flex-direction: column; }
.tl-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--line-soft); }
.tl-row:last-child { border-bottom: none; }
.tl-name { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 10px 8px 0; font-size: 14px; }
.tl-name .muted { font-size: 12px; }
.tl-hours { display: grid; grid-template-columns: repeat(var(--hours), minmax(0, 1fr)); font-size: 12px; font-weight: 800; color: var(--muted); padding: 6px 0; }
.tl-hours span { border-left: 1px solid var(--line-soft); padding-left: 4px; }
.tl-track { position: relative; min-height: 52px; cursor: copy; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--hours) - 1px), var(--line-soft) calc(100% / var(--hours) - 1px), var(--line-soft) calc(100% / var(--hours))); }
.tl-ghost { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; background: var(--ground); color: var(--ink); font-size: 12px; font-weight: 800; pointer-events: none; }
.tl-block { position: absolute; z-index: 1; top: 7px; bottom: 7px; min-width: 6px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--grey-soft); color: var(--ink); font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tl-block.blue { background: var(--accent-soft); border-color: #B9D3E8; color: var(--accent-ink); }
.tl-block.green { background: var(--green-soft); border-color: #BFE1CD; color: var(--green-ink); }
.tl-block.amber { background: var(--amber-soft); border-color: #F1D7B1; color: var(--amber-ink); }
.tl-block:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tl-now { position: absolute; z-index: 2; top: 0; bottom: 0; width: 2px; background: var(--red); pointer-events: none; }
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.table-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; min-width: 0; }
.table-card:hover { border-color: #C9D2DC; box-shadow: 0 4px 14px rgba(18, 24, 33, 0.06); }
.table-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-card.busy { border-color: #B9D3E8; }
.table-card.reserved { border-color: #F1D7B1; }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-name { font-size: 18px; font-weight: 800; }
.tc-meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.tc-waiter { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; min-height: 28px; }
.tc-waiter .avatar { width: 26px; height: 26px; font-size: 12px; }
.tc-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.tc-line b { font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.booking-list { display: flex; flex-direction: column; gap: 6px; }
.booking-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; }
.booking-row:hover { background: var(--ground); }
.booking-guest { flex: 1 1 140px; font-weight: 700; }

@media (max-width: 1700px) {
  .checks-split.has-panel .opt { display: none; }
}

@media (max-width: 1280px) {
  .checks-split { flex-direction: column; align-items: stretch; }
  .check-panel { flex: none; width: 100%; border-left: none; border-top: 1px solid var(--line); }
}

@media (max-width: 1400px) and (min-width: 901px) {
  .side { width: 216px; padding: 20px 12px; }
  .main { padding: 24px 24px 48px; }
}

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .side { width: 100%; height: auto; max-height: 100vh; z-index: 20; padding: 10px 16px; gap: 0; border-right: none; border-bottom: 1px solid var(--line); }
  .side-toggle { display: inline-flex; width: 44px; height: 44px; }
  .side-toggle svg { width: 22px; height: 22px; }
  .side-menu { display: none; padding: 12px 0 6px; gap: 14px; }
  .side.open .side-menu { display: flex; }
  .side-foot { margin-top: 0; padding: 12px 8px 0; border-top: 1px solid var(--line-soft); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .main { padding: 20px 16px 40px; }
  .page-head h1, .title { font-size: 23px; }
  .search { min-width: 0; flex: 1 1 200px; }
  .grid-2, .split { grid-template-columns: minmax(0, 1fr); }
  .avatar.big { width: 48px; height: 48px; font-size: 20px; }
  .head-card { padding: 18px; }
  .sum-side { align-items: flex-start; }
  .bar-plot { height: 132px; }
  .bar-value { display: none; }
  .bars { gap: 3px; }
  .checks-tools .search { max-width: none; }
  .checks-main .table-wrap { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .day-nav .input { width: 140px; }
  .check-list { display: flex; flex-direction: column; }
  .check-total:not([hidden]) { display: flex; }
}

@media print {
  .side, .head-actions, .no-print, .crumbs, #toasts { display: none !important; }
  .card { border: none; }
  .main { padding: 0; }
  body { background: #fff; }
}
