/* ============================================================
   Анализ ниш · AI-студия · Профиль — scoped styles
   ============================================================ */

/* ---------- shared striped placeholder ---------- */
.gen-ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, var(--bg-muted) 0 11px, var(--bg-hover) 11px 22px);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-faint);
  overflow: hidden;
}
.gen-ph .ph-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  background: var(--bg-elev); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 6px;
}

/* ============================================================
   NICHES
   ============================================================ */
.nz-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.nz-toolbar .grow { flex: 1; min-width: 200px; max-width: 380px; }

.nz-insight {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--brand-border); border-radius: 12px;
  background: linear-gradient(110deg, var(--brand-soft), var(--bg-elev) 70%);
  padding: 14px 16px; margin-bottom: 18px;
}
.nz-insight .ic {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(140deg, var(--brand), #8b5cf6); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(91,91,240,0.5);
}
.nz-insight .t { font-size: 14px; font-weight: 600; }
.nz-insight .s { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }

.nz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1240px) { .nz-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .nz-grid { grid-template-columns: 1fr; } }

.nz-card {
  border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev);
  padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.nz-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.nz-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.nz-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.nz-cat { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.nz-verdict { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.nz-verdict.go { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-border); }
.nz-verdict.care { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-border); }
.nz-verdict.busy { background: var(--off-bg); color: var(--off-fg); border: 1px solid var(--off-border); }

.nz-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.nz-metric .k { font-size: 11px; color: var(--text-muted); }
.nz-metric .v { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; font-feature-settings: 'tnum'; margin-top: 1px; }
.nz-metric .v .up { color: var(--ok-fg); font-size: 13px; }
.nz-metric .v .down { color: var(--crit-fg); font-size: 13px; }
.nz-comp { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; }
.nz-comp .bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.nz-comp .bars i { width: 3px; border-radius: 1px; background: var(--border-strong); }
.nz-comp.low .bars i:nth-child(1) { background: var(--ok-fg); }
.nz-comp.mid .bars i:nth-child(1), .nz-comp.mid .bars i:nth-child(2) { background: var(--warn-fg); }
.nz-comp.high .bars i { background: var(--crit-fg); }

.nz-spark { border-top: 1px solid var(--border); padding-top: 12px; }
.nz-spark-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.nz-spark-svg { width: 100%; height: 40px; display: block; }

