
:root {
  --gold: #D4A017;
  --gold-light: #F5C842;
  --dark: #111110;
  --dark2: #1C1C1A;
  --mid: #4A4A45;
  --muted: #7C7A72;
  --line: #E5E1D8;
  --surface: #FAFAF7;
  --white: #FFFFFF;
  --danger: #C0392B;
  --danger-pale: #FDF0EE;
  --success: #1E7A4E;
  --success-pale: #EAF5EF;
  --info: #1A5EA8;
  --info-pale: #EBF2FC;
  --warn: #B06000;
  --warn-pale: #FDF4E3;
  --radius: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--surface);
  color: var(--dark);
  font-size: 14px;
  line-height: 1.55;
}

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--dark);
  color: white;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.logo { display: none; padding: 24px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { font-weight: 800; color: var(--gold-light); letter-spacing: .04em; }
.sub { font-size: 11px; color: rgba(255,255,255,.38); margin-top: 3px; }
.nav { padding: 12px 0; flex: 1; }
.nav-section {
  padding: 10px 20px 5px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.28);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  cursor: pointer;
  color: rgba(255,255,255,.62);
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: rgba(212,160,23,.13); color: var(--gold-light); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: var(--gold);
}
.badge {
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.46);
  font-size: 11px;
  padding: 1px 6px;
}
.done .badge { background: rgba(30,122,78,.26); color: #5BC98A; }
.footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.35);
  font-size: 11px;
}
.footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 8px; }

.main { margin-left: 260px; width: min(1120px, calc(100% - 260px)); padding: 32px 40px 64px; }
.section { display: none; }
.section.active { display: block; }
.page-header { margin-bottom: 24px; }
h1 {
  margin: 0 0 5px;
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: 0;
}
.page-header p { margin: 0; color: var(--muted); font-size: 16px; }
.progress-row { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.progress-bar { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); transition: width .25s ease; }
.progress-label { width: 90px; color: var(--muted); font-weight: 700; text-align: right; white-space: nowrap; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.card-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.card-sub { color: var(--muted); margin-bottom: 18px; }
.grid { display: grid; gap: 14px; }
.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
label { color: var(--mid); font-weight: 700; }
.req { color: var(--danger); }
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  background: white;
  color: var(--dark);
  font: inherit;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237C7A72' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
select:hover { border-color: #c8c5b8; }
textarea { min-height: 78px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,.13);
}
.inline { display: flex; gap: 9px; align-items: stretch; }
.inline input { flex: 1; min-width: 0; }

.btn {
  border: 0;
  border-radius: var(--radius);
  padding: 11px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}
.btn-dark { background: var(--dark); color: white; }
.btn-dark:hover { background: var(--dark2); }
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--mid); border: 1.5px solid var(--line); }
.btn-outline:hover { color: var(--dark); border-color: var(--dark); }
.btn-small { padding: 8px 12px; min-height: 36px; font-size: 12px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,0,0,.08); color: var(--muted);
  font-size: 10px; font-weight: 700; cursor: pointer;
  margin-left: 4px; flex-shrink: 0;
  position: relative; top: -1px;
}
.tip-popup {
  display: none; position: fixed; z-index: 9999;
  background: #1a1a18; color: #fff;
  font-size: 12px; line-height: 1.5; font-weight: 400;
  padding: 10px 14px; border-radius: 8px;
  max-width: 280px; box-shadow: 0 4px 20px rgba(0,0,0,.3);
  pointer-events: none;
}
.tip-popup.visible { display: block; }
.loss-tip {
  font-size: 11px; color: #dc2626; margin-top: 5px;
  min-height: 0; transition: all .2s;
  font-style: italic; line-height: 1.4;
}
.btn-row-sticky {
  position: sticky; bottom: 0; z-index: 10;
  background: linear-gradient(to top, var(--surface) 80%, transparent);
  padding: 12px 0 8px; margin-top: 20px;
  display: flex; gap: 10px; flex-wrap: wrap;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  border-left: 4px solid var(--info);
  background: var(--info-pale);
  color: var(--info);
}
.alert.warn { background: var(--warn-pale); color: var(--warn); border-left-color: var(--gold); }
.alert.danger { background: var(--danger-pale); color: var(--danger); border-left-color: var(--danger); }
.alert.success { background: var(--success-pale); color: var(--success); border-left-color: var(--success); }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  border-top: 4px solid var(--gold);
}
.metric.danger { border-top-color: var(--danger); }
.metric.success { border-top-color: var(--success); }
.metric.info { border-top-color: var(--info); }
.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}
.metric-value { font-size: 27px; font-weight: 900; line-height: 1; }
.metric-sub { color: var(--muted); font-size: 12px; margin-top: 5px; }

