/* Städisen design system
   Type scale: 12 / 13 / 14 / 16 / 20 / 28 px. Weights: 400 / 500 / 600.
   Spacing: multiples of 4 (4 8 12 16 20 24 32 40 56). */

@import url('/assets/fonts.css');

:root {
  --ink: #16191D;
  --ink-2: #4A5058;
  --muted: #5E646C;
  --faint: #8A9097;
  --line: #E3E1DA;
  --line-2: #EEEDE8;
  --line-3: #F1F0EC;
  --bg: #F4F3EF;
  --panel: #FFFFFF;
  --soft: #FAFAF8;
  --hover: #F7F6F3;
  --nav: #13213B;
  --nav-2: #1B2C4D;
  --nav-3: #22355C;
  --nav-line: #26365A;
  --nav-ink: #C3CCDD;
  --nav-muted: #8E9AB3;
  --brand: #E8833A;
  --blue: #1F4FC4;
  --blue-2: #1A43A8;
  --blue-bg: #F5F8FE;
  --green: #135A34;   --green-bg: #E2F2E8; --green-mark: #2E8B57;
  --amber: #704300;   --amber-bg: #FCF0D6; --amber-mark: #E0A030;
  --orange: #8A3410;  --orange-bg: #FCE6D8;
  --info: #1B3F9A;    --info-bg: #E6EDFB;
  --grey: #4A5058;    --grey-bg: #ECEBE6;
  --radius: 10px;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 14px/20px var(--font); font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Text roles */
.t-title { font-size: 20px; line-height: 28px; font-weight: 600; }
.t-section { font-size: 14px; line-height: 20px; font-weight: 600; }
.t-strong { font-weight: 500; }
.t-meta { font-size: 13px; line-height: 18px; color: var(--muted); }
.t-small { font-size: 12px; line-height: 16px; color: var(--muted); }
.t-mono { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.t-num { font-size: 20px; line-height: 28px; font-weight: 600; }
.t-right { text-align: right; }
.t-warn { color: var(--orange); }
.t-ok { color: var(--green); }

/* App shell */
.app { display: flex; min-height: 100vh; }
.nav { width: 232px; flex-shrink: 0; background: var(--nav); color: var(--nav-ink); padding: 20px 12px 16px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; height: 28px; padding: 0 10px; margin-bottom: 20px; color: #fff; font-size: 16px; font-weight: 600; }
.org { margin: 0 4px 16px; padding: 10px 12px; border: 1px solid var(--nav-line); border-radius: 8px; }
.org b { display: block; color: #fff; font-size: 13px; line-height: 18px; font-weight: 500; }
.org span { font-size: 12px; line-height: 16px; color: var(--nav-muted); }
.navlink { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; color: var(--nav-ink); font-size: 14px; }
.navlink:hover { background: var(--nav-2); color: #fff; }
.navlink.on { background: var(--nav-3); color: #fff; font-weight: 500; }
.navlink .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #1A0E04; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.navsec { padding: 16px 10px 6px; font-size: 12px; line-height: 16px; color: var(--nav-muted); }
.navfoot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--nav-line); display: flex; flex-direction: column; gap: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.me b { display: block; color: #fff; font-size: 13px; line-height: 18px; font-weight: 500; }
.me span { font-size: 12px; line-height: 16px; color: var(--nav-muted); }
.me button { margin-left: auto; background: none; border: 0; color: var(--nav-muted); font-size: 12px; cursor: pointer; padding: 4px; }
.me button:hover { color: #fff; }
.demo { margin: 0 4px; padding: 10px; border-radius: 8px; background: var(--nav-2); display: flex; flex-direction: column; gap: 8px; }
.demo label { font-size: 12px; line-height: 16px; color: var(--nav-muted); }
.demo select { height: 32px; border-radius: 6px; border: 1px solid var(--nav-line); background: var(--nav); color: #fff; padding: 0 8px; font-size: 13px; }
.demo button { height: 32px; border-radius: 6px; border: 1px solid var(--nav-line); background: transparent; color: var(--nav-ink); font-size: 13px; cursor: pointer; }
.demo button:hover { color: #fff; background: var(--nav-3); }

.content { flex: 1; min-width: 0; padding: 32px 40px 56px; }
.wrap { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.wrap.narrow { max-width: 880px; }

/* Mobile shell */
.topbar { display: none; }
@media (max-width: 820px) {
  .app { flex-direction: column; }
  .nav { display: none; }
  .nav.open { display: flex; position: fixed; inset: 56px 0 0 0; width: auto; height: auto; z-index: 20; }
  .topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 21; }
  .topbar button { background: none; border: 0; color: #fff; height: 40px; width: 40px; display: grid; place-items: center; cursor: pointer; }
  .content { padding: 20px 16px 40px; }
}

/* Page header */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head .t-meta { margin-top: 4px; }
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--muted); margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; background: none; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-2); color: #fff; }
.btn.quiet { background: var(--panel); border-color: #DAD8D0; color: var(--ink); }
.btn.quiet:hover { background: var(--hover); color: var(--ink); }
.btn.link { padding: 0; height: auto; color: var(--blue); font-weight: 500; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 20px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 20px; border-bottom: 1px solid var(--line-2); }
.ph a, .ph .btn.link { font-size: 13px; }
.pb { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.pfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--soft); border-top: 1px solid var(--line-2); font-size: 13px; line-height: 18px; color: var(--muted); }
.pfoot b { color: var(--ink); font-weight: 500; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (max-width: 1100px) { .grid-main, .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Status chip */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.live { background: var(--green-bg); color: var(--green); }
.chip.staff { background: var(--amber-bg); color: var(--amber); }
.chip.ok { background: var(--info-bg); color: var(--info); }
.chip.act { background: var(--orange-bg); color: var(--orange); }
.chip.done { background: var(--grey-bg); color: var(--grey); }
.chip.paid { background: var(--green-bg); color: var(--green); }

/* Tables built from grid rows */
.table { overflow-x: auto; }
.tr { display: grid; gap: 16px; align-items: center; padding: 0 20px; min-height: 56px; border-bottom: 1px solid var(--line-3); color: inherit; }
.tr:last-child { border-bottom: 0; }
a.tr:hover, button.tr:hover { background: var(--soft); color: inherit; }
button.tr { width: 100%; border: 0; border-bottom: 1px solid var(--line-3); background: none; text-align: left; cursor: pointer; font: inherit; }
.th { min-height: 36px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line-2); }
.tgroup { padding: 12px 20px 6px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.cell-main b { display: block; font-weight: 500; }
.cell-main span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.cell-main .id06 { display: flex; font-size: 13px; line-height: 18px; color: var(--green); }
.cell-main .id06.t-warn { color: var(--orange); }
.chev { color: #9AA0A6; }
.cols-orders { grid-template-columns: minmax(180px, 2.1fr) minmax(110px, 1fr) minmax(140px, 1.4fr) minmax(120px, 1fr) minmax(90px, .9fr) 16px; min-width: 760px; }

/* Progress */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; height: 4px; width: 96px; }
.seg span { border-radius: 2px; background: var(--line); }
.seg .g { background: var(--green-mark); }
.seg .a { background: var(--amber-mark); }
.seg.big { height: 6px; width: 100%; gap: 4px; }
.prog { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 18px; }

/* People */
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--info-bg); color: var(--info); flex-shrink: 0; }
.av.alt { background: #E9E4F7; color: #46308A; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.avs { display: flex; align-items: center; }
.avs .av { border: 2px solid #fff; margin-left: -6px; }
.avs .av:first-child { margin-left: 0; }
.person { display: grid; grid-template-columns: 32px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-3); }
.person:last-child { border-bottom: 0; }
.id06 { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--green); }
.state { text-align: right; font-size: 13px; line-height: 18px; }
.state b { display: block; font-weight: 500; }
.state span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.state.warn b { color: var(--orange); }

/* Key-value list */
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-3); }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; text-align: right; }
.kv .total { border-top: 1px solid var(--ink); border-bottom: 0; margin-top: 4px; }
.kv .total span, .kv .total b { color: var(--ink); font-weight: 600; }
.note { padding: 10px 12px; border-radius: 6px; background: var(--hover); font-size: 13px; line-height: 18px; color: var(--ink-2); }
.field-l { font-size: 12px; line-height: 16px; color: var(--muted); margin-bottom: 2px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { padding: 14px 20px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; }
.step:last-child { border-right: 0; }
.step span { font-size: 12px; line-height: 16px; color: var(--muted); }
.step b { font-size: 20px; line-height: 28px; font-weight: 600; }
.step b small { font-size: 13px; font-weight: 400; color: var(--muted); }
.step.is-done b { color: var(--green); }
.step.is-current { box-shadow: inset 0 -3px 0 var(--blue); }
@media (max-width: 700px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .step:nth-child(2) { border-right: 0; } .step:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); } }

/* Timeline */
.tl { display: grid; grid-template-columns: 200px minmax(280px, 1fr) 132px; gap: 16px; align-items: center; padding: 0 20px; min-width: 680px; }
.tl.h { min-height: 36px; background: var(--soft); border-bottom: 1px solid var(--line-2); font-size: 12px; line-height: 16px; color: var(--muted); }
.tl.r { min-height: 64px; border-bottom: 1px solid var(--line-3); }
.tl.r:last-child { border-bottom: 0; }
.hours { position: relative; height: 16px; }
.hours span { position: absolute; transform: translateX(-50%); }
.track { position: relative; height: 22px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--line-3) 0, var(--line-3) 1px, transparent 1px, transparent 10%); }
.track .seg-plan, .track .seg-in, .track .seg-late { position: absolute; top: 5px; bottom: 5px; border-radius: 3px; }
.track .seg-plan { background: #DCE5F8; }
.track .seg-in { background: var(--green-mark); }
.track .seg-late { background: #F2C27A; }
.track .seg-now { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #C2410C; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 20px; font-size: 12px; line-height: 16px; color: var(--muted); background: var(--soft); border-top: 1px solid var(--line-2); }
.legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* Events */
.ev { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-3); font-size: 13px; line-height: 18px; }
.ev:last-child { border-bottom: 0; }
.ev time { color: var(--muted); }
.ev b { font-weight: 500; }
.ev p { color: var(--muted); margin-top: 2px; }

/* Lists of attention items */
.item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 16px 20px; border-bottom: 1px solid var(--line-3); }
.item:last-child { border-bottom: 0; }
.item h3 { font-size: 14px; line-height: 20px; font-weight: 500; }
.item p { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.ico { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; }
.ico.o { background: var(--orange-bg); color: var(--orange); }
.ico.a { background: var(--amber-bg); color: var(--amber); }
.ico.b { background: var(--info-bg); color: var(--info); }
.ico.g { background: var(--green-bg); color: var(--green); }
.auto { display: flex; gap: 10px; align-items: flex-start; padding: 12px 20px; background: var(--soft); border-top: 1px solid var(--line-2); font-size: 13px; line-height: 18px; color: var(--muted); }
.auto b { color: var(--ink); font-weight: 500; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpi { padding: 16px 20px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.kpi:last-child { border-right: 0; }
.kpi span { font-size: 12px; line-height: 16px; color: var(--muted); }
.kpi small { font-size: 12px; line-height: 16px; color: var(--muted); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(2) { border-right: 0; } .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); } }

/* Board */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col { border-right: 1px solid var(--line-2); min-width: 0; }
.col:last-child { border-right: 0; }
.colh { display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 0 16px; background: var(--soft); border-bottom: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.colh span { font-weight: 400; color: var(--muted); }
.card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-3); color: inherit; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; font: inherit; }
.card:hover { background: var(--soft); }
.card .r1, .card .r3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .r1 b { font-weight: 500; }
.card .r2 { font-size: 13px; line-height: 18px; color: var(--muted); }
.card .r3 { font-size: 13px; line-height: 18px; }
.colempty { padding: 16px; font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .board { grid-template-columns: minmax(0, 1fr); } .col { border-right: 0; border-bottom: 1px solid var(--line-2); } }

/* Tabs */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { height: 40px; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; padding: 0; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--blue); }
.tab small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* Forms */
.form { display: flex; flex-direction: column; }
.fsec { padding: 20px 24px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; }
.fsec:last-child { border-bottom: 0; }
.flabel { font-size: 14px; line-height: 20px; font-weight: 600; }
.flabel small { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.opts { display: grid; gap: 10px; }
.opts.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .opts.c2, .opts.c3, .opts.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 10px 14px; border: 1px solid #DAD8D0; border-radius: 8px; background: var(--panel); text-align: left; cursor: pointer; }
.opt:hover { border-color: #B9B6AC; }
.opt b { font-weight: 500; }
.opt span { font-size: 12px; line-height: 16px; color: var(--muted); }
.opt.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); background: var(--blue-bg); }
.stepper { display: inline-flex; align-items: center; border: 1px solid #DAD8D0; border-radius: 8px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: var(--panel); font-size: 20px; cursor: pointer; }
.stepper button:hover { background: var(--hover); }
.stepper output { min-width: 64px; text-align: center; font-size: 16px; font-weight: 600; line-height: 44px; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.input, textarea.input, select.input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid #DAD8D0; border-radius: 8px; background: var(--panel); }
textarea.input { min-height: 72px; resize: vertical; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.check { display: grid; grid-template-columns: 20px 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-3); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check:hover { background: var(--soft); }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.check.off { cursor: not-allowed; opacity: .6; }
.check.off:hover { background: none; }
.sticky { position: sticky; top: 24px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; }
.sum-total b { font-size: 28px; line-height: 36px; font-weight: 600; }
.err { font-size: 13px; line-height: 18px; color: var(--orange); }
.success { display: flex; gap: 12px; align-items: flex-start; padding: 20px; }
.success h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.success p { color: var(--muted); margin-top: 4px; }

/* Empty and loading */
.empty { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 13px; line-height: 18px; }
.empty b { display: block; color: var(--ink); font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }

/* Worker (mobile first) */
.wk { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); font-size: 15px; line-height: 22px; }
.wk-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--nav); color: #fff; }
.wk-bar b { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.wk-bar span { font-size: 13px; line-height: 18px; color: var(--nav-ink); text-align: right; }
.wk-body { width: 100%; max-width: 520px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wk-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wk-time { font-size: 28px; line-height: 36px; font-weight: 600; }
.wk-proj { font-size: 16px; line-height: 24px; font-weight: 500; }
.wk-addr { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }
.wk-big { width: 100%; height: 56px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.wk-big:hover { background: var(--blue-2); }
.wk-big:disabled { opacity: .45; cursor: not-allowed; }
.wk-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wk-sec { height: 48px; border: 1px solid #DAD8D0; border-radius: 10px; background: var(--panel); font-size: 15px; font-weight: 500; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.wk-sec:hover { background: var(--hover); color: var(--ink); }
.wk-state { display: flex; align-items: center; gap: 10px; }
.wk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-mark); }
.wk-prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.wk-prog span { display: block; height: 100%; background: var(--green-mark); }
.wk-mate { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }

/* Toast (used only for errors) */
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; padding: 12px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; line-height: 18px; z-index: 50; }

/* Public website */
.site { background: var(--panel); }
.site-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.site-nav { border-bottom: 1px solid var(--line-2); background: var(--panel); position: sticky; top: 0; z-index: 10; }
.site-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 600; }
.site-logo:hover { color: var(--ink); }
.site-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.site-links a:not(.btn) { color: var(--ink-2); }
.site-links a:not(.btn):hover { color: var(--ink); }
.site-hero { padding: 96px 0 88px; background: var(--bg); border-bottom: 1px solid var(--line-2); }
.site-hero h1 { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; max-width: 720px; }
.site-hero p { margin-top: 20px; max-width: 600px; font-size: 16px; line-height: 24px; color: var(--ink-2); }
.site-hero .actions { margin-top: 32px; gap: 12px; }
.site-sec { padding: 80px 0; }
.site-sec.alt { background: var(--bg); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.site-sec h2 { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; }
.site-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.site-steps b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--nav); color: #fff; font-size: 14px; font-weight: 600; }
.site-steps h3 { margin-top: 16px; font-size: 16px; line-height: 24px; font-weight: 600; }
.site-steps p, .site-two p, .site-price p { margin-top: 8px; color: var(--ink-2); font-size: 14px; line-height: 22px; }
.site-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }
.site-two h2 { font-size: 20px; line-height: 28px; }
.site-two ul { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-two li { position: relative; padding-left: 24px; font-size: 14px; line-height: 20px; }
.site-two li::before { content: ''; position: absolute; left: 0; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--green-mark); border-bottom: 2px solid var(--green-mark); transform: rotate(-45deg); }
.site-price { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 48px; align-items: center; }
.site-price-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.site-price-box span, .site-price-box small { font-size: 13px; color: var(--muted); }
.site-price-box b { font-size: 28px; line-height: 36px; font-weight: 600; }
.site-foot { border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.site-foot b { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) {
  .site-links a:not(.btn) { display: none; }
  .site-hero { padding: 56px 0; }
  .site-hero h1 { font-size: 28px; line-height: 36px; }
  .site-steps, .site-two, .site-price { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .site-sec { padding: 56px 0; }
}

/* Invoice document (A4, printable) */
.cols-inv { grid-template-columns: 110px minmax(180px, 2fr) 100px 100px 120px 110px; min-width: 760px; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 56px 40px; display: flex; flex-direction: column; gap: 28px; font-size: 13px; line-height: 18px; max-width: 840px; }
.doc p { margin: 0; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.doc-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.doc-title { text-align: right; }
.doc-title h1 { font-size: 20px; line-height: 28px; font-weight: 600; }
.doc-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.doc-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.doc-facts div { padding: 10px 0; display: flex; flex-direction: column; gap: 2px; }
.doc-facts span { font-size: 12px; line-height: 16px; color: var(--muted); }
.doc-facts b { font-weight: 500; }
.doc-lines { width: 100%; border-collapse: collapse; }
.doc-lines th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 8px 8px 0; border-bottom: 1px solid var(--line); }
.doc-lines th.t-right { text-align: right; }
.doc-lines td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line-3); vertical-align: top; }
.doc-lines td small { display: block; font-size: 12px; color: var(--muted); }
.doc-total { margin-left: auto; width: 300px; display: flex; flex-direction: column; }
.doc-total div { display: flex; justify-content: space-between; min-height: 28px; align-items: center; }
.doc-total span { color: var(--ink-2); }
.doc-total b { font-weight: 500; }
.doc-total .pay { border-top: 1px solid var(--ink); margin-top: 6px; min-height: 40px; }
.doc-total .pay span, .doc-total .pay b { font-size: 16px; font-weight: 600; color: var(--ink); }
.doc-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; line-height: 16px; color: var(--ink-2); }
.doc-foot b { display: block; color: var(--ink); font-weight: 500; }
@media (max-width: 700px) { .doc { padding: 24px; } .doc-parties, .doc-facts, .doc-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc-total { width: 100%; } }

/* Requirement checklist */
.req { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 20px; border-bottom: 1px solid var(--line-3); }
.req:last-child { border-bottom: 0; }
.req .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.req .mark.ok { background: var(--green-bg); color: var(--green); }
.req .mark.warn { background: var(--amber-bg); color: var(--amber); }
.req .mark.bad { background: var(--orange-bg); color: var(--orange); }
.req b { display: block; font-weight: 500; }
.req span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.req-form { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.req-form .input { width: auto; min-height: 36px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--green-mark); }
.meter span.warn { background: var(--amber-mark); }
.meter span.bad { background: #C2410C; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--orange-bg); color: var(--orange); font-size: 13px; line-height: 18px; }
.banner b { color: var(--orange); font-weight: 600; }

@media print {
  body { background: #fff; }
  .nav, .topbar, .no-print { display: none !important; }
  .content { padding: 0; }
  .doc { border: 0; padding: 0; max-width: none; }
}

/* Phone: order rows become two-column cards, team rows drop the ID06 column */
@media (max-width: 700px) {
  .tr.cols-orders { grid-template-columns: minmax(0, 1fr) auto; min-width: 0; row-gap: 6px; padding-top: 12px; padding-bottom: 12px; }
  .tr.cols-orders.th { display: none; }
  .tr.cols-orders > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .tr.cols-orders > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .tr.cols-orders > :nth-child(3) { grid-column: 1; grid-row: 3; }
  .tr.cols-orders > :nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  .tr.cols-orders > :nth-child(5) { grid-column: 2; grid-row: 2; }
  .tr.cols-orders > :nth-child(6) { display: none; }
  .tr.cols-orders .cell-main b[style] { font-size: 13px; color: var(--ink-2); }
  .person { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .person > .id06 { display: none; }
  .tgroup { padding-top: 16px; }
}
