/* Люмикс — Маркировка 0.2. Темы по образцу /workspace/scada (html.theme-dark / theme-light), акцент — синий Lumix #0B4DB0, бирюзовый #236975.
   Иконки — Lucide (ISC), единая толщина линии 2. */
[hidden] { display: none !important; }
:root {
  --deep: #f3f6fb; --deep-2: #ffffff; --deep-3: #eef2f8;
  --accent: #0b4db0; --accent-hi: #086ec2; --accent-2: #236975; --on-accent: #fff;
  --ink: #0b1220; --ink-2: #3f4858; --ink-3: #636c7e;
  --line: #e3e8f0; --line-2: #cfd7e3;
  --ok: #148a5b; --warn: #b86e00; --bad: #d02f27; --off: #8a92a3;
  --radius: 20px; --shadow: 0 10px 30px -12px rgba(11,40,90,.18), 0 2px 6px rgba(11,18,32,.05);
  --page-bg: radial-gradient(1200px 500px at 0% -10%, rgba(11,77,176,.16), transparent 60%), radial-gradient(900px 400px at 110% 0%, rgba(35,105,117,.16), transparent 60%), #f3f6fb;
  --top-bg: rgba(255,255,255,.86); --paper: #ffffff; --paper-2: #f8fafd;
  --g-blue: linear-gradient(135deg, #0b4db0 0%, #2d7ff0 100%);
  --g-teal: linear-gradient(135deg, #1b5964 0%, #2fa3a8 100%);
  --g-green: linear-gradient(135deg, #0f7a52 0%, #2fbf85 100%);
  --g-amber: linear-gradient(135deg, #c96a00 0%, #f5a524 100%);
  --g-violet: linear-gradient(135deg, #4b3cc4 0%, #8b6cf0 100%);
  --g-red: linear-gradient(135deg, #b4221b 0%, #f0544c 100%);
  --g-slate: linear-gradient(135deg, #3c4a63 0%, #7f91a4 100%);
  --g-brand: linear-gradient(120deg, #0b4db0 0%, #236975 100%);
  --heat-0: #e6ecf4; --heat-1: #b6d0f5; --heat-2: #6fa3ec; --heat-3: #2d7ff0; --heat-4: #0b4db0;
  --font: "Roboto", "Helvetica Neue", Arial, sans-serif; --mono: "Roboto Mono", Consolas, monospace;
  --fs: 19px; --side: 0px;
}
html.theme-dark {
  --deep: #08111f; --deep-2: #0f1c32; --deep-3: #182a47;
  --accent: #3d82f0; --accent-hi: #78a9ff; --accent-2: #3fa3b3;
  --ink: #eff3f8; --ink-2: #c3cbd8; --ink-3: #94a0b4;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.16);
  --ok: #34c88d; --warn: #f2ad3d; --bad: #ff6a60;
  --shadow: 0 14px 34px -14px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.3);
  --page-bg: radial-gradient(1200px 500px at 0% -10%, rgba(61,130,240,.20), transparent 60%), radial-gradient(900px 400px at 110% 0%, rgba(63,163,179,.18), transparent 60%), #08111f;
  --top-bg: rgba(10,20,38,.86); --paper: #0f1c32; --paper-2: #13233d;
  --heat-0: #16263f; --heat-1: #1d3d6e; --heat-2: #2a5ea8; --heat-3: #3d82f0; --heat-4: #8db8ff;
}
html.big { --fs: 22px; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 400 var(--fs)/1.45 var(--font); color: var(--ink); background: var(--page-bg); background-attachment: fixed; -webkit-text-size-adjust: 100%; }
a { color: var(--accent-hi); }
h1 { font-size: 1.4em; margin: .2em 0 .5em; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
h1 .ic { color: var(--accent); width: 1.1em; height: 1.1em; }
h2 { font-size: 1.12em; margin: .2em 0 .6em; font-weight: 700; display: flex; align-items: center; gap: 8px; } h3 { font-size: 1em; margin: .3em 0; }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.ic.lg { width: 1.7em; height: 1.7em; } .ic.xl { width: 2.4em; height: 2.4em; }
/* шапка */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--g-brand); }
.top .logo { height: 34px; background: #fff; border-radius: 10px; padding: 3px 7px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.top .title { flex: 1; min-width: 0; font-weight: 800; font-size: 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .user { font-size: 1em; color: var(--ink-3); font-weight: 400; display: block; }
main { padding: 14px; max-width: 1240px; margin: 0 auto; padding-bottom: 100px; }
/* карточки */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.card.flat { box-shadow: none; }
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 18px; margin-bottom: 14px; color: #fff; background: var(--g-brand); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; width: 260px; height: 260px; right: -60px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero::after { content: ""; position: absolute; width: 180px; height: 180px; right: 80px; bottom: -110px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero h1 { color: #fff; margin: 0 0 4px; } .hero p { margin: 0; opacity: .92; position: relative; z-index: 1; } .hero > * { position: relative; z-index: 1; }
.muted { color: var(--ink-3); } .small { font-size: 1em; } .tiny { font-size: 1em; }
/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 18px; border: 0; border-radius: 16px; background: var(--g-blue); color: var(--on-accent); font: 600 1em var(--font); cursor: pointer; text-decoration: none; touch-action: manipulation; box-shadow: 0 8px 18px -10px rgba(11,77,176,.7); transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.06); } .btn:active { transform: scale(.98); }
.btn.wide { width: 100%; } .btn.big { min-height: 72px; font-size: 1.1em; border-radius: 20px; }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ok { background: var(--g-green); box-shadow: 0 8px 18px -10px rgba(20,138,91,.7); } .btn.bad { background: var(--g-red); box-shadow: none; } .btn.teal { background: var(--g-teal); box-shadow: 0 8px 18px -10px rgba(35,105,117,.7); }
.btn.sm { min-height: 44px; padding: 6px 12px; font-size: 1em; border-radius: 12px; }
.btn.icon { min-width: 46px; padding: 6px; }
.btn[disabled] { opacity: .45; }
.install-cta { background: linear-gradient(120deg, #236975, #0b4db0 60%, #2d7ff0); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .row > .grow { flex: 1; min-width: 140px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid.c4 { grid-template-columns: repeat(4, 1fr); } }
/* KPI */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 14px; min-height: 132px; box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column; }
.kpi .lbl { display: flex; align-items: center; gap: 6px; font-size: 1em; opacity: .95; font-weight: 500; }
.kpi .val { font-size: 2.1em; font-weight: 800; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 1em; font-weight: 600; background: rgba(255,255,255,.2); border-radius: 99px; padding: 1px 8px; align-self: flex-start; margin-top: 2px; }
.kpi svg.spark { position: absolute; right: 0; bottom: 0; width: 100%; height: 44px; opacity: .55; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.12); }
.t-blue { background: var(--g-blue); } .t-teal { background: var(--g-teal); } .t-green { background: var(--g-green); } .t-amber { background: var(--g-amber); } .t-violet { background: var(--g-violet); } .t-red { background: var(--g-red); } .t-slate { background: var(--g-slate); }
/* плитки действий */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 118px; padding: 14px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 700; cursor: pointer; overflow: hidden; transition: transform .1s; }
.tile:active { transform: scale(.98); }
.tile .bubble { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.tile .bubble .ic { width: 26px; height: 26px; }
.tile small { font-weight: 400; color: var(--ink-3); font-size: 1em; line-height: 1.3; }
.tile .cnt { position: absolute; right: 12px; top: 12px; font-size: 1em; background: var(--deep-3); color: var(--ink-2); border-radius: 99px; padding: 2px 10px; font-weight: 700; }
.tile .cnt.alert { background: var(--bad); color: #fff; }
/* формы */
label { display: block; font-weight: 600; margin: 12px 0 5px; }
input, select, textarea { width: 100%; min-height: 56px; padding: 10px 14px; font: 400 1em var(--font); color: var(--ink); background: var(--deep-2); border: 2px solid var(--line-2); border-radius: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=checkbox] { width: 28px; min-height: 28px; height: 28px; vertical-align: middle; accent-color: var(--accent); margin-right: 6px; }
.scanbox { font-family: var(--mono); font-size: 1em; border-color: var(--accent); border-width: 3px; background: color-mix(in srgb, var(--accent) 5%, var(--deep-2)); }
.hint { display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--accent) 9%, var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 18px; padding: 12px 14px; margin: 0 0 14px; }
.hint > .ic { color: var(--accent); margin-top: 2px; width: 1.4em; height: 1.4em; }
.hint b.step { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; background: var(--g-blue); color: #fff; border-radius: 99px; margin-right: 4px; font-size: 1em; }
.msg { display: flex; gap: 10px; align-items: flex-start; border-radius: 16px; padding: 14px; margin: 10px 0; font-weight: 500; }
.msg .ic { width: 1.4em; height: 1.4em; margin-top: 1px; }
.msg.ok { background: color-mix(in srgb, var(--ok) 14%, var(--paper)); border: 2px solid var(--ok); } .msg.ok .ic { color: var(--ok); }
.msg.bad { background: color-mix(in srgb, var(--bad) 12%, var(--paper)); border: 2px solid var(--bad); } .msg.bad .ic { color: var(--bad); }
.msg.warn { background: color-mix(in srgb, var(--warn) 14%, var(--paper)); border: 2px solid var(--warn); } .msg.warn .ic { color: var(--warn); }
/* списки, таблицы */
.list { list-style: none; margin: 0; padding: 0; } .list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.list li:last-child { border: 0; } .list .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 1em; font-weight: 600; background: var(--deep-3); color: var(--ink-2); white-space: nowrap; }
.badge.in_stock, .badge.assembled, .badge.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.badge.in_product { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-hi); }
.badge.shipped { background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2); }
.badge.defect, .badge.critical, .badge.returned { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.badge.low, .badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.badge.test { background: #ffe9a8; color: #6b4e00; }
.code { font-family: var(--mono); font-size: 1em; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; font-size: 1em; } td, th { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; } th { color: var(--ink-3); font-weight: 600; font-size: 1em; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
/* навигация */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
.bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; min-height: 64px; color: var(--ink-3); text-decoration: none; font-size: 1em; font-weight: 500; }
.bottom a .ic { width: 26px; height: 26px; }
.bottom a.on { color: var(--accent-hi); font-weight: 800; } .bottom a.on .ic { stroke-width: 2.4; }
.side { display: none; }
@media (min-width: 1000px) {
  :root { --side: 248px; }
  .bottom { display: none; }
  .side { display: flex; flex-direction: column; gap: 2px; position: fixed; top: 0; left: 0; bottom: 0; width: var(--side); padding: 14px 10px; background: var(--paper); border-right: 1px solid var(--line); overflow: auto; z-index: 40; }
  .side .logo { height: 40px; background: #fff; border-radius: 10px; padding: 4px 8px; align-self: flex-start; margin: 0 6px 12px; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 1em; font-weight: 500; }
  .side a:hover { background: var(--deep-3); } .side a.on { background: var(--g-blue); color: #fff; font-weight: 700; }
  .side .sep { height: 1px; background: var(--line); margin: 8px 6px; }
  body > .top, body > main, body > .foot, body > #net { margin-left: var(--side); }
  .top .logo { display: none; }
  main { padding: 22px 26px 40px; }
}
/* окна */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5,12,25,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal .sheet { background: var(--paper); color: var(--ink); width: 100%; max-width: 680px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 18px; animation: up .2s; }
@media (min-width: 700px) { .modal { align-items: center; } .modal .sheet { border-radius: 24px; } }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(30px); opacity: .5; } }
.video { width: 100%; max-height: 50vh; border-radius: 14px; background: #000; }
.photo { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; flex: none; }
.star { display: inline-grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--ink-3); min-width: 44px; min-height: 44px; border-radius: 12px; }
.star:hover { background: var(--deep-3); } .star.on { color: #e8a000; } .star.on .ic { fill: currentColor; } .star.imp.on { color: var(--bad); }
.fdot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1em; min-height: 44px; cursor: pointer; }
.chip.on { background: var(--g-blue); color: #fff; border-color: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.steps { padding-left: 1.4em; } .steps li { margin: 0 0 12px; }
.toast { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 70; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 16px; border-radius: 18px; font-weight: 700; box-shadow: var(--shadow); color: #fff; animation: up .2s; }
.toast.ok { background: var(--g-green); } .toast.bad { background: var(--g-red); }
.foot { text-align: center; color: var(--ink-3); font-size: 1em; margin: 20px 0 90px; }
/* диаграммы */
.donut-wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.donut text { font: 800 20px var(--font); fill: var(--ink); } .donut .sub { font: 500 9px var(--font); fill: var(--ink-3); }
.legend { list-style: none; padding: 0; margin: 0; font-size: 1em; flex: 1; min-width: 150px; } .legend li { display: flex; gap: 8px; align-items: center; padding: 3px 0; } .legend b { margin-left: auto; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel .st { position: relative; display: flex; align-items: center; gap: 10px; color: #fff; border-radius: 14px; padding: 10px 14px; min-height: 52px; margin: 0 auto; transition: width .8s ease; font-weight: 600; }
.funnel .st b { margin-left: auto; font-size: 1.25em; font-variant-numeric: tabular-nums; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 15px); grid-auto-columns: 15px; justify-content: start; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 15px; height: 15px; border-radius: 4px; background: var(--heat-0); display: block; }
.heat i.l1 { background: var(--heat-1); } .heat i.l2 { background: var(--heat-2); } .heat i.l3 { background: var(--heat-3); } .heat i.l4 { background: var(--heat-4); }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; font-size: 1em; margin-bottom: 10px; }
.hbar .bar { grid-column: 1 / -1; height: 10px; background: var(--deep-3); border-radius: 99px; overflow: hidden; } .hbar .bar i { display: block; height: 100%; border-radius: 99px; background: var(--g-blue); width: 0; transition: width .9s ease; }
.meter { height: 12px; background: var(--deep-3); border-radius: 99px; overflow: hidden; position: relative; } .meter i { display: block; height: 100%; border-radius: 99px; transition: width .9s ease; }
.meter .min { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }
.lv-ok { background: var(--g-green); } .lv-low { background: var(--g-amber); } .lv-critical { background: var(--g-red); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 99px; } .dot.ok { background: #2fbf85; } .dot.low { background: #f5a524; } .dot.critical { background: #f0544c; }
/* склад: канбан */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.kcol { scroll-snap-align: start; background: var(--paper-2); border: 1px solid var(--line); border-radius: 20px; padding: 10px; min-height: 120px; }
.kcol .kh { color: #fff; border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1em; }
.kcol .kh b { margin-left: auto; font-size: 1.5em; font-weight: 800; }
.kitem { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-top: 8px; cursor: pointer; font-size: 1em; font-weight: 500; }
.kitem:hover { border-color: var(--accent); } .kitem b { margin-left: auto; font-size: 1.15em; }
.kitem img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
html.compact .kanban { grid-auto-flow: row; grid-auto-columns: auto; }
@media (max-width: 520px) { .kanban { grid-auto-flow: row; grid-auto-columns: auto; } }
@media (min-width: 1000px) { html:not(.compact) .kanban { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); overflow: visible; } }
.racks { display: grid; gap: 14px; grid-template-columns: 1fr; } @media (min-width: 760px) { .racks { grid-template-columns: 1fr 1fr; } }
.rack { background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.rack h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.shelf { display: grid; gap: 5px; margin-bottom: 5px; }
.cell { min-height: 46px; border-radius: 10px; border: 1px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1em; color: var(--ink-3); cursor: pointer; background: var(--paper); }
.cell b { font-size: 1.5em; color: #fff; } .cell.f1 { background: #6fa3ec; border: 0; color: #fff; } .cell.f2 { background: #2d7ff0; border: 0; color: #fff; } .cell.f3 { background: #0b4db0; border: 0; color: #fff; }
/* пустые состояния */
.empty { text-align: center; padding: 26px 14px; color: var(--ink-3); }
.empty .art { width: 120px; height: 120px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 14%, transparent)); color: var(--accent); position: relative; }
.empty .art::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--accent) 30%, transparent); }
.empty .art .ic { width: 56px; height: 56px; stroke-width: 1.6; }
.empty h3 { color: var(--ink); }
.searchbar { position: relative; } .searchbar .ic { position: absolute; left: 14px; top: 18px; color: var(--ink-3); } .searchbar input { padding-left: 46px; }
.passport { max-width: 560px; margin: 0 auto; }
@media print { .top, .bottom, .side, .noprint, .foot { display: none !important; } body { background: #fff; color: #000; } main { padding: 0; margin: 0 !important; } .card { box-shadow: none; border: 0; } }

/* ---- 0.2.1: узкие экраны, крупный системный шрифт ---- */
html, body { overflow-x: hidden; max-width: 100%; }
.funnel .st { overflow: hidden; color: #fff; }
.funnel .st .fill { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.funnel .st .tx, .funnel .st b { position: relative; z-index: 1; }
.funnel .st .tx { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kpi { min-width: 0; }
.kpi .lbl { overflow-wrap: anywhere; line-height: 1.2; }
.kpi .val { font-size: clamp(1.5em, 8vw, 2.1em); overflow-wrap: anywhere; }
.kpi .delta { white-space: nowrap; max-width: 100%; position: relative; z-index: 1; }
.legend li { min-width: 0; } .legend li > b { flex: none; }
@media (max-width: 599px) {
  .funnel .st { width: 100% !important; margin: 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 12px; row-gap: 6px; column-gap: 10px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink); padding: 10px 12px; min-height: 0; }
  .funnel .st .fill { position: static; grid-column: 1 / -1; grid-row: 2; width: var(--p); height: 12px; border-radius: 99px; }
  .funnel .st .tx { grid-row: 1; overflow-wrap: anywhere; } .funnel .st .tx .ic { flex: none; color: var(--accent); }
  .funnel .st b { grid-row: 1; margin: 0; }
  .donut-wrap { flex-direction: column; align-items: stretch; } .donut-wrap .donut { align-self: center; } .legend { min-width: 0; width: 100%; }
  .kpis { gap: 10px; } .kpi { padding: 12px; min-height: 118px; } .kpi .delta .kp { display: none; }
  .top { gap: 6px; padding: 6px 8px; } .top .logo { height: 26px; padding: 2px 4px; border-radius: 8px; }
  .top .title { font-size: 1em; } .top .user { display: none; }
  .top .btn.icon { width: 40px; height: 40px; min-height: 40px; min-width: 40px; padding: 0; flex: none; }
  main { padding: 10px; padding-bottom: 100px; }
  .kanban, .grid, .grid2 { min-width: 0; } .card { min-width: 0; overflow-wrap: anywhere; }
  table { display: block; overflow-x: auto; max-width: 100%; }
}
@media (max-width: 380px) { .top .title { display: none; } }
.t-short { display: none; }
@media (max-width: 599px) { .t-long { display: none; } .t-short { display: inline; } }
@media (max-width: 599px) { .list li { flex-wrap: wrap; } .list li > .grow { flex: 1 1 60%; min-width: 0; } .code { word-break: break-all; } }
.hero h1, .hero p, .hero div { overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .card table, .card td, .card th { overflow-wrap: normal; word-break: normal; hyphens: auto; }
  .card table { font-size: 1em; } .card td, .card th { padding: 7px 4px; } td.num, th.num, td .badge { white-space: nowrap; }
  .card table th { white-space: normal; }
}
#searchBtn { margin-left: auto; }
.cmp td.num .badge { margin-top: 3px; }
@media (max-width: 599px) { .card td.code, .card .code { word-break: break-all; overflow-wrap: anywhere; } }

/* ---- 0.3.0: меньше лишнего, шрифт не меньше 1em, простой режим ---- */
.bottom { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bottom a { font-size: 1em; padding: 6px 1px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.bottom a span { display: block; max-width: 100%; }
@media (max-width: 440px) { .bottom a .ic { width: 24px; height: 24px; } }
.mainbtn { display: flex; align-items: center; gap: 14px; justify-content: flex-start; text-align: left; min-height: 84px; padding: 14px 18px; margin: 6px 0 12px; font-size: 1.1em; text-decoration: none; }
.mainbtn .ic { width: 34px; height: 34px; flex: none; } .mainbtn span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; } .mainbtn small { font-weight: 400; opacity: .92; font-size: 1em; }
.homewarn { text-decoration: none; color: inherit; }
.todo li a { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 600; min-height: 48px; min-width: 0; overflow-wrap: anywhere; }
.todo .bubble-s { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; } .todo .chev { color: var(--ink-3); }
details.more > summary, .side details.more > summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; gap: 10px; list-style: none; }
details.more > summary::-webkit-details-marker, .kcol > summary::-webkit-details-marker { display: none; }
details.more > summary::after, .kcol > summary::after { content: "▸"; margin-left: auto; font-size: 1.1em; } details.more[open] > summary::after, .kcol[open] > summary::after { content: "▾"; }
.kcol > summary { list-style: none; cursor: pointer; min-height: 52px; } .kcol > summary b { margin-left: auto; } .kcol > summary::after { margin-left: 8px; }
.kcol:not([open]) { min-height: 0; }
.kanban { grid-auto-flow: row !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); overflow: visible; align-items: start; }
.side details.more > summary { padding: 10px 12px; color: var(--ink-2); font-size: 1em; }
.modesw { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; } .modesw .btn { flex: 1 1 140px; }
.answers { display: grid; gap: 12px; margin-bottom: 14px; } @media (min-width: 900px) { .answers { grid-template-columns: repeat(3, 1fr); } }
.ans { display: flex; gap: 12px; align-items: flex-start; color: #fff; border-radius: 20px; padding: 16px; box-shadow: var(--shadow); line-height: 1.4; overflow-wrap: anywhere; } .ans .ic { width: 32px; height: 32px; flex: none; }
.simple-t { width: 100%; font-size: 1.05em; } .simple-t td, .simple-t th { padding: 12px 6px; } .simple-t td.num b { font-size: 1.2em; }
@media (max-width: 599px) { .card table.simple-t { display: table; font-size: 1em; } .card table { font-size: 1em; } }
.cell { font-size: 1em; } .cell b { font-size: 1.1em; }
.funnel .st { min-width: 0; overflow-wrap: anywhere; }
.hero { overflow: clip; }
@media (max-width: 599px) { .hide-m { display: none; } .card td, .card th { padding: 7px 3px; } .cmp .badge { padding: 2px 6px; } .cmp .badge .ic { display: none; } }
/* 0.3.0: «Кто в сети» (по образцу «Саркомы»), крупно */
.pres { position: relative; flex: none; } .pres-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; font-size: 1em; font-weight: 800; white-space: nowrap; }
.pdot { width: 14px; height: 14px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); display: inline-block; flex: none; } .pdot.off { background: var(--off); box-shadow: none; opacity: .7; }
.pres-pop { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 360px; max-width: calc(100vw - 24px); background: var(--deep-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; font-size: 1em; }
.pres.open .pres-pop { display: block; animation: fade .2s; }
.pres-h { font-weight: 700; margin-bottom: 8px; } .pres-r { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); overflow-wrap: anywhere; }
.pres-s { text-align: right; color: var(--ink-2); } .pres-s.on { color: var(--ok); font-weight: 700; }
@media (max-width: 599px) { .pres-pop { position: fixed; left: 10px; right: 10px; top: 60px; width: auto; max-width: none; } .pres-btn { padding: 0 10px; } .pres-r { grid-template-columns: auto minmax(0, 1fr); } .pres-s { grid-column: 2; text-align: left; } }
.statmore > summary.card { margin-bottom: 12px; }
.pres { margin-left: auto; } #pres:not([hidden]) + #searchBtn { margin-left: 0; }
@media (max-width: 480px) { .top .title { display: none; } }
.bottom a { overflow-wrap: normal; hyphens: manual; }