/* niche detail drawer */
.nz-d-hero {
  border-radius: 12px; padding: 16px; color: #fff; margin-bottom: 16px;
  background: linear-gradient(120deg, #0c1322, #1e3a5f);
}
.nz-d-verdict-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nz-d-name { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.nz-d-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }
.nz-d-stat .k { font-size: 11px; color: #9fb3c8; }
.nz-d-stat .v { font-size: 18px; font-weight: 600; margin-top: 2px; font-feature-settings: 'tnum'; }
.nz-seg-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.nz-seg-bar > span { display: grid; place-items: center; font-size: 10.5px; font-weight: 600; color: #fff; }
.nz-players-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.nz-players-row:first-of-type { border-top: 0; }

/* ===== Niches: portfolio strip + decision drawer ===== */
.nz-portfolio { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 1240px) { .nz-portfolio { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .nz-portfolio { grid-template-columns: 1fr; } }
.nz-port-card {
  border: 1px solid var(--border); border-left-width: 3px; border-radius: 12px; background: var(--bg-elev);
  padding: 13px 14px; display: flex; flex-direction: column; gap: 7px;
  transition: box-shadow .14s, transform .14s;
}
.nz-port-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.nz-port-card.hot { border-left-color: var(--warn-fg); }
.nz-port-card.risk { border-left-color: var(--crit-fg); }
.nz-port-card.stable { border-left-color: var(--ok-fg); }
.nz-port-card.suggest { border-style: dashed; border-left-style: solid; border-left-color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), var(--bg-elev) 70%); cursor: pointer; }
.nz-port-card .row.between { gap: 10px; }
.nz-port-card .row.between > div:first-child { min-width: 0; padding-right: 2px; }
.nz-port-card .nz-trend, .nz-port-card .badge { flex-shrink: 0; }
.nz-port-sku { font-size: 13px; font-weight: 600; line-height: 1.25; }
.nz-port-niche { font-size: 11.5px; color: var(--text-muted); }
.nz-port-note { font-size: 12px; color: var(--text-soft); line-height: 1.35; flex: 1; }
.nz-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; font-family: var(--font-mono); }
.nz-trend.up { color: var(--ok-fg); } .nz-trend.down { color: var(--crit-fg); } .nz-trend.flat { color: var(--text-muted); }
.nz-port-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nz-port-link { font-size: 12px; font-weight: 600; color: var(--brand-strong); cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }

/* decision scoring grid */
.nz-score { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.nz-score-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg-muted); }
.nz-score-item .lab { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.nz-score-item .val { font-size: 15px; font-weight: 600; margin-top: 3px; }
.nz-score-item.ok .val { color: var(--ok-fg); } .nz-score-item.ok { background: var(--ok-bg); border-color: var(--ok-border); }
.nz-score-item.warn .val { color: var(--warn-fg); } .nz-score-item.warn { background: var(--warn-bg); border-color: var(--warn-border); }
.nz-score-item.crit .val { color: var(--crit-fg); } .nz-score-item.crit { background: var(--crit-bg); border-color: var(--crit-border); }

/* recommendation block */
.nz-reco { border: 1px solid var(--brand-border); border-radius: 12px; background: linear-gradient(120deg, var(--brand-soft), var(--bg-elev) 70%); padding: 15px 16px; }
.nz-reco .kick { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--brand-strong); display: inline-flex; align-items: center; gap: 6px; }
.nz-reco .t { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-top: 7px; line-height: 1.25; text-wrap: balance; }
.nz-reco .b { font-size: 13px; color: var(--text-soft); margin-top: 6px; line-height: 1.5; }
.nz-reco .timing { font-size: 12.5px; color: var(--text-soft); margin-top: 10px; display: flex; align-items: flex-start; gap: 7px; padding: 9px 11px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; }
.nz-reco .timing .ic { color: var(--brand); flex-shrink: 0; margin-top: 1px; }

/* unit economics mini */
.nz-unit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.nz-unit-cell { background: var(--bg-elev); padding: 11px 12px; }
.nz-unit-cell .k { font-size: 11px; color: var(--text-muted); }
.nz-unit-cell .v { font-size: 16px; font-weight: 600; margin-top: 2px; font-feature-settings: 'tnum'; }
.nz-unit-cell .v.good { color: var(--ok-fg); }

/* entry plan steps */
.nz-plan-step { display: flex; gap: 11px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--border); }
.nz-plan-step:first-child { border-top: 0; }
.nz-plan-num { width: 24px; height: 24px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--accent); color: #fff; }
.nz-plan-num.done { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-border); }
.nz-plan-body { flex: 1; }
.nz-plan-t { font-size: 13px; font-weight: 500; }
.nz-plan-s { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ============================================================
   AI STUDIO
   ============================================================ */
.st-layout { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .st-layout { grid-template-columns: 1fr; } }

.st-controls {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  position: sticky; top: calc(var(--nav-h) + 16px);
  display: flex; flex-direction: column;
}
.st-controls-scroll { padding: 16px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - var(--nav-h) - 120px); overflow-y: auto; }
.st-controls-foot { padding: 14px 16px; border-top: 1px solid var(--border); background: var(--bg-muted); border-radius: 0 0 14px 14px; }

.st-group-label { font-size: 11.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; white-space: nowrap; line-height: 1.3; }

.st-source-drop {
  border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 14px;
  display: flex; align-items: center; gap: 12px; cursor: pointer; transition: border-color .14s, background .14s;
}
.st-source-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.st-source-thumb { width: 46px; height: 46px; flex-shrink: 0; }

