/* Тёмный кабинет: боковое меню + рабочая область (Вариант 2, выбран владельцем) */
:root {
  color-scheme: dark;
  --bg: #0B0C0F; --panel: #111318; --card: #16191F; --line: #1F222A; --hover: #1B1E25; --field: #0F1115;
  --fg: #ECEDEF; --muted: #A3A8B3; --dim: #7A808C;
  --accent: #3DDC97; --accent-ink: #062A1B; --neg: #FF8A80; --neg-bg: #3A1A1A; --warn: #F2B544; --warn-bg: #3A2C10; --ok-bg: #12301F;
  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font); padding-top: env(safe-area-inset-top, 0px); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boot { color: var(--muted); padding: 40px; }
.app { display: flex; min-height: 100%; background: linear-gradient(to right, var(--panel) 236px, var(--bg) 236px); }
aside { width: 236px; flex: 0 0 236px; background: var(--panel); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.brand b { font-size: 17px; font-weight: 800; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none; }
nav a:hover { background: var(--hover); color: var(--fg); }
nav a[aria-current="page"] { background: var(--hover); color: #fff; }
nav a[aria-current="page"] svg { color: var(--accent); }
nav .count { margin-left: auto; font-size: 12px; background: #2A2E37; padding: 1px 8px; border-radius: 999px; color: var(--fg); }
nav .count.bad { background: var(--neg-bg); color: var(--neg); }
.me { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); padding: 0 8px; }
.me b { color: var(--fg); }
.me .row { gap: 8px; }
main { flex: 1 1 0; min-width: 0; padding: 26px 30px 56px; display: flex; flex-direction: column; gap: 18px; max-width: 1440px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.head small { color: var(--muted); font-weight: 600; font-size: 13px; }
h1 { margin: 2px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.grow { flex: 999 1 560px; min-width: 0; } .side { flex: 1 1 320px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.card-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.card-h span { font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--dim); }
.kpi.hero { background: linear-gradient(160deg, #123B2C, var(--card) 70%); border-color: #1F3A30; }
.up { color: var(--accent) !important; } .down { color: var(--neg) !important; } .muted { color: var(--muted); } .dim { color: var(--dim); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line); padding: 4px; border-radius: 12px; }
.seg button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; font-size: 13px; }
.seg button[aria-pressed="true"] { background: #2A2E37; color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line); background: #20242C; color: var(--fg); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #262B34; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--neg); }
.btn:disabled { opacity: .5; cursor: default; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
input, select, textarea { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); padding: 0 12px; color: var(--fg); width: 100%; }
textarea { padding: 10px 12px; min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #3A4150; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: right; font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { text-align: right; padding: 11px 10px; border-bottom: 1px solid var(--line); }
th.l, td.l { text-align: left; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover td { background: var(--hover); }
tbody tr.sel td { background: #13261E; }
tfoot td { font-weight: 800; border-bottom: 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: #23262E; color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--accent); } .pill.bad { background: var(--neg-bg); color: var(--neg); } .pill.mid { background: var(--warn-bg); color: var(--warn); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 16px; }
.bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; }
.bar i { display: block; width: 100%; max-width: 46px; border-radius: 6px 6px 2px 2px; background: #2C3340; }
.bar[aria-pressed="true"] i { background: var(--accent); }
.bar b { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.bar[aria-pressed="true"] b { color: var(--fg); }
.bar span { font-size: 11px; color: var(--dim); white-space: nowrap; }
.lines { display: flex; flex-direction: column; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.line u { grid-column: 1 / -1; text-decoration: none; display: block; height: 4px; background: #23262E; border-radius: 3px; overflow: hidden; }
.line u i { display: block; height: 100%; background: #6B7280; }
.line.total { font-weight: 800; border-bottom: 0; }
.line b { font-variant-numeric: tabular-nums; }
.note { font-size: 13px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: #F7D58C; }
.note.info { background: #172033; color: #B9C8E8; }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.pc { display: flex; flex-direction: column; gap: 10px; }
.pc .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc h3 { margin: 0; font-size: 17px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.kv b { white-space: nowrap; }
.kv b { color: var(--fg); font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.check i { flex: 0 0 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; }
.check i.ok { background: var(--ok-bg); color: var(--accent); } .check i.bad { background: var(--neg-bg); color: var(--neg); }
.mono { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.week { display: grid; grid-template-columns: 120px repeat(7, minmax(92px, 1fr)); gap: 6px; min-width: 820px; }
.week .h { font-size: 12px; font-weight: 800; text-align: center; padding: 6px 0; border-radius: 8px; color: var(--muted); }
.week .h.today { background: #2A2E37; color: #fff; }
.week .p { font-weight: 800; font-size: 14px; display: flex; align-items: center; }
.cell { min-height: 56px; border-radius: 11px; border: 1px solid var(--line); background: var(--field); padding: 6px 9px; display: flex; flex-direction: column; justify-content: center; gap: 2px; text-align: left; cursor: pointer; }
.cell b { font-size: 14px; } .cell span { font-size: 11px; color: var(--dim); font-weight: 600; }
.cell.empty-s { border-color: #5A2A26; background: #1E1214; } .cell.empty-s b { color: var(--neg); }
.cell.sel { border: 2px solid var(--accent); }
.cell select { min-height: 32px; padding: 0 6px; font-size: 13px; }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.col { background: #101217; border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px; }
.task { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.task b { font-size: 14px; line-height: 1.35; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
dialog { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .6); }
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #262B34; color: var(--fg); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; max-width: calc(100vw - 32px); }
#toast.err { background: var(--neg-bg); color: var(--neg); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.secret { font-family: var(--mono); font-size: 16px; background: var(--field); border: 1px dashed var(--accent); padding: 10px 12px; border-radius: 10px; user-select: all; color: var(--accent); }
/* телефон продавца */
.seller { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.shiftcard { background: #15171C; border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 860px) {
  .app { flex-direction: column; background: var(--bg); }
  aside { position: sticky; top: 0; z-index: 20; width: auto; flex: none; height: auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); gap: 8px; flex-direction: row; align-items: center; overflow: visible; }
  .brand b { display: none; }
  nav { flex-direction: row; overflow-x: auto; gap: 2px; flex: 1 1 auto; scrollbar-width: none; }
  nav a { flex: 0 0 auto; min-height: 38px; padding: 0 10px; } nav a svg { display: none; }
  .me { display: none; }
  main { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
  h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: no-preference) { .bar i { transition: height .25s ease; } }
