/* «Орбита» — пульт мастерской «Меры». Ночь, луна, три линии и одна точка цвета. */
:root {
  --bg: #030409; --bg-2: #07080D;
  --panel: rgba(13, 14, 20, .74); --panel-2: rgba(19, 20, 28, .82); --raise: rgba(255, 255, 255, .04); --raise-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .075); --line-2: rgba(255, 255, 255, .13); --line-3: rgba(255, 255, 255, .2);
  --ink: #F5F5F7; --ink-2: #D2D3DA; --muted: #8E8F9A; --faint: #5E5F6A;
  --moon: #ECEDF2; --moon-2: #A1A1A6; --moon-3: #6E6E73;
  --accent: #FF2D55; --accent-soft: rgba(255, 45, 85, .14);
  --r-xl: 28px; --r-lg: 22px; --r: 16px; --r-sm: 11px;
  --font: "Onest", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rail: 236px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { color: var(--ink); font: 400 15px/1.5 var(--font); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums lining-nums; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: rgba(236, 237, 242, .22); }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#sky { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.glow { position: fixed; z-index: 0; pointer-events: none; width: 900px; height: 900px; right: -320px; top: -360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(161, 161, 166, .09), transparent 70%); }

/* ---------- знак ---------- */
.mk { --m: 30px; --cut: 5px; position: relative; display: inline-block; flex: none; width: var(--m); height: var(--m); }
.mk .disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--moon);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(50% - var(--cut)) no-repeat, linear-gradient(#000 0 0) bottom / 100% calc(50% - var(--cut)) no-repeat;
          mask: linear-gradient(#000 0 0) top / 100% calc(50% - var(--cut)) no-repeat, linear-gradient(#000 0 0) bottom / 100% calc(50% - var(--cut)) no-repeat; }
.mk .disc::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: var(--bg); transform: translateX(-12%); }
.mk .lines { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: grid; gap: 1px; }
.mk .lines i { display: block; height: 1.5px; border-radius: 2px; }
.mk .lines i:nth-child(1) { background: var(--moon); }
.mk .lines i:nth-child(2) { background: var(--moon-2); }
.mk .lines i:nth-child(3) { background: var(--moon-3); }
.mk.xl { --m: 84px; --cut: 11px; }
.mk.xl .lines { gap: 3px; }
.mk.xl .lines i { height: 3px; }

/* ---------- каркас ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 18px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(7, 8, 13, .72), rgba(7, 8, 13, .35)); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 28px; text-decoration: none; }
.brand b { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.brand small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 1px; }
.nav { display: grid; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background .2s var(--ease), color .2s var(--ease); }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav a:hover { background: var(--raise); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--raise-2); color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 11px; bottom: 11px; width: 2px; border-radius: 2px; background: var(--moon); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.rail-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 10px; font-size: 12.5px; color: var(--faint); }
.rail-foot .who { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.rail-foot .ava { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); color: var(--ink); font-size: 12px; font-weight: 600; }
.demo-flag { margin: 0 10px 12px; padding: 9px 11px; border-radius: 12px; background: var(--accent-soft); color: #FFC2CF; font-size: 12.5px; line-height: 1.4; }

.main { position: relative; min-width: 0; padding: 34px clamp(20px, 4vw, 52px) 170px; }
.page { max-width: 1120px; margin: 0 auto; animation: page-in .45s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.eyebrow { font-size: 13px; color: var(--muted); letter-spacing: .01em; margin: 0 0 8px; }
.h1 { margin: 0; font-size: clamp(32px, 4.2vw, 46px); line-height: 1.04; letter-spacing: -.038em; font-weight: 650; }
.h2 { margin: 0 0 16px; font-size: 21px; line-height: 1.2; letter-spacing: -.022em; font-weight: 600; }
.h3 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.012em; font-weight: 600; }
.dot { color: var(--accent); }
.lead { margin: 10px 0 0; color: var(--muted); font-size: 15.5px; max-width: 62ch; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.sec { margin-top: 34px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sec-h a, .link { color: var(--muted); text-decoration: none; font-size: 13.5px; background: none; border: 0; padding: 0; }
.sec-h a:hover, .link:hover { color: var(--ink); }

.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.card.flat { background: transparent; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--moon); color: #05060A; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: transform .15s var(--ease), opacity .15s; }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: var(--raise); opacity: 1; }
.btn.danger { background: var(--accent); color: #fff; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field { display: grid; gap: 7px; }
.field label, .lbl { font-size: 13px; color: var(--muted); }
.input, .select, .area { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); outline: 0; transition: border-color .2s, background .2s; }
.area { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.input:focus, .select:focus, .area:focus { border-color: var(--line-3); background: rgba(255, 255, 255, .05); }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 30px; padding: 0 14px; border-radius: 999px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--raise-2); color: var(--ink); }
.note { padding: 12px 14px; border-radius: 12px; background: var(--raise); color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.note.warn { background: var(--accent-soft); color: #FFD0DA; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.code { display: block; padding: 12px 14px; border-radius: 12px; background: #08090E; border: 1px solid var(--line); color: var(--ink-2); white-space: pre-wrap; word-break: break-all; }

/* ---------- фазы луны: статусы ---------- */
.ph { --s: 12px; position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; }
.ph.ok { background: var(--moon); box-shadow: 0 0 0 3px rgba(236, 237, 242, .08), 0 0 14px rgba(236, 237, 242, .35); }
.ph.warn { background: linear-gradient(90deg, transparent 50%, var(--moon) 50%); box-shadow: inset 0 0 0 1.5px var(--moon); }
.ph.soon, .ph.off, .ph.info { box-shadow: inset 0 0 0 1.5px var(--moon-3); }
.ph.soon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset -2.5px 0 0 0 var(--moon-2); }
.ph.down { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 12px rgba(255, 45, 85, .4); }
.ph.down::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.pill .ph { --s: 8px; }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 24px; align-items: center; margin-bottom: 18px; }
.hero .h1 { font-size: clamp(38px, 5vw, 58px); }
.hero .sub { margin-top: 14px; color: var(--muted); font-size: 15.5px; }
.hero .chips { margin-top: 22px; }
.orb { position: relative; width: 100%; max-width: 470px; aspect-ratio: 540 / 428; justify-self: end; }
.orb svg { width: 100%; height: 100%; overflow: visible; }
.orb .planet { cursor: pointer; }
.orb .planet:hover .pl-name { fill: var(--ink); }
.orb .pl-name { font: 600 13px var(--font); fill: var(--ink-2); letter-spacing: -.01em; transition: fill .2s; }
.orb .pl-st { font: 400 11.5px var(--font); fill: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 32px; padding: 0 13px; border-radius: 999px; border: 0; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13px; transition: background .2s, color .2s; }
.chip:hover { background: var(--raise-2); color: var(--ink); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 18px 20px; }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi .v { margin-top: 8px; font-size: 32px; line-height: 1; font-weight: 600; letter-spacing: -.035em; }
.kpi .v small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi .hint { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.kpi svg.spark { display: block; width: 100%; height: 34px; margin-top: 12px; }
.bars3 { display: grid; gap: 7px; margin-top: 12px; }
.bar3 { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.bar3 .tr { height: 4px; border-radius: 3px; background: var(--raise-2); overflow: hidden; }
.bar3 .tr i { display: block; height: 100%; border-radius: 3px; background: var(--moon); }
.bar3 b { font-weight: 500; color: var(--ink-2); text-align: right; }

.decide { display: grid; gap: 10px; }
.dcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line-2); }
.dcard .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); }
.dcard .ico svg { width: 17px; height: 17px; }
.dcard.danger .ico { background: var(--accent-soft); color: var(--accent); }
.dcard .t { font-weight: 600; font-size: 14.5px; }
.dcard .s { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.dcard .w { color: var(--faint); font-size: 12.5px; margin-top: 4px; }

.feed { display: grid; }
.ev { display: grid; grid-template-columns: 64px 18px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ev:first-child { border-top: 0; }
.ev time { color: var(--faint); font-size: 12.5px; padding-top: 1px; }
.ev .ph { --s: 9px; margin-top: 6px; }
.ev .who { color: var(--muted); }
.ev .undo { margin-left: 8px; }

/* ---------- проекты ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.proj { display: flex; flex-direction: column; gap: 16px; }
.proj-top { display: flex; align-items: center; gap: 14px; }
.planet-ico { --s: 46px; position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; }
.planet-ico .ph { --s: 22px; }
.planet-ico::before { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); }
.proj-top .h3 { font-size: 19px; letter-spacing: -.02em; }
.proj-top .pill { margin-left: auto; }
.proj .about { color: var(--ink-2); font-size: 14.5px; }
.mets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.met { padding: 12px 14px; border-radius: 14px; background: var(--raise); }
.met .k { font-size: 12px; color: var(--muted); }
.met .v { margin-top: 4px; font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
.met .h { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.improve { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.improve li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.improve li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--moon-2); }
.checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.checks .ph { --s: 10px; margin-top: 5px; }
.proj .row.end { margin-top: auto; }
.add-card { display: grid; place-items: center; min-height: 220px; border-style: dashed; border-color: var(--line-2); background: transparent; color: var(--muted); text-align: center; }
.add-card .plus { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- аналитика ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 220px; }
.chart .tip { position: absolute; pointer-events: none; transform: translate(-50%, -110%); padding: 7px 10px; border-radius: 10px; background: #15161D; border: 1px solid var(--line-2); font-size: 12.5px; white-space: nowrap; }
.totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.totals > div { padding: 18px 20px; background: var(--panel); }
.totals .k { font-size: 12.5px; color: var(--muted); }
.totals .v { font-size: 26px; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; }
.totals .h { font-size: 12px; color: var(--faint); margin-top: 3px; }
.list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.list li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: 14px; overflow: hidden; }
.list li .fill { position: absolute; inset: 0 auto 0 0; background: var(--raise); border-radius: 10px; }
.list li span, .list li b { position: relative; }
.list li b { font-weight: 500; color: var(--ink-2); }
.empty { color: var(--faint); font-size: 14px; padding: 8px 2px; }

/* ---------- сервер ---------- */
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gauge { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: center; }
.gauge svg { width: 92px; height: 92px; }
.gauge .v { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.gauge .k { color: var(--muted); font-size: 13px; }
.gauge .h { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 0 12px 10px 0; }
.table td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.logline { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--muted); padding: 7px 0; border-top: 1px solid var(--line); word-break: break-all; }

/* ---------- новости ---------- */
.news-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.nitem { display: grid; gap: 4px; padding: 14px 14px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; }
.nitem:hover { background: var(--raise); }
.nitem[aria-current="true"] { background: var(--raise-2); border-color: var(--line); }
.nitem .m { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); }
.nitem .m b { color: #FF8FA6; font-weight: 500; }
.nitem .t { font-weight: 600; font-size: 14.5px; }
.preview { margin-top: 18px; padding: 22px; border-radius: var(--r); background: #F7F7F9; color: #1D1D1F; }
.preview .pm { font-size: 13px; color: #6E6E73; display: flex; gap: 12px; }
.preview .pm b { color: #DD2137; font-weight: 500; }
.preview h3 { margin: 8px 0 8px; font-size: 21px; line-height: 1.22; letter-spacing: -.024em; font-weight: 600; }
.preview p { margin: 0 0 8px; color: #424245; line-height: 1.55; font-size: 14.5px; }

/* ---------- ключи ---------- */
.prov { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.prov button { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 14px; border-radius: 14px; border: 0; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); min-height: 86px; }
.prov button b { font-weight: 600; color: var(--ink); font-size: 14px; }
.prov button small { font-size: 12px; color: var(--muted); }
.prov button[aria-pressed="true"] { background: var(--raise-2); box-shadow: inset 0 0 0 1.5px var(--moon); }
.krow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.krow:first-of-type { border-top: 0; }
.krow .t { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
.krow .h { color: var(--muted); font-size: 13px; margin-top: 3px; max-width: 64ch; }
.kedit { grid-column: 1 / -1; display: flex; gap: 8px; }
.kedit .input { flex: 1; }

/* ---------- командная строка и разговор ---------- */
.cmd { position: fixed; z-index: 30; bottom: 22px; left: calc(var(--rail) + (100vw - var(--rail)) / 2); width: min(720px, calc(100vw - var(--rail) - 48px)); transform: translateX(-50%); }
.cmd form { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 8px 0 18px; border-radius: 999px; background: rgba(16, 17, 24, .86); border: 1px solid var(--line-2); box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(26px) saturate(1.2); backdrop-filter: blur(26px) saturate(1.2); transition: border-color .2s; }
.cmd form:focus-within { border-color: var(--line-3); }
.cmd .mk { --m: 22px; --cut: 4px; }
.cmd input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; font-weight: 500; }
.cmd input::placeholder { color: var(--faint); }
.cmd .kbd { font-size: 12px; color: var(--faint); border: 1px solid var(--line-2); border-radius: 7px; padding: 2px 7px; }
.cmd .send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--moon); color: #05060A; transition: transform .15s; }
.cmd .send:active { transform: scale(.94); }
.cmd .send svg { width: 18px; height: 18px; }
.talk { position: fixed; z-index: 29; left: calc(var(--rail) + (100vw - var(--rail)) / 2); bottom: 92px; width: min(720px, calc(100vw - var(--rail) - 48px)); max-height: min(62vh, 640px); transform: translateX(-50%); display: flex; flex-direction: column; border-radius: var(--r-xl); background: rgba(10, 11, 16, .9); border: 1px solid var(--line-2); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .95); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); animation: talk-in .32s var(--ease) both; }
@keyframes talk-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.talk-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.talk-h button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--raise); display: grid; place-items: center; color: var(--muted); }
.talk-h button svg { width: 15px; height: 15px; }
.talk-b { overflow: auto; padding: 16px 18px 18px; display: grid; gap: 14px; overscroll-behavior: contain; }
.msg { max-width: 92%; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; }
.msg.me { justify-self: end; padding: 10px 15px; border-radius: 18px 18px 6px 18px; background: var(--raise-2); }
.msg.it { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.msg.it .mk { --m: 22px; --cut: 4px; margin-top: 1px; }
.msg.it .body { display: grid; gap: 10px; }
.msg .via { font-size: 11.5px; color: var(--faint); }
.typing { display: inline-flex; gap: 4px; padding-top: 8px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--moon-2); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- вход ---------- */
.login { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .box { width: min(400px, 100%); text-align: center; animation: page-in .6s var(--ease) both; }
.login .h1 { margin-top: 26px; font-size: 40px; }
.login .lead { margin: 10px auto 28px; }
.login form { display: grid; gap: 10px; }
.login .input { height: 50px; text-align: center; font-size: 16px; border-radius: 999px; }
.login .btn { height: 50px; font-size: 15.5px; }
.login .err { min-height: 22px; color: #FF8FA6; font-size: 13.5px; }

/* ---------- уведомления ---------- */
.toasts { position: fixed; z-index: 50; top: 18px; right: 18px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 16px; border-radius: 14px; background: #16171E; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px #000; font-size: 14px; animation: page-in .3s var(--ease) both; }
.toast.err { border-color: rgba(255, 45, 85, .5); }

/* ---------- телефон и узкое окно ---------- */
.mtop { display: none; }
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 380px; }
  .kpis, .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prov { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --rail: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; z-index: 40; inset: auto 0 0 0; top: auto; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(7, 8, 13, .9); }
  .rail .brand, .rail-foot, .demo-flag { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; gap: 0; }
  .nav a { flex-direction: column; gap: 3px; height: 52px; padding: 6px 4px 0; font-size: 10.5px; border-radius: 10px; }
  .nav a[aria-current="page"]::before { display: none; }
  .nav a.extra { display: none; }
  .nav .count { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .main { padding: 18px 18px 190px; }
  .mtop { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
  .mtop b { font-weight: 600; }
  .mtop .sp { margin-left: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .orb { max-width: 400px; justify-self: center; }
  .projects, .news-wrap, .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .gauges { grid-template-columns: minmax(0, 1fr); }
  .cmd { left: 50%; width: calc(100vw - 24px); bottom: calc(76px + env(safe-area-inset-bottom)); }
  .cmd form { height: 52px; }
  .cmd .kbd { display: none; }
  .talk { left: 50%; width: calc(100vw - 16px); bottom: calc(136px + env(safe-area-inset-bottom)); max-height: 58vh; }
  .mets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prov { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dcard { grid-template-columns: minmax(0, 1fr); }
  .dcard .ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
