/* CRM «Электрика Елец» — стиль iOS / Apple Human Interface.
   Mobile-first: iPhone SE … Pro Max, Android; от 900px — боковая панель. */

:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --label: #000000;
  --label-2: rgba(60, 60, 67, .6);
  --label-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .18);
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --blue: #007AFF;
  --green: #34C759;
  --orange: #FF9500;
  --red: #FF3B30;
  --yellow: #FFCC00;
  --purple: #AF52DE;
  --teal: #30B0C7;
  --indigo: #5856D6;
  --bar: rgba(249, 249, 249, .82);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 14px;
  --radius-lg: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --tabbar-h: 56px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1C1C1E;
    --card-2: #2C2C2E;
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, .6);
    --label-3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .55);
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .36);
    --blue: #0A84FF;
    --green: #30D158;
    --orange: #FF9F0A;
    --red: #FF453A;
    --yellow: #FFD60A;
    --purple: #BF5AF2;
    --teal: #40C8E0;
    --indigo: #5E5CE6;
    --bar: rgba(22, 22, 24, .78);
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E; --label: #FFFFFF;
  --label-2: rgba(235, 235, 245, .6); --label-3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .55); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .36);
  --blue: #0A84FF; --green: #30D158; --orange: #FF9F0A; --red: #FF453A; --yellow: #FFD60A;
  --purple: #BF5AF2; --teal: #40C8E0; --indigo: #5E5CE6; --bar: rgba(22, 22, 24, .78); --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.35 var(--font);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--blue); text-decoration: none; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- каркас ---------- */