.channel-list { display: grid; gap: 9px; }
.channel {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}
.channel.on { border-color: var(--gold); }
.ch-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.check {
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.channel.on .check { background: var(--gold); border-color: var(--gold); }
.channel.on .check::after { content: "OK"; font-weight: 900; }
.ch-title { flex: 1; font-weight: 800; }
.tag {
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  padding: 2px 8px;
  background: #F1EFE8;
  color: #5F5E5A;
}
.ch-body {
  border-top: 1px solid var(--line);
  padding: 14px;
  display: none;
}
.channel.on .ch-body { display: block; }

.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.score-label { width: 170px; color: var(--mid); font-weight: 700; }
.scorebar { flex: 1; height: 9px; border-radius: 5px; background: var(--line); overflow: hidden; }
.scorebar span { display: block; height: 100%; border-radius: 5px; }
.score-num { width: 44px; text-align: right; color: var(--muted); font-weight: 800; }

.report-box {
  background: #fff;
  color: #1a1a1a;
  border-radius: var(--radius-lg);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  font-family: inherit;
}
.rpt-header {
  background: #1a1a1a;
  color: #fff;
  padding: 28px 32px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.rpt-header h1 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.rpt-header-sub { font-size: 12px; color: rgba(255,255,255,.45); margin: 0; }
.rpt-header-right { text-align: right; flex-shrink: 0; }
.rpt-company-name { font-size: 17px; font-weight: 700; color: #f5c842; }
.rpt-company-meta { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 2px; }
.rpt-summary-block {
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 32px;
}
.rpt-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #9ca3af; margin-bottom: 10px;
}
.ai-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(245,200,66,.3);
  border-top-color: #f5c842;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.ai-loading-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; color: var(--muted); font-style: italic; font-size: 13px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.rpt-gen-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f5c842; color: #1a1a1a; border: none;
  border-radius: 8px; padding: 8px 16px; font-size: 13px;
  font-weight: 700; cursor: pointer; margin-bottom: 10px;
}
.rpt-gen-btn:hover { background: #e5b832; }
.rpt-gen-btn:disabled { opacity: .6; cursor: default; }
.rpt-summary-text { font-size: 14px; line-height: 1.7; color: #374151; }
.rpt-section {
  padding: 20px 32px;
  border-bottom: 1px solid #f0f0f0;
}
.rpt-section:last-of-type { border-bottom: none; }
.rpt-section-title {
  font-size: 10px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #9ca3af; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.rpt-section-title::after { content: ''; flex: 1; height: 1px; background: #f0f0f0; }
.rpt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.rpt-row {
  display: flex; justify-content: space-between;
  align-items: baseline; padding: 4px 0;
  font-size: 13px; border-bottom: 1px solid #f9f9f9;
}
.rpt-label { color: #6b7280; }
.rpt-val { font-weight: 600; color: #111; text-align: right; max-width: 55%; word-break: break-word; }
.rpt-val.pos { color: #16a34a; }
.rpt-val.neg { color: #dc2626; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rpt-table th {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #9ca3af;
  padding: 6px 10px; text-align: left; border-bottom: 2px solid #e5e7eb;
}
.rpt-table th:not(:first-child) { text-align: right; }
.rpt-table td { padding: 8px 10px; border-bottom: 1px solid #f5f5f5; color: #111; }
.rpt-table td:not(:first-child) { text-align: right; font-weight: 600; }
.rpt-table tfoot td { font-weight: 800; background: #f8f9fa; border-top: 2px solid #e5e7eb; border-bottom: none; }
.rpt-months { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 6px; }
.rpt-month { background: #f8f9fa; border-radius: 8px; padding: 12px; }
.rpt-month-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; margin-bottom: 6px; }
.rpt-month-net { font-size: 20px; font-weight: 800; margin-bottom: 3px; }
.rpt-month-net.pos { color: #16a34a; }
.rpt-month-net.neg { color: #dc2626; }
.rpt-month-sub { font-size: 11px; color: #6b7280; }
.rpt-verdict { border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-top: 12px; }
.rpt-verdict.good { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.rpt-verdict.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.rpt-verdict.bad  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.rpt-footer {
  background: #1a1a1a; padding: 14px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.rpt-footer-brand { color: #f5c842; font-weight: 700; font-size: 13px; }
.rpt-footer-contact { color: rgba(255,255,255,.4); font-size: 11px; }

.strategy-block {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
}
.strategy-block h3 { margin: 0 0 10px; font-size: 16px; }
.strategy-block ul { margin: 0; padding-left: 20px; }
.strategy-block li { margin-bottom: 5px; }

/* Priority 1 — highlighted */
.strategy-block.priority-1 {
  border-color: var(--gold);
  border-width: 2px;
  background: #fffdf0;
}
.strategy-block.priority-1 h3 {
  color: var(--warn);
  font-size: 17px;
}
.strategy-block.priority-1::before {
  content: 'P1 ПРИОРИТЕТ №1';
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--danger);
  margin-bottom: 8px;
}

/* Priority 2 — slightly highlighted */
.strategy-block.priority-2 {
  border-color: rgba(212,160,23,.35);
}
.strategy-block.priority-2::before {
  content: 'ПРИОРИТЕТ №2';
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 8px;
}

/* Quick wins — top 3 gold */
.qw-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 8px; margin-bottom: 6px; border: 1px solid var(--line); font-size: 13px; }
.qw-item.top { background: #fffbec; border-color: rgba(212,160,23,.4); font-weight: 600; }
.qw-num { font-size: 11px; font-weight: 800; color: var(--gold); width: 18px; flex-shrink: 0; padding-top: 1px; }
.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 8px; }
.pkg {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 12px 9px;
  text-align: center;
  cursor: pointer;
}
.pkg.selected { border-color: var(--gold); background: #FDF5DC; }
.pkg-price { font-size: 19px; font-weight: 900; }
.pkg-name { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }

.offer {
  background: #111110;
  color: rgba(255,255,255,.78);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.offer-title {
  color: var(--gold-light);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 16px;
  margin-bottom: 3px;
}
.offer-sub { color: rgba(255,255,255,.45); font-size: 12px; margin-bottom: 24px; }
.offer-label {
  color: rgba(255,255,255,.28);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-weight: 900;
  margin: 18px 0 8px;
}
.offer-panel {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 16px;
}
.offer-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  text-align: center;
}
.offer-kpi {
  padding: 10px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.offer-kpi:last-child { border-right: 0; }
.offer-kpi small {
  display: block;
  color: rgba(255,255,255,.34);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10px;
  margin-bottom: 7px;
}
.offer-num {
  color: rgba(255,255,255,.9);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}
.offer-num.big { font-size: 32px; color: var(--gold-light); }
.offer-num.good { color: #5BC98A; }
.offer-num.bad { color: #FF6B5B; }
.offer-warning {
  margin-top: 10px;
  padding: 9px 13px;
  background: rgba(192,57,43,.23);
  border-radius: 7px;
  color: #FF8B80;
  font-size: 12px;
}
.offer-note {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.05);
  border-radius: 7px;
  color: rgba(255,255,255,.42);
  font-size: 11px;
}
.offer-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.offer-channel {
  border-radius: 8px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
}
.offer-channel.blue { background: rgba(26,94,168,.16); border-color: rgba(80,150,255,.32); }
.offer-channel.green { background: rgba(30,122,78,.14); border-color: rgba(91,201,138,.32); }
.offer-channel h4 {
  margin: 0 0 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.offer-channel.blue h4 { color: #7BB3FF; }
.offer-channel.green h4 { color: #5BC98A; }
.offer-channel p { margin: 0; font-size: 13px; }
.offer-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  overflow: hidden;
  border-radius: 10px;
}
.offer-month {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
}
.offer-month.blue { background: rgba(26,94,168,.13); border-color: rgba(80,150,255,.28); }
.scenario-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.scenario-label{font-size:12px;color:var(--muted);font-weight:600}
.scenario-btn{padding:5px 14px;border:1.5px solid var(--border);border-radius:20px;background:var(--surface);font-size:12px;font-weight:600;cursor:pointer;color:var(--muted);font-family:inherit;transition:all .15s}
.scenario-btn.active{background:var(--dark);color:#fff;border-color:var(--dark)}
.scenario-btn:hover:not(.active){border-color:var(--dark);color:var(--dark)}
.scenario-hint{font-size:12px;color:var(--muted);font-style:italic;width:100%;margin-top:6px;line-height:1.5;padding:8px 12px;background:var(--surface);border-radius:8px;border:1px solid var(--line)}
.closing-offer{background:var(--dark);color:#fff;border-radius:12px;padding:28px 32px;margin:20px 0}
.closing-offer h2{font-size:22px;font-weight:800;margin-bottom:6px;color:#fff}
.closing-offer .co-sub{font-size:14px;color:rgba(255,255,255,.5);margin-bottom:20px}
.co-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}
.co-point{padding:14px 16px;background:rgba(255,255,255,.07);border-radius:8px;font-size:13px;line-height:1.6;color:rgba(255,255,255,.85)}
.co-point strong{color:#fff;display:block;margin-bottom:4px}
.co-price-row{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:rgba(212,160,23,.12);border:1px solid rgba(212,160,23,.3);border-radius:10px;margin:16px 0}
.co-price{font-size:32px;font-weight:800;color:#F5C842;font-family:inherit}
.co-price-sub{font-size:13px;color:rgba(255,255,255,.45);margin-top:2px}
.co-cta{width:100%;padding:14px;background:#F5C842;color:#1a1a1a;border:none;border-radius:8px;font-size:16px;font-weight:700;cursor:pointer;font-family:inherit;margin-top:4px}
.co-quote{padding:12px 16px;background:rgba(192,57,43,.15);border-left:3px solid rgba(192,57,43,.5);border-radius:0 6px 6px 0;font-size:13px;color:rgba(255,255,255,.75);line-height:1.6;margin-top:12px}
.offer-month.green { background: rgba(30,122,78,.14); border-color: rgba(91,201,138,.28); }
.offer-month-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.offer-pill {
  border-radius: 10px;
  padding: 2px 8px;
  background: rgba(255,255,255,.11);
  font-size: 10px;
}
.offer-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: rgba(255,255,255,.46);
  font-size: 12px;
}
.offer-row strong { color: rgba(255,255,255,.86); }
.offer-sep { height: 1px; background: rgba(255,255,255,.08); margin: 11px 0; }
.offer-uplift {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(212,160,23,.1);
  border: 1px solid rgba(212,160,23,.35);
  color: rgba(255,255,255,.64);
  border-radius: 10px;
  padding: 16px;
}
.offer-invest {
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 10px;
  overflow: hidden;
}
.offer-invest-head {
  background: rgba(255,255,255,.06);
  padding: 10px 14px;
  color: rgba(255,255,255,.32);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-weight: 900;
}
.offer-invest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.offer-invest-cell {
  padding: 15px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.offer-invest-cell:last-child { border-right: 0; }
.offer-quote {
  margin-top: 12px;
  padding: 13px 15px;
  border-left: 3px solid rgba(192,57,43,.55);
  background: rgba(192,57,43,.18);
  border-radius: 0 8px 8px 0;
  color: rgba(255,255,255,.78);
  font-size: 13px;
}
.offer-verdict {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
}
.offer-verdict.good { background: rgba(30,122,78,.18); border-color: rgba(91,201,138,.38); color: #7EE0A7; }
.offer-verdict.warn { background: rgba(176,96,0,.16); border-color: rgba(245,200,66,.36); color: #F5C842; }
.offer-verdict.bad { background: rgba(192,57,43,.18); border-color: rgba(255,107,91,.34); color: #FF8B80; }
.offer-compare {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.offer-compare-cell {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 12px;
}
.offer-compare-cell small {
  display: block;
  color: rgba(255,255,255,.34);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10px;
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .offer-kpis, .offer-two, .offer-timeline, .offer-invest-grid, .offer-compare { grid-template-columns: 1fr; }
  .offer-kpi, .offer-invest-cell { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .offer-kpi:last-child, .offer-invest-cell:last-child { border-bottom: 0; }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  color: white;
  background: var(--dark);
  border-radius: 10px;
  padding: 12px 18px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  max-width: 360px;
}
.toast.error { background: var(--danger); }
.loader {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MOBILE SETTINGS BUTTON (desktop hidden) ── */
.mobile-top-bar { display: none; }
.mobile-settings-btn { display: none; }

@media (min-width: 901px) {
  .sidebar-toggle { display: none; }
  .sidebar-header { display: flex !important; }
}

@media (max-width: 900px) {
  .sidebar-header { display: none !important; }
  .sidebar-toggle { display: none !important; }

  .app { display: block; }

  /* Sidebar → sticky top bar */
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    max-height: none;
    overflow: visible;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
  }

  /* Logo strip */
  .logo {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 0;
    border-bottom: none;
  }
  .brand { font-size: 15px; }
  .sub { font-size: 10px; }

  /* Currency + settings inline in top bar */
  .mobile-top-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }
  .mobile-settings-btn {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 6px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.55);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .mobile-settings-btn.active {
    background: rgba(212,160,23,.18);
    border-color: rgba(212,160,23,.35);
    color: var(--gold-light);
  }

  /* Nav → horizontal scrollable pills */
  .nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 10px 14px 12px;
    flex: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-section { display: none; }
  .nav-item {
    flex: 0 0 auto;
    width: auto;
    max-width: 200px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    padding: 7px 12px 7px 10px;
    gap: 7px;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav-item.active { border-color: var(--gold); }
  .nav-item.active::before { display: none; }
  .badge { font-size: 10px; min-width: 18px; padding: 1px 5px; }

  /* Footer (CTA settings) → collapsible under settings btn */
  .footer {
    display: none;
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(255,255,255,.07);
  }
  .sidebar.settings-open .footer { display: block; }
  .footer-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Main content */
  .main { margin-left: 0; width: 100%; padding: 20px 14px 80px; }

  /* Sticky bottom nav buttons */
  .btn-row-sticky {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(250,250,247,.93);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(229,225,216,.9);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    margin: 0;
    display: flex; gap: 10px;
  }
  .btn-row-sticky .btn { flex: 1; justify-content: center; }

  /* Layout adjustments */
  .cols2, .cols3 { grid-template-columns: 1fr; }
  .inline { flex-direction: column; }
  .progress-label { width: 76px; }
  .card { padding: 16px; }
  .grid { gap: 10px; }
  .page-header h1 { font-size: 22px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-value { font-size: 20px; }
  .channel-card { padding: 12px; }
  .scenario-row { flex-wrap: wrap; }
  .offer-compare { grid-template-columns: repeat(2, 1fr); }
  .rpt-months { grid-template-columns: repeat(2, 1fr); }
  .rpt-grid2 { grid-template-columns: 1fr; }
  .rpt-tech-grid { grid-template-columns: 1fr; }
  .co-grid { grid-template-columns: 1fr; }
  .btn-row { flex-wrap: wrap; }
  .btn { padding: 10px 16px; font-size: 13px; }
}

@media (max-width: 600px) {
  .main { padding: 14px 10px 80px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .rpt-months { grid-template-columns: 1fr; }
  .offer-compare { grid-template-columns: 1fr 1fr; }
  .pkg { padding: 12px; }
  h1 { font-size: 18px; }
  .voice-btn::after { display: none; }
  .nav-item { max-width: 160px; font-size: 11px; padding: 6px 10px 6px 9px; }
}
/* ── VOICE INPUT ── */
.funnel-tool-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1.5px solid var(--line);
  border-radius: 8px; cursor: pointer; font-size: 13px;
  color: var(--dark); transition: all .15s; user-select: none;
}
.funnel-tool-item:hover { border-color: var(--gold); }
.funnel-tool-item input:checked + span { font-weight: 600; color: var(--warn); }
.funnel-tool-item input[type="checkbox"] { accent-color: var(--gold); width: 15px; height: 15px; flex-shrink: 0; }
.voice-btn {
  position: absolute; right: 10px; bottom: 10px;
  background: var(--gold); color: #fff;
  border: none;
  border-radius: 8px; padding: 6px 10px;
  cursor: pointer; font-size: 15px; line-height: 1;
  transition: all .15s; z-index: 1;
  display: flex; align-items: center; gap: 4px;
}
.voice-wrap { position: relative; display: block; }
.voice-btn::after { content: 'Голос'; font-size: 10px; font-weight: 700; letter-spacing: .05em; color: #fff; font-family: inherit; }
.voice-btn:hover { background: var(--gold-light); }
.voice-btn.listening {
  background: #dc2626; border-color: #dc2626; color: white;
  animation: pulse-red .8s ease-in-out infinite;
}
.voice-btn.listening::after { content: 'Стоп'; color: rgba(255,255,255,.7); }
@keyframes pulse-red { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
.loss-level-hint {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.loss-level-hint span {
  display: block;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fafaf7;
  color: var(--mid);
  font-size: 11px;
  line-height: 1.25;
}
.loss-level-hint b {
  display: block;
  margin-bottom: 2px;
  color: var(--dark);
  font-size: 11px;
}
.loss-level-ok { border-left: 3px solid var(--success) !important; }
.loss-level-mid { border-left: 3px solid var(--warn) !important; }
.loss-level-critical { border-left: 3px solid var(--danger) !important; }
@media (max-width: 600px) {
  .loss-level-hint { grid-template-columns: 1fr; }
}