.st-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-style {
  cursor: pointer; border-radius: 9px; overflow: hidden; border: 2px solid transparent;
  transition: border-color .12s;
}
.st-style.active { border-color: var(--brand); }
.st-style-thumb { aspect-ratio: 1; }
.st-style-name { font-size: 10.5px; text-align: center; padding: 4px 2px; color: var(--text-soft); background: var(--bg-muted); }
.st-style.active .st-style-name { color: var(--brand-strong); font-weight: 600; }

.st-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.st-swatch { width: 28px; height: 28px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.st-swatch.active { border-color: var(--text); }

/* preview area */
.st-stage {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.st-canvas-wrap { display: grid; place-items: center; width: 100%; min-height: 340px; background: var(--bg-muted); border-radius: 12px; padding: 24px; }
.st-canvas {
  position: relative; background: var(--bg-elev); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); max-height: 420px;
}
.st-canvas .stripes { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #eceae6 0 13px, #f4f3f0 13px 26px); }
.st-canvas .prod { position: absolute; inset: 18% 26%; border-radius: 8px; background: rgba(255,255,255,0.7); border: 1px dashed var(--border-strong); display: grid; place-items: center; }
.st-overlay-tag {
  position: absolute; font-size: 11px; font-weight: 700; color: #fff; padding: 4px 9px; border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.st-play {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.st-play .btn-play { width: 56px; height: 56px; border-radius: 999px; background: rgba(15,23,42,0.7); backdrop-filter: blur(4px); display: grid; place-items: center; color: #fff; border: 2px solid rgba(255,255,255,0.5); }
.st-vid-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.35); }
.st-vid-bar > span { display: block; height: 100%; width: 38%; background: #fff; border-radius: 999px; }
.st-vid-dur { position: absolute; right: 12px; bottom: 22px; font-family: var(--font-mono); font-size: 11px; color: #fff; background: rgba(15,23,42,0.6); padding: 1px 6px; border-radius: 5px; }

.st-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: 100%; }
@media (max-width: 720px) { .st-results { grid-template-columns: repeat(2, 1fr); } }
.st-result { position: relative; border-radius: 10px; overflow: hidden; }
.st-result .gen-ph { aspect-ratio: 1; }
.st-result-actions { position: absolute; inset: 0; background: rgba(15,23,42,0.55); display: flex; align-items: center; justify-content: center; gap: 8px; opacity: 0; transition: opacity .14s; }
.st-result:hover .st-result-actions { opacity: 1; }
.st-result-actions .b { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); color: #fff; display: grid; place-items: center; cursor: pointer; }
.st-result-actions .b:hover { background: rgba(255,255,255,0.28); }
.st-result-cap { position: absolute; left: 8px; bottom: 8px; font-family: var(--font-mono); font-size: 10px; color: #fff; background: rgba(15,23,42,0.6); padding: 1px 6px; border-radius: 5px; }

.st-gen-progress { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px; color: var(--text-muted); }
.st-gen-bar { width: 200px; height: 5px; border-radius: 999px; background: var(--bg-active); overflow: hidden; }
.st-gen-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #8b5cf6); border-radius: 999px; animation: stload 1.2s ease-in-out infinite; }
@keyframes stload { 0%{width:10%} 50%{width:80%} 100%{width:10%} }

.st-empty { padding: 50px 20px; text-align: center; color: var(--text-muted); }

/* ===== AI Studio v2 — guided flow ===== */

/* stepper */
.st-stepper { display: flex; align-items: center; gap: 0; margin-bottom: 22px; flex-wrap: wrap; }
.st-step-btn { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; cursor: pointer; padding: 4px 2px; }
.st-step-btn:disabled { cursor: default; }
.st-step-num {
  width: 26px; height: 26px; border-radius: 999px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--bg-muted); border: 1px solid var(--border-strong); color: var(--text-muted);
  transition: all .15s;
}
.st-step-btn.active .st-step-num { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.st-step-btn.done .st-step-num { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg); }
.st-step-txt { text-align: left; }
.st-step-txt .k { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 600; }
.st-step-txt .t { font-size: 13px; font-weight: 500; color: var(--text-muted); line-height: 1.1; }
.st-step-btn.active .st-step-txt .t, .st-step-btn.done .st-step-txt .t { color: var(--text); }
.st-step-line { flex: 1; min-width: 20px; height: 1.5px; background: var(--border); margin: 0 12px; }
.st-step-line.done { background: var(--ok-border); }

/* start screen */
.st-section-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin: 0 0 12px; }
.st-goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 820px) { .st-goals { grid-template-columns: 1fr; } }
.goal-card {
  border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); padding: 20px;
  cursor: pointer; display: flex; flex-direction: column; gap: 10px; text-align: left;
  transition: box-shadow .15s, transform .15s, border-color .15s; position: relative; overflow: hidden;
}
.goal-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-border); }
.goal-card .goal-ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand), #8b5cf6); box-shadow: 0 6px 16px -4px rgba(91,91,240,0.5);
}
.goal-card .goal-t { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.goal-card .goal-d { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.goal-card .goal-go { font-size: 12.5px; color: var(--brand-strong); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }

.proj-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .proj-grid { grid-template-columns: repeat(2, 1fr); } }
.proj-card { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.proj-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.proj-thumb { aspect-ratio: 4/3; position: relative; }
.proj-meta { padding: 11px 12px; }
.proj-meta .t { font-size: 13px; font-weight: 500; line-height: 1.3; }
.proj-meta .s { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; }

/* product step */
.st-prod-list { display: flex; flex-direction: column; gap: 8px; }
.st-prod-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-elev); cursor: pointer; transition: border-color .12s, background .12s; }
.st-prod-opt:hover { border-color: var(--border-strong); background: var(--bg-muted); }
.st-prod-opt.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.st-prod-thumb { width: 46px; height: 46px; flex-shrink: 0; border-radius: 8px; }
.st-prod-card { border: 1px solid var(--ok-border); background: var(--ok-bg); border-radius: 12px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.st-prod-card .ph { width: 72px; height: 72px; flex-shrink: 0; border-radius: 10px; }
.st-prod-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* template gallery */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 980px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
.tpl-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--bg-elev); transition: box-shadow .15s, transform .15s, border-color .15s; border-width: 2px; }
.tpl-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tpl-card.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.tpl-thumb { aspect-ratio: 4/5; position: relative; overflow: hidden; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tpl-meta { padding: 11px 13px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tpl-meta .t { font-size: 13px; font-weight: 600; }
.tpl-meta .d { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
/* schematic pieces */
.sch-photo { background: rgba(255,255,255,0.85); border: 1px dashed rgba(15,23,42,0.25); border-radius: 5px; }
.sch-bar { background: rgba(15,23,42,0.16); border-radius: 3px; height: 6px; }
.sch-chip { border-radius: 4px; height: 14px; }
.sch-ic { width: 16px; height: 16px; border-radius: 5px; background: rgba(15,23,42,0.18); flex-shrink: 0; }
.sch-row { display: flex; align-items: center; gap: 6px; }

/* build (content) step */
.st-build { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .st-build { grid-template-columns: 1fr; } }
.st-inspector { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; }
.st-inspector-scroll { padding: 16px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - var(--nav-h) - 150px); overflow-y: auto; }
.st-inspector-foot { padding: 14px 16px; border-top: 1px solid var(--border); background: var(--bg-muted); border-radius: 0 0 14px 14px; }

/* editable feature rows */
.feat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.feat-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; flex-shrink: 0; }
.feat-row .input { height: 32px; }
.feat-del { color: var(--text-faint); cursor: pointer; flex-shrink: 0; padding: 4px; border-radius: 6px; background: transparent; border: 0; }
.feat-del:hover { background: var(--bg-hover); color: var(--crit-fg); }

/* live infographic preview (filled template) */
.ig {
  position: relative; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; color: #0a0a0a;
}
.ig.dark { color: #fff; }
.ig-pad { position: relative; z-index: 1; padding: 22px; display: flex; flex-direction: column; height: 100%; gap: 14px; }
.ig-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.ig-photo { background: rgba(255,255,255,0.6); border: 1px dashed rgba(15,23,42,0.3); border-radius: 10px; display: grid; place-items: center; flex: 1; min-height: 90px; }
.ig.dark .ig-photo { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); }
.ig-feats { display: flex; flex-direction: column; gap: 9px; }
.ig-feat { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; }
.ig-feat .ig-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.ig-badge { position: absolute; top: 16px; right: 16px; z-index: 2; font-size: 12px; font-weight: 700; color: #fff; padding: 5px 11px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.18); }
.ig-cols { display: flex; gap: 10px; }
.ig-col { flex: 1; background: rgba(255,255,255,0.6); border-radius: 9px; padding: 12px; text-align: center; }
.ig.dark .ig-col { background: rgba(255,255,255,0.1); }
.ig-split { display: flex; gap: 8px; flex: 1; }
.ig-split > div { flex: 1; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 600; }

.st-build-stage { background: var(--bg-muted); border: 1px solid var(--border); border-radius: 14px; padding: 28px; display: grid; place-items: center; min-height: 440px; }

/* ============================================================
   ACCOUNT
   ============================================================ */
.acc-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.acc-avatar-lg {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 24px; font-weight: 600; color: #fff;
  background: linear-gradient(140deg, var(--brand), #8b5cf6); box-shadow: 0 8px 20px -6px rgba(91,91,240,0.5);
}
.acc-head .name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.acc-head .mail { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .acc-grid { grid-template-columns: 1fr; } }

/* subscription */
.plan-card {
  border-radius: 14px; padding: 20px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(125deg, #0c1322 0%, #1e2b52 60%, #3b2f6b 100%);
}
.plan-card::after { content:''; position:absolute; inset:0; background: radial-gradient(500px 200px at 90% -20%, rgba(139,92,246,0.4), transparent 60%); }
.plan-card .row { position: relative; z-index: 1; }
.plan-name { font-size: 13px; color: #c3b6f5; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.plan-price { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }
.plan-price span { font-size: 14px; font-weight: 400; color: #b6c6d8; }
.plan-renew { font-size: 12.5px; color: #b6c6d8; margin-top: 6px; }

.usage-meter { margin-top: 14px; }
.usage-meter .lab { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.usage-meter .lab b { font-weight: 600; }
.usage-track { height: 7px; border-radius: 999px; background: var(--bg-active); overflow: hidden; }
.usage-track > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.usage-track > span.warn { background: var(--warn-fg); }
.usage-track > span.crit { background: var(--crit-fg); }

.plan-compare { width: 100%; border-collapse: collapse; font-size: 13px; }
.plan-compare th, .plan-compare td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.plan-compare thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
.plan-compare td.feat { color: var(--text-muted); }
.plan-compare .col-cur { background: var(--brand-soft); }
.plan-compare th.col-cur { color: var(--brand-strong); }

.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.notif-row:first-of-type { border-top: 0; }
.notif-row .t { font-size: 13px; font-weight: 500; }
.notif-row .s { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.notif-channels { display: flex; gap: 14px; }
.notif-channels label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-soft); cursor: pointer; }

.api-field { display: flex; gap: 8px; align-items: center; }
.api-token {
  flex: 1; font-family: var(--font-mono); font-size: 12.5px; background: var(--bg-muted);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px;
  letter-spacing: 0.04em; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* topbar subscription pill */
.sub-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-fg);
  font-size: 12px; font-weight: 600; transition: filter .12s;
}
.sub-pill:hover { filter: brightness(0.98); }
.sub-pill .d { font-family: var(--font-mono); }
@media (max-width: 1080px) { .sub-pill { display: none; } }
