/* ================= Бренд, карта, общие блоки ================= */

/* ---------- логотип ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand .logo-svg { width: 46px; height: 46px; flex: none; overflow: visible; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark { font-weight: 800; font-size: 1.55rem; letter-spacing: .04em; display: inline-flex; }
.wordmark .twin { -webkit-text-fill-color: transparent; -webkit-text-stroke: 1.3px currentColor; margin-left: .02em; }
.brand-caption { margin-top: 4px; font-size: .56rem; line-height: 1.25; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.brand-light { color: #e8f4f8; }
.brand-light .brand-caption { color: #7f97a7; }
.logo-orbit-dot { transform-origin: 32px 32px; }
.logo:hover .logo-orbit-dot { animation: orbit 1.6s ease-in-out; }
.logo:hover .logo-dots circle { animation: sample .8s ease-in-out; }
.logo-dots circle:nth-child(2) { animation-delay: .06s; } .logo-dots circle:nth-child(3) { animation-delay: .12s; }
.logo-dots circle:nth-child(4) { animation-delay: .18s; } .logo-dots circle:nth-child(5) { animation-delay: .24s; }
.logo-dots circle:nth-child(6) { animation-delay: .3s; } .logo-dots circle:nth-child(7) { animation-delay: .36s; }
@keyframes orbit { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes sample { 50% { fill: #3ee0c8; } }

.account-link { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- общие ---------- */
.mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.big-link { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.price-old { color: var(--muted); font-weight: 500; font-size: .85em; margin-right: 4px; }
.badge-inline { position: static; display: inline-block; margin-left: 6px; background: var(--accent); }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; font-size: .85rem; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.consent input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.consent.has-error { color: var(--danger); }
.footer-note { margin-top: 40px; font-size: .8rem; color: #6f8797; max-width: 900px; }
.footer-bottom a { color: #9fb3c1; }

.disclaimer { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; margin: 32px 0; border-radius: var(--radius); background: #fff8ec; border: 1px solid #f2dfbd; color: #6d5427; font-size: .92rem; line-height: 1.55; }
.disclaimer svg { flex: none; margin-top: 2px; color: #d49a3a; }
.disclaimer-compact { margin-top: 40px; }
.dc-note { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: rgba(27, 179, 154, .09); font-size: .92rem; }

/* сетка-«миллиметровка» в тёмных блоках */
.hero-grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(62, 224, 200, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(62, 224, 200, .05) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%); }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 40px; }
.hero-stats span { display: block; max-width: 170px; line-height: 1.35; }
.live-demo { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- промо центра данных ---------- */
.dc-promo { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.checks-light li { color: #cfdde6; }
.dc-promo .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.dc-mock { background: #0b2233; border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg); transform: perspective(1200px) rotateY(-6deg) rotateX(3deg); }
.dc-mock-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; color: #9fb3c1; font-size: .85rem; }
.dc-mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.dc-mock-bar b { margin-left: 10px; font-weight: 600; }
.dc-mock-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.dc-mock-kpi div { background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 10px 12px; }
.dc-mock-kpi small { display: block; color: #7f97a7; font-size: .72rem; }
.dc-mock-kpi b { font-size: 1.4rem; color: #fff; }
.dc-mock-kpi .ok, .kpi .ok { color: var(--accent-2); } .dc-mock-kpi .warn { color: #f0a830; }
.dc-mock-tiles { display: grid; gap: 10px; }
.dc-mock-tile { background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 12px; }
.dc-mock-name { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: .9rem; }
.dc-mock-name i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.dc-mock-vals { display: flex; gap: 18px; margin: 8px 0 4px; color: #fff; font-weight: 800; }
.dc-mock-vals small { display: block; color: #7f97a7; font-weight: 500; font-size: .7rem; }
.dc-mock-tile svg { width: 100%; height: 36px; }

/* ---------- карта ---------- */
.map { border-radius: var(--radius); overflow: hidden; background: #dfe9ef; z-index: 0; }
.map-small { height: 360px; }
.map-large { height: min(70vh, 640px); }
.map-dc { height: 100%; min-height: 360px; }
.geo-teaser { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.map-pin { position: relative; display: block; width: 28px; height: 36px; }
.map-pin i { position: absolute; left: 3px; top: 1px; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(7, 26, 40, .35); }
.map-pin-office i { background: var(--ink); } .map-pin-controller i { background: var(--brand); }
.map-pin-off i { background: #9aa9b3; } .map-pin-alarm i { background: var(--danger); animation: pulse-red 1.6s infinite; }
@keyframes pulse-red { 50% { box-shadow: 0 0 0 8px rgba(217, 83, 79, .25); } }
.map-legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px; font-size: .9rem; color: var(--ink-2); }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.lg-office { background: var(--ink); } .lg-station { background: var(--accent); } .lg-controller { background: var(--brand); }
.leaflet-popup-content { font-family: var(--font); }

/* ---------- о нас ---------- */
.about-teaser-inner { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: center; }
.about-teaser-mark, .about-hero-mark { color: var(--ink); }
.about-teaser-mark .logo-svg { width: 100%; height: auto; }
.about-hero { position: relative; overflow: hidden; background: radial-gradient(900px 500px at 85% 20%, #0f5a7a 0%, transparent 60%), var(--navy); color: #fff; padding: 56px 0 72px; }
.about-hero .lead { color: #b8cad6; }
.about-hero .eyebrow { color: var(--accent-2); }
.about-hero-inner { position: relative; display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: center; }
.about-hero-mark { color: #e8f4f8; }
.about-hero-mark .logo-svg { width: 100%; max-width: 320px; height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }
.crumbs-light, .crumbs-light a { color: #7f97a7; }
.founder { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.founder-photo { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; background: linear-gradient(160deg, #0f5a7a, #071a28); display: grid; place-items: center; overflow: hidden; }
.founder-photo::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(62, 224, 200, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(62, 224, 200, .08) 1px, transparent 1px); background-size: 24px 24px; }
.founder-initials { position: relative; font-size: 5rem; font-weight: 800; color: #fff; letter-spacing: -.04em; }
.founder-degree { position: absolute; bottom: 18px; right: 18px; padding: 6px 14px; border-radius: 999px; background: var(--accent-2); color: var(--ink); font-weight: 800; }
.founder-role { font-size: 1.1rem; font-weight: 600; color: var(--brand); }
.founder p { color: var(--ink-2); font-size: 1.05rem; }
.thesis { margin: 28px 0; padding: 24px 28px; border-left: 4px solid var(--accent); border-radius: 0 16px 16px 0; background: var(--bg-tint); font-size: 1.15rem; font-weight: 600; line-height: 1.5; color: var(--ink); }
.thesis small { display: block; margin-bottom: 8px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.value-card { padding: 28px; }
.value-card svg { width: 44px; height: 44px; color: var(--brand); margin-bottom: 14px; }
.value-card p { color: var(--ink-2); margin: 0; }
.eco { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.eco-list > div { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.eco-list > div:first-child { padding-top: 0; }
.eco-list b { font-family: "JetBrains Mono", monospace; font-size: 1.1rem; color: var(--accent); }
.eco-list p { margin: 0; color: var(--ink-2); }
.about-cta { text-align: center; padding-top: 24px; }
.about-cta .hero-actions { justify-content: center; margin-bottom: 0; }

/* политика */
.legal { max-width: 860px; }
.legal h2 { font-size: 1.3rem; margin-top: 36px; }
.legal p, .legal li { color: var(--ink-2); }

/* ---------- авторизация ---------- */
.auth { display: grid; place-items: center; padding: 56px 16px 88px; background: linear-gradient(180deg, var(--bg-tint), #fff); }
.auth-card { width: 100%; max-width: 420px; padding: 36px; }
.auth-card-wide { max-width: 620px; }
.auth-card h1 { font-size: 1.6rem; text-align: center; }
.auth-mark { display: flex; justify-content: center; color: var(--ink); margin-bottom: 12px; }
.auth-mark .logo-svg { width: 64px; height: 64px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: .92rem; }

/* ---------- кабинет ---------- */
.account-shell { background: var(--bg-tint); padding: 32px 0 88px; min-height: 70vh; }
.account-grid { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.account-side { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.account-user { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.account-user b { display: block; font-size: .95rem; }
.account-user small { color: var(--muted); font-size: .8rem; word-break: break-all; }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--brand)); color: #fff; font-weight: 800; }
.discount-badge { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(27, 179, 154, .1); color: var(--ink-2); font-size: .88rem; }
.discount-badge b { color: var(--accent); }
.account-nav { display: grid; gap: 2px; margin-bottom: 16px; }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.account-nav a:hover, .account-nav a.active { background: var(--bg-tint); color: var(--ink); }
.account-nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
.account-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-main { min-width: 0; }
.account-main h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.dc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 20px; }
.dc-head h1 { margin: 0; }
.dc-head .eyebrow { margin-bottom: 4px; }
.dc-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.claim-card { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: end; padding: 24px; margin-bottom: 20px; }
.claim-card h3 { margin-bottom: 4px; }
.claim-card p { margin: 0; }
.claim-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.claim-fields .field { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.kpi small { display: block; color: var(--muted); font-weight: 600; font-size: .82rem; }
.kpi b { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi-time b { font-size: 1.2rem; line-height: 2.1; }
.kpi .alarm, .tile-alarm { color: var(--danger); }
.dc-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: stretch; }
.tiles { display: grid; gap: 14px; align-content: start; }
.tile { display: block; padding: 18px 20px; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.tile:hover { color: var(--ink); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tile-head b { display: block; }
.tile-head small { color: var(--muted); font-size: .82rem; }
.tile-alarm { margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: #fdecec; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.status-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #b7c4cc; }
.status-dot.on { background: var(--accent); box-shadow: 0 0 0 4px rgba(27, 179, 154, .18); }
.tile-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tv { padding: 8px 10px; border-radius: 10px; background: var(--bg-tint); border-left: 3px solid transparent; }
.tv small { display: block; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tv em { font-style: normal; font-size: .72rem; color: var(--muted); margin-left: 3px; }

.tile-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.dc-map-card { padding: 6px; min-height: 360px; }
.section-head-sm { margin: 36px 0 16px; }
.offer-card { position: relative; padding: 24px; }
.offer-card .badge { position: static; display: inline-block; margin-bottom: 10px; }
.offer-personal { border-color: rgba(27, 179, 154, .5); background: linear-gradient(160deg, #fff, #effaf8); }
.promo { display: inline-block; margin: 6px 0 4px; padding: 6px 14px; border: 2px dashed var(--accent); border-radius: 10px; font-family: "JetBrains Mono", monospace; font-weight: 700; letter-spacing: .08em; }
.offer-until { display: block; margin-top: 8px; }
.discount-hero { display: flex; align-items: center; gap: 28px; padding: 24px 28px; margin-bottom: 20px; background: linear-gradient(135deg, var(--navy), #0f5a7a); color: #fff; border: 0; }
.discount-hero small { display: block; color: #9fb3c1; }
.discount-hero b { font-size: 2.6rem; font-weight: 800; color: var(--accent-2); }
.discount-hero p { margin: 0; color: #cfdde6; }
.status-pill { padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--bg-tint); }
.status-pill-work { background: #fff3dc; color: #99650f; } .status-pill-done { background: #e3f6f2; color: #13806d; }
.status-pill-cancel { color: var(--muted); }

/* страница прибора */
.device-title { display: flex; align-items: center; gap: 14px; }
.device-meta { margin: 6px 0 0; font-size: .92rem; }
.sub-badge { padding: 6px 14px; border-radius: 999px; background: #e3f6f2; color: #13806d; font-weight: 600; font-size: .85rem; }
.sub-soon { background: #fff3dc; color: #99650f; } .sub-expired { background: #fdecec; color: var(--danger); }
.settings-card { padding: 24px; margin-bottom: 20px; }
.live-groups { display: grid; gap: 14px; margin-bottom: 20px; }
.live-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.live-group h3 { font-size: 1rem; margin-bottom: 12px; color: var(--ink-2); }
.live-group.lost { opacity: .6; }
.lost-badge { margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: #fdecec; color: var(--danger); font-size: .75rem; }
.live-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lc { padding: 12px 14px; border-radius: 12px; background: var(--bg-tint); border-left: 3px solid transparent; }
.lc small { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.lc b { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lc b em { font-style: normal; font-size: .78rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.tv.state-ok, .lc.state-ok { border-left-color: var(--accent); }
.tv.state-warn, .lc.state-warn { border-left-color: #f0a830; background: #fff8ec; }
.tv.state-alarm, .lc.state-alarm { border-left-color: var(--danger); background: #fdf0ef; }
.lc-note { display: block; font-size: .75rem; color: var(--ink-2); }
.state-alarm .lc-note { color: var(--danger); font-weight: 600; }
.live-time { margin: 0; }
.relays-card { padding: 18px 20px; margin-bottom: 20px; }
.relays { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.relay { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg-tint); font-weight: 600; font-size: .9rem; }
.relay i { width: 10px; height: 10px; border-radius: 50%; background: #b7c4cc; }
.relay small { margin-left: auto; color: var(--muted); font-weight: 500; }
.relay.on i { background: var(--accent); box-shadow: 0 0 0 4px rgba(27, 179, 154, .2); }
.charts-card { padding: 22px; }
.charts-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.charts-toolbar h2 { font-size: 1.3rem; margin: 0 auto 0 0; }
.chips-tight { margin: 0; }
.chips-tight .chip { padding: 6px 12px; font-size: .85rem; cursor: pointer; font-family: var(--font); }
.range { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.range input { padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: .85rem; color: var(--ink); }
.param-picker { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.picker-group small { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.pick { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; font-size: .88rem; cursor: pointer; }
.pick input { accent-color: var(--brand); }
.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 10px; }
.chart-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 8px; }
.chart-title { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: .92rem; }
.chart-title small { color: var(--muted); font-weight: 500; }
.chart-last { margin-left: auto; font-size: 1.1rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.chart-canvas { position: relative; height: 190px; }

/* админка */
.input-sm { padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; font-size: .88rem; max-width: 100%; }
input.input-sm[type=number] { width: 70px; }
.input-wide { width: 220px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; margin-bottom: 16px; }
.inline-form input, .inline-form select { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }
.code { padding: 2px 8px; border-radius: 6px; background: var(--bg-tint); font-weight: 700; }
.link-btn { border: 0; background: none; color: var(--brand); cursor: pointer; font: inherit; padding: 4px; }
.link-btn.danger { color: var(--danger); }
.nowrap { white-space: nowrap; }

/* ---------- адаптив ---------- */
@media (max-width: 1024px) {
  .dc-promo, .geo-teaser, .about-hero-inner, .founder, .eco, .dc-layout, .claim-card { grid-template-columns: 1fr; }
  .about-teaser-inner { grid-template-columns: 160px 1fr; gap: 32px; }
  .about-hero-mark .logo-svg { max-width: 200px; }
  .founder-photo { max-width: 280px; }
  .dc-mock { transform: none; }
  .account-grid { grid-template-columns: 1fr; }
  .account-side { position: static; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
  .account-nav { grid-column: 1 / -1; grid-auto-flow: column; overflow-x: auto; margin: 0; }
  .account-nav a { white-space: nowrap; }
  .account-side > form, .discount-badge { margin: 0; }
  .account-side > form { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .claim-fields { grid-template-columns: 1fr; }
  .brand .logo-svg { width: 40px; height: 40px; }
  .wordmark { font-size: 1.35rem; }
  .brand-caption { font-size: .5rem; }
  .about-teaser-inner { grid-template-columns: 1fr; }
  .about-teaser-mark { max-width: 140px; }
  .auth-card { padding: 24px; }
  .discount-hero { flex-direction: column; align-items: flex-start; gap: 8px; }
  .map-large { height: 60vh; }
  .input-wide { width: 160px; }
}