#app { min-height: 100vh; min-height: 100dvh; }
.main {
  padding: calc(var(--safe-top) + 8px) calc(16px + var(--safe-right)) calc(var(--tabbar-h) + var(--safe-bottom) + 24px) calc(16px + var(--safe-left));
  max-width: 1180px;
  margin: 0 auto;
}
.large-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 16px; min-height: 48px; }
.large-title h1 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.large-title .sub { color: var(--label-2); font-size: 15px; margin-top: 4px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  padding: 6px calc(8px + var(--safe-right)) calc(6px + var(--safe-bottom)) calc(8px + var(--safe-left));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep);
}
.tabbar a {
  flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--label-2); font-size: 10.5px; font-weight: 500; padding: 4px 0; min-height: 44px;
}
.tabbar a.on { color: var(--blue); }
.tabbar svg.i { width: 26px; height: 26px; }
.tabbar .dot { position: absolute; transform: translate(12px, -2px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.tabbar .ico { position: relative; display: flex; }

.sidebar { display: none; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 2px;
    position: fixed; top: 0; bottom: 0; left: 0; width: 248px; z-index: 30;
    padding: calc(24px + var(--safe-top)) 12px 24px calc(12px + var(--safe-left));
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-right: .5px solid var(--sep);
  }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; padding: 4px 10px 18px; }
  .sidebar .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(160deg, #FFD60A, #FF9F0A); display: grid; place-items: center; color: #000; }
  .sidebar a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--label); font-size: 15px; font-weight: 500; }
  .sidebar a svg.i { color: var(--blue); }
  .sidebar a.on { background: var(--blue); color: #fff; }
  .sidebar a.on svg.i { color: #fff; }
  .sidebar .count { margin-left: auto; font-size: 13px; color: var(--label-2); }
  .sidebar a.on .count { color: rgba(255, 255, 255, .8); }
  .main { margin-left: 248px; padding: 28px 40px 60px; }
  .large-title h1 { font-size: 34px; }
}

/* ---------- карточки и списки ---------- */
.section { margin: 26px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 8px; }
.section-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.section-head a, .section-head button { font-size: 15px; }
.caption { color: var(--label-2); font-size: 13px; padding: 6px 4px 0; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card.pad { padding: 16px; }

.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px;
  position: relative; width: 100%; background: none; border: 0; text-align: left; cursor: pointer;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.row.icon-row + .row::before, .row + .row.icon-row::before { left: 60px; }
.row:active { background: var(--fill); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 14px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .v { color: var(--label-2); font-size: 15px; white-space: nowrap; }
.row .chev { color: var(--label-3); width: 14px; height: 14px; stroke-width: 2.6; }
.app-ico { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex: none; }
.app-ico svg.i { width: 18px; height: 18px; stroke-width: 2; }

/* ---------- плитки KPI ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 16px; min-height: 104px; display: flex; flex-direction: column; }
.tile .k { display: flex; align-items: center; gap: 6px; color: var(--label-2); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.tile .k svg.i { width: 16px; height: 16px; stroke-width: 2.2; }
.tile .n { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: auto; font-variant-numeric: tabular-nums; }
.tile .d { font-size: 13px; color: var(--label-2); margin-top: 2px; }

.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- элементы управления ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 17px; white-space: nowrap;
}
.btn:active { opacity: .7; }
.btn.tinted { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.btn.gray { background: var(--fill); color: var(--label); }
.btn.danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.btn.green { background: var(--green); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 15px; border-radius: 17px; }
.btn.block { width: 100%; }
.btn.wrap { white-space: normal; text-align: left; justify-content: flex-start; height: auto; padding: 12px 18px; line-height: 1.3; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--fill); color: var(--blue); display: grid; place-items: center; cursor: pointer; }
.icon-btn.blue { background: var(--blue); color: #fff; }

.segmented {
  display: flex; padding: 2px; border-radius: 9px; background: var(--fill); gap: 0; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: 1; min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: none;
  font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--label);
}
.segmented button.on { background: var(--card); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
:root[data-theme="dark"] .segmented button.on { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented button.on { background: #636366; } }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 34px; padding: 0 14px; border-radius: 17px; border: 0; background: var(--fill); font-size: 15px; font-weight: 500; cursor: pointer; scroll-snap-align: start; }
.chip.on { background: var(--blue); color: #fff; }

.search { display: flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px; padding: 0 10px; height: 38px; color: var(--label-2); margin-bottom: 12px; }
.search input { flex: 1; border: 0; background: none; outline: none; font-size: 17px; color: var(--label); min-width: 0; }
.search svg.i { width: 18px; height: 18px; }

/* поля формы в стиле «Настроек» */
.field { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 16px; position: relative; }
.field + .field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.field label { flex: none; width: 34%; max-width: 150px; font-size: 17px; }
.field input, .field select, .field textarea {
  flex: 1; min-width: 0; border: 0; outline: none; background: none; text-align: right; font-size: 17px; color: var(--label-2);
  padding: 8px 0; -webkit-appearance: none; appearance: none;
}
.field textarea { text-align: left; resize: vertical; min-height: 80px; color: var(--label); }
.field.col { flex-direction: column; align-items: stretch; gap: 4px; }
.field.col label { width: auto; max-width: none; font-size: 13px; color: var(--label-2); text-transform: uppercase; letter-spacing: .02em; padding-top: 6px; }
.field.col input, .field.col textarea { text-align: left; color: var(--label); }
.field input:focus, .field textarea:focus { color: var(--label); }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--fill-2); border-radius: 16px; transition: background .25s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .25s cubic-bezier(.3, .7, .4, 1); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------- бейджи ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.blue { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.badge.green { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.badge.orange { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.badge.red { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.badge.gray { background: var(--fill); color: var(--label-2); }
.badge.purple { background: color-mix(in srgb, var(--purple) 15%, transparent); color: var(--purple); }

/* ---------- воронка (канбан) ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 calc(-16px - var(--safe-right)) 0 calc(-16px - var(--safe-left)); padding: 0 16px 12px; scrollbar-width: none; }
.board::after { content: ""; flex: 0 0 4px; }
.board::-webkit-scrollbar { display: none; }
.col { flex: 0 0 min(86vw, 320px); scroll-snap-align: start; }
@media (min-width: 900px) { .board { margin: 0; padding: 0 0 12px; } .col { flex-basis: 290px; } }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; font-weight: 600; font-size: 15px; }
.col-head .cnt { color: var(--label-2); font-weight: 500; }
.col-head .bar { width: 10px; height: 10px; border-radius: 50%; }
.col-body { display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.deal-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; cursor: pointer; border: 0; text-align: left; width: 100%; transition: transform .15s; }
.deal-card:active { transform: scale(.98); }
.deal-card .top { display: flex; align-items: center; gap: 8px; }
.deal-card .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.deal-card .meta { color: var(--label-2); font-size: 14px; margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.deal-card .last { color: var(--label-2); font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty-col { color: var(--label-3); font-size: 14px; text-align: center; padding: 18px 0; border: 1.5px dashed var(--sep); border-radius: var(--radius); }

/* ---------- переписка ---------- */
.chat { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--card); border-radius: var(--radius); max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.bubble { max-width: 80%; padding: 8px 13px; border-radius: 18px; font-size: 16px; line-height: 1.3; white-space: pre-wrap; word-wrap: break-word; }
.bubble.client { align-self: flex-start; background: var(--card-2); border-bottom-left-radius: 5px; }
.bubble.bot { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.bubble.manager { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; }
.bubble-meta { font-size: 11px; color: var(--label-2); padding: 0 6px; }
.bubble-meta.right { align-self: flex-end; }
.sys { align-self: center; font-size: 12px; color: var(--label-2); background: var(--fill); padding: 3px 10px; border-radius: 10px; margin: 6px 0; }
.composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.composer textarea { flex: 1; min-height: 38px; max-height: 140px; padding: 8px 14px; border-radius: 19px; border: .5px solid var(--sep); background: var(--card); outline: none; resize: none; font-size: 16px; }

/* ---------- графики ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--label-2); font-size: 11px; font-family: var(--font); }
.chart .grid { stroke: var(--sep); stroke-width: .5; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--label-2); padding: 8px 0 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.hbar .lbl { width: 38%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { flex: 1; height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 5px; }
.hbar .val { width: 84px; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--label-2); }

/* ---------- таблицы метрик ---------- */
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.metric { padding: 14px 16px; border-top: .5px solid var(--sep); }
.metric .k { font-size: 13px; color: var(--label-2); }
.metric .n { font-size: 20px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.metric .cmp { font-size: 12px; margin-top: 2px; }
.up { color: var(--green); } .down { color: var(--red); }

/* ---------- объявления ---------- */
.ad-card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--card-2); }
.shots::-webkit-scrollbar { display: none; }
.shots img { flex: 0 0 100%; width: 100%; min-width: 0; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; scroll-snap-align: center; }
.shots-wrap { position: relative; }
.shot-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 18px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .8); color: #000; font-size: 24px; line-height: 1; display: grid; place-items: center; padding-bottom: 3px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .2s; }
.shot-nav.prev { left: 10px; } .shot-nav.next { right: 10px; }
.shots-wrap:hover .shot-nav { opacity: 1; }
@media (hover: none) { .shot-nav { display: none; } }
.shot-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.shot-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .45); transition: background .2s, transform .2s; }
.shot-dots i.on { background: #fff; transform: scale(1.15); }
.ad-body { padding: 14px 16px 16px; }
.ad-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.ad-text { color: var(--label-2); font-size: 15px; margin-top: 8px; white-space: pre-wrap; max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ad-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ads-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .ads-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- шторка (bottom sheet) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: calc(100dvh - var(--safe-top) - 10px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 14px 14px 0 0;
  padding: 0 calc(16px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(16px + var(--safe-left));
  transform: translateY(100%); transition: transform .38s cubic-bezier(.2, .9, .25, 1);
}
.sheet.show { transform: none; }
.sheet .grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 7px auto 2px; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0 12px; background: var(--bg); }
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 600; text-align: center; flex: 1; }
.sheet-head button { background: none; border: 0; color: var(--blue); font-size: 17px; cursor: pointer; min-width: 64px; padding: 8px 0; }
.sheet-head button.strong { font-weight: 600; text-align: right; }
@media (min-width: 900px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 640px; max-height: 86vh; border-radius: 16px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .25s, opacity .25s; padding-bottom: 24px; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grabber { display: none; }
}
.sheet.full { height: calc(100dvh - var(--safe-top) - 10px); }
@media (min-width: 900px) { .sheet.full { width: 820px; height: 90vh; } }

/* ---------- прочее ---------- */
.toast { position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); z-index: 80; transform: translate(-50%, -150%); background: var(--card); color: var(--label); box-shadow: 0 8px 32px rgba(0, 0, 0, .2); border-radius: 22px; padding: 11px 18px; font-size: 15px; font-weight: 500; transition: transform .35s cubic-bezier(.2, .9, .25, 1); max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); }
.empty { text-align: center; color: var(--label-2); padding: 40px 20px; }
.empty .big { font-size: 44px; margin-bottom: 8px; }
.muted { color: var(--label-2); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hstack { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--fill-2); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 50%, var(--fill) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.fab { position: fixed; right: calc(20px + var(--safe-right)); bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px); z-index: 25; width: 56px; height: 56px; border-radius: 28px; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px color-mix(in srgb, var(--blue) 45%, transparent); cursor: pointer; }
.fab svg.i { width: 26px; height: 26px; stroke-width: 2.4; }
@media (min-width: 900px) { .fab { bottom: 32px; right: 40px; } }
.yaml { width: 100%; min-height: 60vh; border: 0; border-radius: var(--radius); background: var(--card); padding: 14px; font: 13px/1.5 ui-monospace, "SF Mono", Menlo, monospace; outline: none; resize: vertical; }

/* запуск */
.launch-banner { display: block; color: var(--label); margin-bottom: 16px; }
.launch-banner .grow { flex: 1; min-width: 0; }
.progress { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin-top: 12px; }
.progress.big { height: 10px; border-radius: 5px; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #30D1A0); transition: width .5s; }
.launch-pct { font-size: 48px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.step-row { gap: 10px; cursor: default; }
.step-row .step-open { background: none; border: 0; text-align: left; padding: 0; cursor: pointer; min-width: 0; }
.step-row.is-done .t { color: var(--label-2); text-decoration: line-through; text-decoration-color: var(--label-3); }
.check { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--label-3); background: none; display: grid; place-items: center; color: transparent; cursor: pointer; padding: 0; transition: background .2s, border-color .2s; }
.check svg.i { width: 16px; height: 16px; stroke-width: 3; }
.check.on { background: var(--green); border-color: var(--green); color: #fff; }
.check[disabled] { cursor: default; }
.howto { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: how; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.howto li { counter-increment: how; position: relative; padding: 14px 16px 14px 56px; font-size: 16px; line-height: 1.45; }
.howto li + li { border-top: .5px solid var(--sep); }
.howto li::before { content: counter(how); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 13px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; background: var(--fill); padding: 2px 6px; border-radius: 6px; word-break: break-all; -webkit-user-select: all; user-select: all; }

/* фото работ */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 13px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.ph.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px dashed color-mix(in srgb, var(--blue) 45%, transparent); background: color-mix(in srgb, var(--blue) 7%, transparent); }

/* титульная страница: неон, всегда тёмная */
.neon-login {
  position: fixed; inset: 0; overflow-y: auto; color: #fff; color-scheme: dark;
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(255, 159, 10, .16), transparent 70%),
    radial-gradient(55% 55% at 10% 85%, rgba(10, 132, 255, .22), transparent 70%),
    radial-gradient(40% 40% at 50% 50%, rgba(191, 90, 242, .10), transparent 70%),
    #04060d;
}
.nl-bg { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nl-trace { fill: none; stroke-width: 2; stroke-opacity: .16; stroke-linejoin: round; }
.nl-pulse { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 36 1400; stroke-dashoffset: 0; animation: nlFlow linear infinite; }
.nl-pad { fill: #04060d; stroke-width: 2; stroke-opacity: .55; }
@keyframes nlFlow { to { stroke-dashoffset: -1436; } }
.nl-bolt { animation: nlFlicker 6s infinite; transform-origin: center; }
@keyframes nlFlicker { 0%, 100% { opacity: .9; } 46% { opacity: .9; } 48% { opacity: .35; } 50% { opacity: 1; } 52% { opacity: .5; } 54% { opacity: .95; } }

/* затемнение под текстом, чтобы дорожки платы не мешали читать */
.neon-login::before { content: ""; position: fixed; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 6, 13, .55), rgba(4, 6, 13, .35) 40%, rgba(4, 6, 13, .7)); }
@media (min-width: 900px) {
  .neon-login::before { background: linear-gradient(90deg, rgba(4, 6, 13, .82) 0%, rgba(4, 6, 13, .55) 45%, rgba(4, 6, 13, 0) 70%); }
}

/* телефон: заголовок → вход → возможности; компьютер: слева оффер и возможности, справа вход */
.nl-wrap {
  position: relative; min-height: 100dvh; display: grid; gap: 24px; align-content: center;
  grid-template-areas: "offer" "card" "feats";
  padding: calc(24px + var(--safe-top)) calc(20px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(20px + var(--safe-left));
  max-width: 1180px; margin: 0 auto;
}
.nl-offer { grid-area: offer; }
.nl-feats { grid-area: feats; }
.nl-card { grid-area: card; }
@media (min-width: 900px) {
  .nl-wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); grid-template-areas: "offer card" "feats card";
    column-gap: 64px; row-gap: 8px; align-content: center; align-items: center; }
  .nl-offer { align-self: end; }
  .nl-feats { align-self: start; }
}
@media (max-width: 899px) { .nl-offer h1 { margin-top: 16px; } .nl-sub { margin-bottom: 4px; } }

.nl-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: rgba(235, 235, 245, .75);
  padding: 6px 14px 6px 6px; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.nl-logo { width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; color: #000;
  background: linear-gradient(160deg, #FFE45C, #FF9F0A); box-shadow: 0 0 18px rgba(255, 179, 0, .55); }
.nl-logo svg.i { width: 18px; height: 18px; stroke-width: 2.4; }
.nl-offer h1 { font-size: clamp(30px, 5.2vw, 54px); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; margin: 20px 0 14px; }
.nl-accent { background: linear-gradient(90deg, #40C8E0, #0A84FF 45%, #BF5AF2); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(10, 132, 255, .45)); }
.nl-sub { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.45; color: rgba(235, 235, 245, .72); margin: 0 0 24px; max-width: 620px; }
.nl-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) and (max-width: 899px) { .nl-feats { grid-template-columns: 1fr 1fr; } }
.nl-feats li { display: flex; gap: 14px; align-items: flex-start; }
.nl-feats b { display: block; font-size: 16px; font-weight: 650; }
.nl-feats span:not(.nl-ico) { display: block; font-size: 14px; line-height: 1.4; color: rgba(235, 235, 245, .6); margin-top: 2px; }
.nl-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 35%, transparent), inset 0 0 10px color-mix(in srgb, var(--c) 15%, transparent); }
.nl-ico svg.i { width: 20px; height: 20px; }

.nl-card { position: relative; text-align: center; padding: 30px 26px 22px; border-radius: 26px;
  background: rgba(22, 24, 34, .55); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(10, 132, 255, .08), 0 0 60px rgba(10, 132, 255, .12); }
.nl-card-logo { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center; color: #000;
  background: linear-gradient(160deg, #FFE45C, #FF9F0A); box-shadow: 0 0 34px rgba(255, 159, 10, .55); }
.nl-card-logo svg.i { width: 38px; height: 38px; stroke-width: 2.2; }
.nl-card h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.nl-card-sub { color: rgba(235, 235, 245, .55); font-size: 14px; margin-top: 4px; }
.nl-card input { width: 100%; height: 52px; margin: 22px 0 12px; padding: 0 16px; border-radius: 14px; font-size: 17px; color: #fff; outline: none;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .14); transition: border-color .2s, box-shadow .2s; }
.nl-card input:focus { border-color: #0A84FF; box-shadow: 0 0 0 4px rgba(10, 132, 255, .25); }
.nl-btn { width: 100%; height: 52px; border: 0; border-radius: 14px; cursor: pointer; font-size: 17px; font-weight: 700; color: #000;
  background: linear-gradient(90deg, #FFE45C, #FF9F0A); box-shadow: 0 8px 28px rgba(255, 159, 10, .4); transition: transform .15s, box-shadow .2s; }
.nl-btn:hover { box-shadow: 0 10px 36px rgba(255, 159, 10, .6); }
.nl-btn:active { transform: scale(.98); }
.nl-card-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 13px; color: rgba(235, 235, 245, .45); }
.nl-card-foot svg.i { width: 15px; height: 15px; color: #30D158; }
@media (max-width: 899px) { .nl-card { max-width: 440px; width: 100%; justify-self: center; } }
@media (prefers-reduced-motion: reduce) { .nl-pulse { display: none; } .nl-bolt { animation: none; } }

/* вход (старый вид — не используется) */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login .box { width: 100%; max-width: 360px; text-align: center; }
.login .logo { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; background: linear-gradient(160deg, #FFD60A, #FF9F0A); display: grid; place-items: center; color: #000; box-shadow: 0 10px 30px rgba(255, 159, 10, .35); }
.login .logo svg.i { width: 44px; height: 44px; stroke-width: 2.2; }
.login h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.02em; }
.login input { width: 100%; height: 50px; border-radius: 12px; border: 0; background: var(--card); padding: 0 16px; font-size: 17px; margin: 22px 0 12px; outline: none; box-shadow: var(--shadow); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
