/* Brand tokens taken from wearfors.com (2026-11-27): navy/amber/stone, Inter, square corners. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --navy: #0D0D50; --ink: #22223F; --muted: #606078; --amber: #FFBD35; --amber-h: #FFAE00;
  --stone: #F2F1EE; --stone-2: #F4F3F0; --line: #E4E2DD; --line-2: #D6D3CC; --white: #FFFFFF;
  --green: #2E8B57; --yellow: #E0A100; --red: #C8362E; --blue: #45608A;
  --font: Inter, "Suisse Intl", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 15px/1.45 var(--font); color: var(--ink); background: var(--stone); -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
h1, h2, h3 { color: var(--navy); letter-spacing: -.02em; margin: 0; font-weight: 600; }
h1 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; }
h2 { font-size: 20px; line-height: 1.2; }
h3 { font-size: 16px; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.rule { width: 44px; height: 3px; background: var(--amber); margin: 14px 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
header.top { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo img { height: 34px; display: block; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; }
nav.main { display: flex; gap: 22px; }
nav.main a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14px; padding: 21px 0 19px; border-bottom: 3px solid transparent; }
nav.main a:hover { color: var(--navy); }
nav.main a.on { color: var(--navy); border-bottom-color: var(--amber); }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.who b { color: var(--ink); font-weight: 600; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
main { padding: 28px 0 60px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- elements ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--font); text-decoration: none; padding: 13px 20px; border: 0; cursor: pointer; color: var(--navy); background: var(--amber); }
.btn:hover { background: var(--amber-h); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--white); }
.btn.dark { background: var(--navy); color: var(--white); }
.btn.dark:hover { background: var(--ink); }
.btn.sm { padding: 9px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; cursor: pointer; box-shadow: inset 0 -1px 0 var(--line-2); }
.link:hover { box-shadow: inset 0 -2px 0 var(--amber); }

.card { background: var(--white); border: 1px solid var(--line); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2 + *, .card h3 + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
@media (max-width: 960px) { .g2, .g3, .g-side { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 20px; }
.kpi { background: var(--white); padding: 16px 18px; }
.kpi .v { font-size: 30px; font-weight: 600; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--ink); margin-top: 4px; }
.kpi .h { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.alert .v { color: var(--red); }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--stone-2); }
table.t td.r, table.t th.r { text-align: right; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; background: var(--stone); color: var(--ink); white-space: nowrap; }
.pill.new { background: #FFF1D1; color: #7A5200; }
.pill.scheduled { background: #E2EAF2; color: var(--blue); }
.pill.in_progress { background: var(--navy); color: var(--white); }
.pill.done { background: #E3F1E8; color: #1F6B42; }
.pill.accepted { background: #D2E9DB; color: #17573A; }
.pill.cancelled { background: var(--stone); color: var(--muted); text-decoration: line-through; }
.dot { width: 10px; height: 10px; display: inline-block; flex: none; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.red { background: var(--red); } .dot.unknown { background: var(--line-2); }
.lvl { display: inline-flex; align-items: center; gap: 8px; }

.bar { height: 6px; background: var(--stone); position: relative; min-width: 80px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); }
.bar i.yellow { background: var(--yellow); } .bar i.red { background: var(--red); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
label.f { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; letter-spacing: .02em; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--line-2); padding: 10px 12px; border-radius: 0; width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.filters select, .filters input { width: auto; min-width: 160px; }
.field { margin-bottom: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); background: var(--white); }
.note { border-left: 3px solid var(--amber); background: var(--white); padding: 12px 14px; font-size: 14px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 6px 0 6px 14px; border-left: 2px solid var(--line); }
.timeline li b { font-weight: 600; }

/* ---------- body diagram & charts ---------- */
.body-svg { width: 100%; max-width: 420px; display: block; }
.body-svg text { font: 500 11px var(--font); fill: var(--white); }
.body-svg text.dark { fill: var(--navy); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font: 400 11px var(--font); fill: var(--muted); }
.zone-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.zone-tabs button { font: 500 12px var(--font); padding: 6px 10px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; color: var(--ink); }
.zone-tabs button.on { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- plan board ---------- */
.board { display: grid; border: 1px solid var(--line); background: var(--line); gap: 1px; overflow-x: auto; }
.board .hd { background: var(--white); padding: 8px 10px; font-size: 12px; color: var(--muted); }
.board .hd.today { box-shadow: inset 0 -3px 0 var(--amber); color: var(--navy); font-weight: 600; }
.board .tech { background: var(--white); padding: 10px; font-size: 13px; }
.board .tech b { display: block; color: var(--navy); }
.board .cell { background: var(--white); min-height: 86px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.board .cell.wk { background: var(--stone-2); }
.board .cell.over { background: #FFF6DF; outline: 2px dashed var(--amber); outline-offset: -3px; }
.chip { font-size: 12px; line-height: 1.25; padding: 6px 8px; background: #E2EAF2; color: var(--navy); cursor: grab; border-left: 3px solid var(--blue); }
.chip.in_progress { background: var(--navy); color: var(--white); border-left-color: var(--amber); }
.chip.done, .chip.accepted { background: #E3F1E8; border-left-color: var(--green); color: #17573A; }
.chip.new { background: #FFF1D1; border-left-color: var(--amber); }
.chip.cont { opacity: .55; }
.chip b { font-weight: 600; }
.inbox { display: flex; flex-wrap: wrap; gap: 8px; }
.inbox .chip { min-width: 200px; }

/* ---------- modal ---------- */
dialog { border: 0; padding: 0; max-width: 560px; width: calc(100% - 24px); box-shadow: 0 20px 60px rgba(13,13,80,.25); }
dialog::backdrop { background: rgba(13,13,80,.45); }
dialog .dlg { padding: 24px; }
dialog .dlg-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 12px 18px; font-size: 14px; z-index: 200; box-shadow: 0 8px 30px rgba(0,0,0,.2); border-left: 3px solid var(--amber); }
.toast.err { border-left-color: var(--red); }
.offline { background: var(--amber); color: var(--navy); font-size: 13px; font-weight: 500; text-align: center; padding: 6px 12px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .side { background: var(--navy); color: var(--white); padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; }
.login .side h1 { color: var(--white); font-size: clamp(28px, 3.4vw, 42px); max-width: 520px; }
.login .side p { color: #DCDCEC; max-width: 480px; }
.login .side .eyebrow { color: var(--amber); }
.login .side ul { padding: 0; list-style: none; margin: 24px 0 0; display: grid; gap: 12px; max-width: 480px; }
.login .side li { padding-left: 18px; position: relative; color: #DCDCEC; }
.login .side li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 3px; background: var(--amber); }
.login .side .foot { margin-top: auto; padding-top: 32px; font-size: 12px; color: #B9B9D6; }
.login .form { background: var(--white); padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.login .form > div { max-width: 380px; width: 100%; }
.login .logo img { height: 46px; margin-bottom: 28px; }
.demo-roles { display: grid; gap: 8px; margin-top: 8px; }
.demo-roles button { text-align: left; padding: 12px 14px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; font: inherit; color: var(--ink); }
.demo-roles button:hover { border-color: var(--navy); box-shadow: inset 3px 0 0 var(--amber); }
.demo-roles b { display: block; color: var(--navy); font-weight: 600; }
.demo-roles span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login .side { order: 2; } }

/* ---------- technician (mobile first) ---------- */
body.tech-mode { background: var(--stone); }
.tech-top { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--white); }
.tech-top .wrap { display: flex; align-items: center; height: 56px; gap: 12px; }
.tech-top img { height: 26px; filter: brightness(0) invert(1); }
.tech-top .who { color: #DCDCEC; }
.tech-top .who b { color: var(--white); }
.tech-top a { color: var(--white); }
.tcard { background: var(--white); border: 1px solid var(--line); padding: 14px 16px; display: block; text-decoration: none; color: var(--ink); margin-bottom: 10px; }
.tcard:hover { border-color: var(--navy); }
.tcard .ttl { font-weight: 600; color: var(--navy); font-size: 16px; }
.tcard .meta { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.section-title { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; font-weight: 500; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--navy); }
.check.done span { color: var(--muted); text-decoration: line-through; }
.meas { display: grid; grid-template-columns: 1fr 92px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meas .z { font-size: 14px; }
.meas .z small { display: block; color: var(--muted); font-size: 12px; }
.meas input { text-align: right; font-size: 18px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.meas input.warn { border-color: var(--red); background: #FBECEA; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--line); }
.sigpad { width: 100%; height: 180px; background: var(--white); border: 1px dashed var(--line-2); touch-action: none; display: block; }
.sticky-act { position: sticky; bottom: 0; background: rgba(242,241,238,.96); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 18px; }
.sig-img { max-width: 260px; border: 1px solid var(--line); background: var(--white); }

/* ---------- print (acts) ---------- */
@media print {
  header.top, .no-print, nav, .toast { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
  .act { page-break-after: always; }
}
