/* Пульт команди — стиль кабінету Armoxe 2.0 (armoxe-app/src/index.css):
   ті самі токени кольорів (oklch), радіус 0.625rem, шрифт Golos Text, фірмовий
   приглушений смарагд --brand як єдиний колір на сірій темі. */
:root {
  color-scheme: light;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-soft: oklch(0.577 0.245 27.325 / 10%);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --brand: oklch(0.445 0.072 173);
  --brand-foreground: oklch(0.985 0.008 173);
  --brand-soft: oklch(0.955 0.022 173);
  --amber: oklch(0.666 0.179 58.3);
  --emerald: oklch(0.596 0.145 163.2);
  --ground: oklch(0.985 0 0);
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-xl: calc(var(--radius) * 1.4);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --font: 'Golos Text', 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: oklch(0.555 0.078 172);
    --brand-foreground: oklch(0.97 0.012 172);
    --brand-soft: oklch(0.29 0.038 172);
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.205 0 0);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.205 0 0);
    --primary: oklch(0.922 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --destructive: oklch(0.704 0.191 22.216);
    --destructive-soft: oklch(0.704 0.191 22.216 / 15%);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.556 0 0);
    --ground: oklch(0.145 0 0);}
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --brand: oklch(0.555 0.078 172);
    --brand-foreground: oklch(0.97 0.012 172);
    --brand-soft: oklch(0.29 0.038 172);
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.205 0 0);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.205 0 0);
    --primary: oklch(0.922 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --destructive: oklch(0.704 0.191 22.216);
    --destructive-soft: oklch(0.704 0.191 22.216 / 15%);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.556 0 0);
    --ground: oklch(0.145 0 0);}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--foreground); background: var(--ground);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv01'; overscroll-behavior: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
.boot { padding: 40px; color: var(--muted-foreground); }
.muted { color: var(--muted-foreground); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.brand-c { color: var(--brand); }
.danger-c { color: var(--destructive); }
.amber-c { color: var(--amber); }
.emerald-c { color: var(--emerald); }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-radius: 4px; }

/* ── вхід: той самий темний екран, що в кабінеті ─────────────────────── */
.login { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: #07070b; color: oklch(0.985 0 0); color-scheme: dark; overflow: hidden; }
.login::before, .login::after { content: ''; position: absolute; border-radius: 50%; background: #fff; pointer-events: none; }
.login::before { top: -176px; left: 50%; width: 480px; height: 480px; transform: translateX(-50%); opacity: .10; filter: blur(120px); }
.login::after { bottom: -96px; right: -96px; width: 320px; height: 320px; opacity: .05; filter: blur(110px); }
.login .lcard { position: relative; width: 100%; max-width: 384px; border: 1px solid rgb(255 255 255 / .10); background: rgb(255 255 255 / .035);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl); backdrop-filter: blur(24px); padding: 24px; }
.login .lhead { text-align: center; margin-bottom: 20px; }
.login .lhead img { height: 32px; width: auto; margin-bottom: 16px; }
.login h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.login .lhead p { color: oklch(0.708 0 0); font-size: 14px; margin-top: 6px; }
.login label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 8px; }
.login .lrow { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.login .lrow label { margin: 0; }
.login .lrow a { font-size: 12px; color: oklch(0.708 0 0); text-decoration: underline; }
.login .lrow a:hover { color: #fff; }
.login .field { margin-bottom: 16px; }
.login input { width: 100%; height: 36px; border-radius: var(--radius-md); border: 1px solid rgb(255 255 255 / .15);
  background: rgb(255 255 255 / .05); padding: 0 12px; color: #fff; font-size: 14px; }
.login input::placeholder { color: oklch(0.556 0 0); }
.login input:focus { outline: none; border-color: oklch(0.708 0 0); box-shadow: 0 0 0 3px rgb(255 255 255 / .12); }
.login .btn { width: 100%; height: 36px; border-radius: var(--radius-md); font-weight: 500; font-size: 14px; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; }
.login .btn.white { background: #fff; color: #07070b; box-shadow: 0 10px 15px -3px rgb(255 255 255 / .2); }
.login .btn.white:hover { background: rgb(255 255 255 / .9); }
.login .btn.outline { margin-top: 10px; background: transparent; border-color: rgb(255 255 255 / .15); color: #fff; }
.login .btn.outline:hover { background: rgb(255 255 255 / .06); }
.login .btn:disabled { opacity: .6; }
.login .btn svg { width: 16px; height: 16px; }
.login .lfoot { text-align: center; margin-top: 14px; }
.login .linkbtn { background: none; border: 0; padding: 0; color: oklch(0.708 0 0); font-size: 12px; text-decoration: underline; cursor: pointer; }
.login .linkbtn:hover { color: #fff; }
.login .err { color: oklch(0.704 0.191 22.216); font-size: 12px; margin-top: 10px; text-align: center; }
.login .sep { display: flex; align-items: center; gap: 10px; color: oklch(0.556 0 0); font-size: 11px; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .08em; }
.login .sep::before, .login .sep::after { content: ''; flex: 1; border-top: 1px solid rgb(255 255 255 / .1); }

/* ── каркас ─────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px;
  background: var(--background); border-bottom: 1px solid var(--border); }
.top .logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-md); overflow: hidden; background: #fff;
  border: 1px solid var(--border); }
.top .logo img { width: 100%; height: 100%; display: block; }
.top h1 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.top .snap { font-size: 12px; color: var(--muted-foreground); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.top .right b { font-weight: 600; }
.top .linkbtn { background: none; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px 10px; font-size: 12px; color: var(--muted-foreground); }
.top .linkbtn:hover { color: var(--foreground); background: var(--muted); }
.page { display: flex; flex-direction: column; gap: 8px; padding: 12px; max-width: 1600px; margin: 0 auto; }
@media (min-width: 1024px) {
  .page { height: calc(100svh - 48px); }
  .body { height: 100%; min-height: 600px; }
  .roll { overflow-y: auto; }
  .bottom .card { max-height: none !important; }
}
.body { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.titlebar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.titlebar h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

/* ── бейджі, цеглинки ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: var(--radius-md); border: 1px solid transparent;
  padding: 1px 8px; font-size: 11px; font-weight: 500; white-space: nowrap; line-height: 1.5; }
.badge.xs { font-size: 10px; padding: 0 6px; }
.badge.secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge.outline { border-color: var(--border); color: var(--foreground); }
.badge.primary { background: var(--primary); color: var(--primary-foreground); }
.badge.destructive { background: var(--destructive); color: #fff; }
.badge.warning { background: var(--amber); color: #fff; }
.badge.success { background: var(--emerald); color: #fff; }
.badge.w62 { width: 62px; }

.card { background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: var(--radius-xl);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.card > header { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px 6px; flex-shrink: 0; }
.card > header h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card > header .cnt { color: var(--muted-foreground); font-size: 12px; font-weight: 500; }
.card > header .act { margin-left: auto; }
.card .foot { flex-shrink: 0; border-top: 1px solid var(--border); padding: 4px 12px; font-size: 10px; color: var(--muted-foreground); }
.roll { flex: 1; min-height: 0; }
.grow { flex: 1; }

.seg { display: inline-flex; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 2px;
  background: color-mix(in oklch, var(--muted) 50%, transparent); }
.seg button { border: 0; background: none; border-radius: 5px; padding: 1px 8px; font-size: 11px; font-weight: 500; color: var(--muted-foreground); }
.seg button:hover { color: var(--foreground); }
.seg button[aria-selected="true"] { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }

.init { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: var(--radius-md); font-size: 11px; font-weight: 700;
  background: var(--muted); color: var(--muted-foreground); }
.init.on { background: var(--brand-soft); color: var(--brand); }

.lbl { color: var(--muted-foreground); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* ── смуга клітинок ──────────────────────────────────────────────────── */
.cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden; flex-shrink: 0; }
@media (min-width: 768px) { .cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cells { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cell { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; min-width: 0; border-left: 1px solid var(--border); }
.cell:first-child { border-left: 0; }
@media (max-width: 1023px) { .cell { border-top: 1px solid var(--border); } .cell:nth-child(-n+2) { border-top: 0; } }
@media (min-width: 768px) and (max-width: 1023px) { .cell:nth-child(-n+3) { border-top: 0; } .cell:nth-child(4), .cell:nth-child(5) { border-top: 1px solid var(--border); } }
.cell .v { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .v .sub { color: var(--muted-foreground); font-weight: 400; }

/* ── люди ────────────────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; flex-shrink: 0; }
@media (min-width: 768px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.person { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.person > header { display: flex; align-items: flex-start; gap: 8px; }
.person .who { min-width: 0; flex: 1; }
.person .who .nm { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.person .who .nm b { font-size: 14px; font-weight: 600; }
.person .who .nm span { color: var(--muted-foreground); font-size: 12px; }
.person .who .st { color: var(--muted-foreground); font-size: 11px; }
.person .who .st .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-right: 4px; vertical-align: middle; }
.person .who .st .on { color: var(--foreground); font-weight: 500; }
.person .line { color: var(--muted-foreground); font-size: 11px; }
.person .src { color: var(--muted-foreground); font-size: 10px; }
.hours { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 1px; }
.hours span { height: 12px; border-radius: 2px; background: var(--muted); }
.hours span.l1 { background: color-mix(in oklch, var(--brand) 35%, transparent); }
.hours span.l2 { background: color-mix(in oklch, var(--brand) 65%, transparent); }
.hours span.l3 { background: var(--brand); }
.hours-ax { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: var(--muted-foreground); margin-top: 2px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.days .d { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.days .bar { display: flex; align-items: flex-end; height: 40px; width: 100%; }
.days .bar i { display: block; width: 100%; border-radius: 2px 2px 0 0; background: var(--muted); }
.days .bar i.on { background: color-mix(in oklch, var(--brand) 70%, transparent); }
.days .d span { font-size: 9px; font-weight: 500; color: var(--muted-foreground); }
.days .d span.today { color: var(--brand); }
.now { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px 8px; }
.now .ttl { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; font-size: 12px; font-weight: 500; line-height: 1.35; color: inherit; }
.now .ttl:hover { color: var(--brand); }
.now .ttl .k { display: block; color: var(--muted-foreground); font-family: var(--mono); font-size: 10px; font-weight: 400; }
.now .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; list-style: none; margin: 0; padding: 0; font-size: 11px; }
.chain li { display: flex; align-items: center; gap: 4px; }
.chain li > span { border-radius: 4px; padding: 0 4px; color: var(--muted-foreground); }
.chain li > span.done { color: var(--foreground); }
.chain li > span.cur { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.chain li > span.red { background: var(--destructive-soft); color: var(--destructive); font-weight: 600; }
.chain li > span svg { width: 10px; height: 10px; vertical-align: -1px; margin-right: 2px; }
.chain .sep { color: color-mix(in oklch, var(--muted-foreground) 60%, transparent); }
.ptasks button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; border-radius: 4px; padding: 2px 4px; text-align: left; font-size: 12px; color: inherit; }
.ptasks button:hover:not(:disabled) { background: color-mix(in oklch, var(--muted) 60%, transparent); }
.ptasks .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: color-mix(in oklch, var(--muted-foreground) 40%, transparent); }
.ptasks .dot.red { background: var(--destructive); }
.ptasks .dot.brand { background: var(--brand); }
.ptasks .k { flex-shrink: 0; color: var(--muted-foreground); font-family: var(--mono); font-size: 10px; }
.note { color: var(--muted-foreground); font-size: 11px; margin-top: -4px; flex-shrink: 0; }

/* ── нижня зона ──────────────────────────────────────────────────────── */
.bottom { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; flex: 1; }
@media (min-width: 1024px) { .bottom { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.bottom .card.tasks { max-height: 70vh; }
.bottom .card.alarms { max-height: 50vh; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0 12px 6px; flex-shrink: 0; }
.filter button { border: 1px solid var(--border); background: none; border-radius: var(--radius-md); padding: 1px 8px; font-size: 11px; font-weight: 500; color: var(--muted-foreground); }
.filter button:hover { color: var(--foreground); }
.filter button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.filter .hint { margin-left: auto; font-size: 10px; color: var(--muted-foreground); }
.grp { display: flex; align-items: baseline; gap: 6px; padding: 4px 12px; border-top: 1px solid var(--border); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); background: color-mix(in oklch, var(--muted) 40%, transparent); }
.grp:first-child { border-top: 0; }
.row { display: grid; width: 100%; align-items: center; gap: 8px; border: 0; border-top: 1px solid var(--border); background: none; padding: 6px 12px; text-align: left; color: inherit; }
.row:first-child { border-top: 0; }
.row:hover { background: color-mix(in oklch, var(--muted) 60%, transparent); }
.row.task { grid-template-columns: auto 24px 1fr auto; }
.row.done { grid-template-columns: 44px 24px 1fr auto; }
.row .t { font-size: 14px; font-weight: 600; }
.row.done .t { font-weight: 400; }
.row .s { color: var(--muted-foreground); font-size: 12px; }
.row .s .mono { font-size: 11px; }
.row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 10px; }
.row .side .red { color: var(--destructive); font-weight: 500; }
.empty { padding: 12px; font-size: 12px; color: var(--muted-foreground); }
.calm { padding: 8px 12px; }
.calm b { display: block; font-size: 14px; font-weight: 500; }
.calm span { font-size: 12px; color: var(--muted-foreground); }
.alarm { display: flex; width: 100%; align-items: flex-start; gap: 8px; border: 0; border-top: 1px solid var(--border); background: none; padding: 6px 12px; text-align: left; color: inherit; }
.alarm:first-child { border-top: 0; }
.alarm:hover:not(:disabled) { background: color-mix(in oklch, var(--muted) 60%, transparent); }
.alarm .badge { margin-top: 2px; flex-shrink: 0; }
.alarm .tx { font-size: 13px; line-height: 1.35; }
.alarm .k { color: var(--muted-foreground); font-family: var(--mono); font-size: 10px; }

/* ── стани ───────────────────────────────────────────────────────────── */
.skel { background: var(--muted); border-radius: var(--radius-xl); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.skel.h14 { height: 56px; } .skel.h64 { height: 256px; } .skel.h48 { height: 192px; }
.skel-grid { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .skel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.alert { display: flex; align-items: flex-start; gap: 8px; border: 1px solid; border-radius: var(--radius-xl); padding: 8px 12px; font-size: 14px; }
.alert.err { border-color: color-mix(in oklch, var(--destructive) 40%, transparent); background: color-mix(in oklch, var(--destructive) 5%, transparent); color: var(--destructive); }
.alert.info { border-color: var(--border); background: var(--card); padding: 12px; }
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.alert.info svg { color: var(--muted-foreground); }
.alert b { display: block; font-weight: 600; }
.alert .sm { font-size: 12px; }
.alert.info .sm { color: var(--muted-foreground); }

/* ── бокова панель ───────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .5); }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: 100%; background: var(--background); color: var(--foreground);
  border-left: 1px solid var(--border); box-shadow: var(--shadow-2xl); display: flex; flex-direction: column; gap: 16px; padding: 16px; overflow-y: auto;
  animation: slide .2s ease-out; }
@media (min-width: 640px) { .sheet { width: 75%; max-width: 512px; } }
@keyframes slide { from { transform: translateX(100%); } }
.sheet .x { position: absolute; top: 12px; right: 12px; border: 0; background: none; color: var(--muted-foreground); border-radius: var(--radius-sm); padding: 2px; display: grid; place-items: center; }
.sheet .x:hover { color: var(--foreground); background: var(--muted); }
.sheet .x svg { width: 16px; height: 16px; }
.sheet .sh { display: flex; flex-direction: column; gap: 6px; padding-right: 28px; }
.sheet .sh .k { color: var(--muted-foreground); font-family: var(--mono); font-size: 12px; }
.sheet .sh h2 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.sheet .sh .who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.sheet .fields { display: flex; flex-direction: column; gap: 4px; }
.sheet .field { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.sheet .field .n { color: var(--muted-foreground); width: 96px; flex-shrink: 0; }
.sheet section { display: flex; flex-direction: column; gap: 6px; }
.sheet section h3 { color: var(--muted-foreground); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.sheet section h3 .mono { margin-left: 4px; }
.sheet .tx { font-size: 12px; line-height: 1.6; }
.sheet .tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.sheet .tl li { display: flex; gap: 8px; }
.sheet .tl .w { color: var(--muted-foreground); width: 96px; flex-shrink: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sheet .tl .b { min-width: 0; overflow-wrap: anywhere; }
.sheet .pr { display: flex; width: 100%; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px 8px;
  background: none; text-align: left; font-size: 12px; color: inherit; }
.sheet .pr:hover { background: color-mix(in oklch, var(--muted) 60%, transparent); }
.sheet .pr .mono { font-size: 12px; }
.sheet .msg { font-size: 12px; }
.sheet .msg .h { font-weight: 600; }
.sheet .msg .h.amber { color: var(--amber); }
.sheet .boxed { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 6px 8px; font-size: 12px; }
.sheet .gh { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-size: 12px; font-weight: 600; }
.sheet .gh svg { width: 12px; height: 12px; }
.sheet .gh:hover { text-decoration: underline; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--primary); color: var(--primary-foreground);
  padding: 10px 16px; border-radius: var(--radius-md); font-size: 13px; z-index: 60; box-shadow: var(--shadow-2xl); max-width: calc(100vw - 32px); }
/* ── v2: читабельність як у кабінеті (власник 06.11: «текст херово зроблений і незамітний») ── */
:root { --muted-foreground: oklch(0.48 0 0); --ground: oklch(0.975 0 0); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --muted-foreground: oklch(0.76 0 0); --ground: oklch(0.13 0 0); --card: oklch(0.195 0 0); } }
:root[data-theme="dark"] { --muted-foreground: oklch(0.76 0 0); --ground: oklch(0.13 0 0); --card: oklch(0.195 0 0); }
body { font-size: 15px; line-height: 1.5; }
@media (min-width: 1024px) { .page { height: auto; } .body { height: auto; } .roll { overflow: visible; } }
.page { gap: 16px; padding: 20px 24px; }
.body { gap: 16px; }
.top { height: 60px; padding: 0 24px; gap: 14px; }
.top .logo { width: 32px; height: 32px; }
.top h1 { font-size: 18px; }
.top .snap { font-size: 13px; }
.top .right { font-size: 15px; }
.top .linkbtn { font-size: 14px; padding: 6px 14px; }
.lbl { font-size: 12px; letter-spacing: .06em; font-weight: 600; }
.cells { border-radius: var(--radius-xl); }
.cell { padding: 14px 18px; gap: 6px; }
.cell .v { font-size: 15px; font-weight: 500; white-space: normal; }
.cell .v .num, .cell .v > b, .cell .v strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.people { gap: 16px; }
.person { padding: 18px 20px; gap: 14px; }
.init { width: 36px; height: 36px; font-size: 15px; border-radius: var(--radius-md); }
.person .who .nm b { font-size: 18px; }
.person .who .nm span { font-size: 14px; }
.person .who .st { font-size: 14px; margin-top: 2px; }
.person .who .st .dot { width: 8px; height: 8px; }
.person .line { font-size: 14px; color: var(--foreground); }
.person .src { font-size: 13px; }
.hours span { height: 18px; border-radius: 3px; }
.hours-ax { font-size: 12px; margin-top: 4px; }
.days .bar { height: 56px; } .days .d span { font-size: 12px; }
.now { padding: 12px 14px; border-radius: var(--radius-md); background: color-mix(in oklch, var(--muted) 45%, transparent); }
.now .ttl { font-size: 15px; font-weight: 600; line-height: 1.4; }
.now .ttl .k { font-size: 13px; margin-top: 2px; }
.now .meta { margin-top: 8px; gap: 6px 10px; }
.chain { font-size: 13px; gap: 4px 6px; }
.chain li > span { padding: 1px 6px; }
.chain li > span svg { width: 12px; height: 12px; }
.badge { font-size: 13px; padding: 2px 10px; }
.badge.xs { font-size: 12px; padding: 1px 8px; }
.ptasks button { font-size: 14px; padding: 5px 6px; gap: 10px; }
.ptasks .dot { width: 8px; height: 8px; }
.ptasks .k { font-size: 12px; }
.note { font-size: 13px; margin-top: -6px; }
.seg button { font-size: 13px; padding: 4px 12px; }
.card > header { padding: 16px 20px 10px; }
.card > header h2 { font-size: 18px; font-weight: 700; }
.card > header .cnt { font-size: 15px; }
.card .foot { font-size: 13px; padding: 10px 20px; }
.filter { padding: 0 20px 12px; gap: 6px; }
.filter button { font-size: 14px; padding: 4px 12px; }
.filter .hint { font-size: 13px; }
.grp { font-size: 12px; padding: 8px 20px; letter-spacing: .06em; }
.row { padding: 12px 20px; gap: 12px; }
.row .t { font-size: 16px; line-height: 1.35; }
.row .s { font-size: 14px; margin-top: 2px; }
.row .s .mono { font-size: 13px; }
.row .side { font-size: 13px; }
.row.task { grid-template-columns: 84px 32px 1fr auto; }
.row .init { width: 32px; height: 32px; font-size: 14px; }
.calm { padding: 12px 20px; } .calm b { font-size: 17px; font-weight: 600; } .calm span { font-size: 15px; }
.alarm { padding: 12px 20px; } .alarm .tx { font-size: 15px; } .alarm .k { font-size: 13px; }
.empty { font-size: 15px; padding: 16px 20px; }
.sheet .sh h2 { font-size: 20px; } .sheet .sh .k { font-size: 14px; } .sheet .sh .who { font-size: 15px; }
.sheet .field, .sheet .tx, .sheet .tl, .sheet .pr, .sheet .msg, .sheet .boxed, .sheet .gh { font-size: 14px; }
.sheet section h3 { font-size: 12px; }
.cell .v > .mono { font-family: var(--font); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-right: 2px; }
.cell .v .sub { font-size: 15px; }
.person > header { flex-wrap: wrap; row-gap: 10px; }
.person .who { flex: 1 1 200px; }
.person .who .nm { flex-wrap: wrap; row-gap: 0; }
.person .who .nm b, .person .who .nm span { overflow: visible; white-space: normal; text-overflow: clip; }
.ptasks .truncate { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ptasks button { align-items: flex-start; } .ptasks .dot { margin-top: 7px; } .ptasks .k { margin-top: 2px; }

:root[data-theme="light"] { color-scheme: light; }
.top .theme { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-md); background: none; color: var(--muted-foreground); }
.top .theme:hover { color: var(--foreground); background: var(--muted); }
.top .theme svg { width: 17px; height: 17px; }
