/* View-specific styles: overview, SKUs, SKU detail, SEO studio, shops, integrations, login. */

.small { font-size: var(--fs-xs); }
.text-no { color: var(--no-ink); }
.inline-icon { display: inline-block; width: 13px; height: 13px; vertical-align: -1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.req { color: var(--no-ink); }
.linkbtn { color: var(--brand); font-weight: 750; font-size: var(--fs-sm); }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.card--list .card__body { padding: var(--sp-3) 0 var(--sp-2); }
.list--flush .list-item { padding-left: var(--sp-6); padding-right: var(--sp-6); }
.section-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-title h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); }
.skel--tall { height: 320px; }
.select--sm { min-height: 32px; height: 32px; padding: 4px 30px 4px 10px; font-size: var(--fs-xs); width: auto; max-width: 220px; }
.btn.is-active { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-ink); }

/* ------------------------------------------------------------- overview */
.hero {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap;
  padding: var(--sp-8); border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--coral) 22%, transparent) 0%, transparent 52%),
    radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--violet) 18%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
:root[data-theme='dark'] .hero {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(241, 100, 30, .30) 0%, transparent 50%),
    radial-gradient(90% 120% at 0% 100%, rgba(123, 97, 255, .26) 0%, transparent 55%),
    linear-gradient(135deg, #141B2B, #10151F);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: linear-gradient(90deg, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.hero__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -.03em; line-height: 1.02; margin: 8px 0 10px; }
.hero__accent {
  background: linear-gradient(100deg, var(--coral-2), var(--coral) 45%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { color: var(--ink-2); font-weight: 600; font-size: var(--fs-lg); }
.hero__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.kpi {
  position: relative; display: grid; gap: 6px; padding: var(--sp-5); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); overflow: hidden;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med);
}
a.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; border-color: var(--line-strong); }
.kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; opacity: .55; background: var(--kpi-soft, var(--brand-soft)); }
.kpi__top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.kpi__label { font-size: var(--fs-sm); font-weight: 750; color: var(--muted); }
.kpi__icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--kpi-soft, var(--brand-soft)); color: var(--kpi-ink, var(--brand)); }
.kpi__icon svg { width: 18px; height: 18px; }
.kpi__value { font-size: 2.35rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; position: relative; z-index: 1; }
.kpi__foot { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; position: relative; z-index: 1; }
.kpi--ok { --kpi-soft: var(--ok-soft); --kpi-ink: var(--ok-ink); }
.kpi--blue { --kpi-soft: var(--blue-soft); --kpi-ink: var(--blue-ink); }
.kpi--violet { --kpi-soft: var(--violet-soft); --kpi-ink: var(--violet-ink); }

.legend-inline { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); font-weight: 750; color: var(--muted); }
.legend-dot { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.legend-dot--blue { color: var(--blue-ink); } .legend-dot--ok { color: var(--ok-ink); } .legend-dot--violet { color: var(--violet-ink); } .legend-dot--warn { color: var(--warn-ink); }

.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-3); counter-reset: none; }
.flow-step {
  --tone: var(--blue); --tone-soft: var(--blue-soft); --tone-ink: var(--blue-ink);
  position: relative; display: grid; gap: 6px; align-content: start; padding: 14px; min-height: 150px;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med), background var(--t-med);
}
.flow-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); background: var(--surface); text-decoration: none; border-color: var(--line-strong); }
.flow-step--ok { --tone: var(--ok); --tone-soft: var(--ok-soft); --tone-ink: var(--ok-ink); }
.flow-step--violet { --tone: var(--violet); --tone-soft: var(--violet-soft); --tone-ink: var(--violet-ink); }
.flow-step--warn { --tone: var(--warn); --tone-soft: var(--warn-soft); --tone-ink: var(--warn-ink); }
.flow-step.has-items { background: var(--surface); border-color: color-mix(in srgb, var(--tone) 45%, var(--line)); box-shadow: 0 0 0 3px var(--tone-soft); }
.flow-step__top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.flow-step__num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .74rem; font-weight: 800; color: #fff;
  background: var(--tone); box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--tone) 70%, transparent);
}
.flow-step__icon { color: var(--tone-ink); }
.flow-step__icon svg { width: 18px; height: 18px; }
.flow-step__count { margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--tone-soft); color: var(--tone-ink); }
.flow-step__label { font-size: var(--fs-sm); font-weight: 800; line-height: 1.25; }
.flow-step__tool { font-size: .72rem; color: var(--muted); line-height: 1.35; }
.flow-step__chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.flow-step__chips .chip { height: 20px; padding: 0 7px; font-size: .64rem; }
.flow-step__chips .chip svg { width: 11px; height: 11px; }

.health { list-style: none; padding: 0; display: grid; gap: 4px; }
.health__item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.health__item:first-child { border-top: 0; padding-top: 0; }
.health__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.health__dot.is-ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.health__dot.is-off { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.health__text { flex: 1; min-width: 0; display: grid; }
.health__text b { font-size: var(--fs-sm); }
.health__text span { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.costs { display: grid; gap: var(--sp-4); }
.costs__total { display: flex; align-items: baseline; gap: 10px; }
.costs__value { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.costs__lines { list-style: none; padding: 0; display: grid; gap: 14px; }
.costs__row { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: var(--fs-sm); font-weight: 700; }
.costs__label { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.costs__label .chip { height: 20px; font-size: .64rem; }
.costs__bar { height: 6px; border-radius: 6px; background: var(--surface-3); margin: 6px 0 4px; overflow: hidden; }
.costs__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--warn), var(--coral)); }
.costs__note { font-size: var(--fs-xs); color: var(--muted); }
.costs__disclaimer { font-size: var(--fs-xs); color: var(--faint); border-top: 1px dashed var(--line-strong); padding-top: 10px; }

/* ----------------------------------------------------------------- SKUs */
.filters {
  display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; padding: var(--sp-3);
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.filters__search { flex: 1 1 260px; }
.filters .select { width: auto; min-width: 190px; }
.filters > .muted { margin-left: auto; font-size: var(--fs-sm); font-weight: 700; padding-right: 6px; }
.sku-results { min-height: 140px; }
.sku-head, .sku-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.2fr) 110px 18px; gap: var(--sp-4); align-items: center; }
.sku-head { padding: 10px var(--sp-6); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.sku-list { list-style: none; padding: 0; }
.sku-list li + li .sku-row { border-top: 1px solid var(--line-2); }
.sku-row { padding: 14px var(--sp-6); color: var(--ink); transition: background var(--t-fast); }
.sku-row:hover { background: var(--surface-2); text-decoration: none; }
.sku-row:hover .chev { color: var(--brand); transform: translateX(2px); }
.sku-row .chev { width: 16px; height: 16px; color: var(--faint); transition: transform var(--t-fast), color var(--t-fast); }
.sku-row__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sku-row__text { min-width: 0; }
.sku-row__code { display: flex; align-items: center; gap: 8px; }
.sku-row__code .sku-code { font-size: var(--fs-md); }
.sku-row__code .chip { height: 20px; font-size: .62rem; }
.sku-row__niche { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sku-row__shop { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sku-row__shopname { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sku-row__stage { display: flex; gap: 6px; flex-wrap: wrap; }
.sku-row__progress { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: var(--fs-xs); font-weight: 700; }
.sku-row__updated { font-size: var(--fs-sm); }

.code-preview {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-md);
  background: linear-gradient(110deg, var(--brand-soft), var(--surface-2)); border: 1px solid var(--line);
}
.code-preview__label { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.code-preview__value { font-size: 1.5rem; color: var(--ink); letter-spacing: .04em; }
.shop-pick { display: grid; gap: 8px; }
.shop-pick__opt {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); text-align: left; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.shop-pick__opt b { display: block; font-size: var(--fs-sm); }
.shop-pick__opt small { display: block; font-size: .72rem; color: var(--muted); }
.shop-pick__check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); color: transparent; }
.shop-pick__check svg { width: 13px; height: 13px; }
.shop-pick__opt[aria-checked='true'] { border-color: var(--brand); box-shadow: var(--ring); }
.shop-pick__opt[aria-checked='true'] .shop-pick__check { background: var(--brand); border-color: var(--brand); color: #fff; }
.url-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.url-preview { width: 64px; height: 64px; }

@media (max-width: 980px) {
  .sku-head { display: none; }
  .sku-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'main shop' 'stage stage' 'progress updated'; gap: 10px 12px; padding: 14px var(--sp-4); }
  .sku-row__main { grid-area: main; } .sku-row__shop { grid-area: shop; justify-content: flex-end; }
  .sku-row__stage { grid-area: stage; } .sku-row__progress { grid-area: progress; }
  .sku-row__updated { grid-area: updated; font-size: var(--fs-xs); text-align: right; }
  .sku-row .chev, .sku-row__shopname { display: none; }
}
@media (max-width: 640px) {
  .filters { padding: var(--sp-3); }
  .filters .select { min-width: 0; flex: 1 1 160px; }
  .filters > .muted { margin-left: 0; }
  .filters .segmented { flex: 1 1 auto; }
  .filters .segmented button { flex: 1; }
}

/* ----------------------------------------------------------- SKU detail */
.sku-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px); gap: var(--sp-6); align-items: center; padding: var(--sp-6); position: relative; overflow: hidden; }
.sku-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--coral-2), var(--coral), var(--violet)); }
.sku-hero__media { position: relative; }
.sku-hero__media .thumb { box-shadow: var(--shadow-md); }
.sku-hero__cap { position: absolute; left: 8px; bottom: 8px; font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: rgba(22, 32, 58, .82); color: #fff; }
.sku-hero__text { min-width: 0; display: grid; gap: 6px; }
.sku-hero__code { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.01em; }
.sku-hero__niche { color: var(--ink-2); font-weight: 600; font-size: var(--fs-lg); margin-bottom: 4px; }
.sku-hero__side { display: grid; gap: var(--sp-4); }
.sku-hero__progress { display: grid; gap: 8px; }
.sku-hero__actions { justify-content: flex-end; }

.stepper { padding: var(--sp-5) var(--sp-5) var(--sp-4); }
.stepper__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); position: relative; }
.stepper__step { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 0 2px; }
.stepper__step::before { content: ''; position: absolute; top: 17px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.stepper__step:first-child::before { display: none; }
.stepper__step.is-done::before, .stepper__step.is-current::before { background: linear-gradient(90deg, var(--ok), var(--ok)); }
.stepper__dot {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--faint); border: 2px solid var(--line); transition: all var(--t-med) var(--ease);
}
.stepper__dot svg { width: 16px; height: 16px; }
.stepper__step.is-done .stepper__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper__step.is-current .stepper__dot {
  background: linear-gradient(135deg, var(--coral-2), var(--coral)); border-color: transparent; color: #fff;
  box-shadow: 0 0 0 5px var(--brand-soft), 0 8px 18px -6px var(--brand-glow);
  animation: currentPulse 2.4s var(--ease) infinite;
}
@keyframes currentPulse { 0%, 100% { box-shadow: 0 0 0 5px var(--brand-soft), 0 8px 18px -6px var(--brand-glow); } 50% { box-shadow: 0 0 0 9px transparent, 0 8px 18px -6px var(--brand-glow); } }
.stepper__label { font-size: .68rem; font-weight: 750; color: var(--muted); line-height: 1.25; max-width: 90px; }
.stepper__step.is-current .stepper__label { color: var(--ink); font-weight: 800; }
.stepper__step.is-done .stepper__label { color: var(--ink-2); }
.stepper__phase { position: absolute; top: -6px; right: calc(50% - 26px); z-index: 2; font-size: .55rem; font-weight: 800; padding: 1px 4px; border-radius: 5px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); }
.stepper__compact { display: none; }

.sku-tab { display: grid; gap: var(--sp-5); }
.gates { list-style: none; padding: 0; display: grid; gap: 10px; }
.gate { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.gate b { display: block; font-size: var(--fs-sm); }
.gate span { font-size: var(--fs-xs); color: var(--muted); }
.gate > div { flex: 1; min-width: 0; }
.gate__icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--line-strong); color: var(--faint); }
.gate__icon svg { width: 14px; height: 14px; }
.gate.is-ok { background: var(--ok-soft); border-color: var(--ok-line); }
.gate.is-ok .gate__icon { background: var(--ok); border-color: var(--ok); color: #fff; }
.gate__link { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.gate__link:hover { background: var(--surface); color: var(--brand); }
.gate__link svg { width: 16px; height: 16px; }

.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist__item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.checklist__item b { display: block; font-size: var(--fs-sm); }
.checklist__item span { font-size: var(--fs-xs); color: var(--muted); }
.checklist__icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.checklist__icon svg { width: 14px; height: 14px; }
.checklist__item.is-ok .checklist__icon { background: var(--ok); color: #fff; }
.checklist__item.is-warn .checklist__icon { background: var(--warn-soft); color: var(--warn-ink); }
.checklist__item.is-no { border-color: var(--no-line); }
.checklist__item.is-no .checklist__icon { background: var(--no-soft); color: var(--no-ink); }

.files { list-style: none; padding: 0; }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px var(--sp-6); border-top: 1px solid var(--line-2); }
.file:first-child { border-top: 0; }
.file__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); }
.file__icon svg { width: 18px; height: 18px; }
.file__main { min-width: 0; display: grid; gap: 3px; }
.file__name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__path { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.file__path svg { width: 11px; height: 11px; color: var(--faint); }
.file__label { font-size: var(--fs-xs); }

.move-list { display: grid; gap: 6px; }
.move-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.move-opt:hover { border-color: var(--line-strong); }
.move-opt[aria-checked='true'] { border-color: var(--brand); box-shadow: var(--ring); }
.move-opt__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .74rem; font-weight: 800; background: var(--surface-3); color: var(--ink-2); flex: none; }
.move-opt.is-done .move-opt__num { background: var(--ok); color: #fff; }
.move-opt.is-current .move-opt__num { background: var(--coral); color: #fff; }
.move-opt__label { flex: 1; font-weight: 750; font-size: var(--fs-sm); }

@media (max-width: 1100px) {
  .sku-hero { grid-template-columns: auto minmax(0, 1fr); }
  .sku-hero__side { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}
@media (max-width: 860px) {
  .stepper__list { display: none; }
  .stepper__compact { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .stepper { padding: var(--sp-4); }
  .stepper::after { content: ''; display: block; }
}
@media (max-width: 640px) {
  .sku-hero { grid-template-columns: minmax(0, 1fr); padding: var(--sp-5); gap: var(--sp-4); }
  .sku-hero__media .thumb { width: 100%; height: 108px; }
  .sku-hero__side { grid-template-columns: minmax(0, 1fr); }
  .sku-hero__actions { justify-content: stretch; }
  .sku-hero__actions .btn { flex: 1; }
  .file { grid-template-columns: auto minmax(0, 1fr); padding: 12px var(--sp-4); }
  .file__label { display: none; }
  .file > :last-child { grid-column: 2; justify-self: start; }
}

/* ------------------------------------------------------------ SEO editor */
.seo-editor { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.seo-editor__left { display: grid; gap: var(--sp-4); min-width: 0; }
.seo-editor__right { position: sticky; top: calc(var(--topbar-h) + 12px); display: grid; gap: var(--sp-4); min-width: 0; max-height: calc(100vh - var(--topbar-h) - 24px); overflow-y: auto; padding-bottom: 4px; scrollbar-gutter: stable; }
.seo-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.seo-head__tpl { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seo-head__tpl b { display: block; font-size: var(--fs-md); }
.seo-head__tpl .muted { font-size: var(--fs-xs); }
.seo-head__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.seo-head__actions .select { width: auto; min-width: 220px; }
.seo-form { display: grid; gap: var(--sp-4); }
.seo-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.seo-section__head { display: flex; align-items: center; gap: 10px; padding: var(--sp-4) var(--sp-5) 0; }
.seo-section__head h3 { font-size: var(--fs-md); font-weight: 800; }
.seo-section__icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.seo-section__icon svg { width: 15px; height: 15px; }
.seo-section__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.list-input { display: flex; align-items: center; gap: 10px; }
.list-input__n { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok-ink); font-weight: 800; font-size: .8rem; }
.faq-input { display: grid; gap: 8px; }

.seo-validation { transition: opacity var(--t-med); }
.seo-validation.is-busy { opacity: .75; }
.seo-score__row { display: flex; align-items: center; gap: 16px; }
.seo-score__row b { display: block; font-size: var(--fs-lg); }
.seo-score__row .muted { font-size: var(--fs-sm); }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.issues { list-style: none; padding: 0; display: grid; gap: 8px; }
.issue { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.issue svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.issue b { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; }
.issue--no { background: var(--no-soft); color: var(--no-ink); }
.issue--no span { color: var(--ink); }
.issue--warn { background: var(--warn-soft); color: var(--warn-ink); }
.issue--warn span { color: var(--ink); }
.seo-empty { display: grid; justify-items: center; gap: 10px; padding: var(--sp-8); color: var(--muted); text-align: center; }
.seo-empty svg { width: 28px; height: 28px; color: var(--brand); }

.etsy-card { overflow: hidden; }
.etsy-card__media { position: relative; height: 190px; background: linear-gradient(135deg, #FBE3D3, #EDE6FF 60%, #DDEBFF); display: grid; place-items: center; }
:root[data-theme='dark'] .etsy-card__media { background: linear-gradient(135deg, #3A2418, #261F45 60%, #18284A); }
.etsy-card__hero { display: grid; justify-items: center; gap: 10px; color: var(--ink-2); font-weight: 750; font-size: var(--fs-sm); text-align: center; padding: 20px; }
.etsy-card__hero svg { width: 40px; height: 40px; opacity: .6; }
.etsy-card__dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.etsy-card__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(22, 32, 58, .25); }
:root[data-theme='dark'] .etsy-card__dots i { background: rgba(255,255,255,.25); }
.etsy-card__dots i.is-on { background: var(--ink); width: 16px; border-radius: 6px; }
.etsy-card__badge { position: absolute; top: 12px; left: 12px; font-size: .7rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.etsy-card__body { padding: var(--sp-5); display: grid; gap: var(--sp-4); }
.etsy-card__price { display: flex; align-items: center; gap: 10px; }
.etsy-card__price b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.etsy-card__title { font-family: var(--font-ui); font-size: var(--fs-md); font-weight: 600; line-height: 1.45; color: var(--ink); }
.etsy-pers { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 8px; background: var(--surface-2); }
.etsy-pers__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.etsy-pers__head b { font-size: var(--fs-sm); }
.etsy-pers__text { font-size: var(--fs-sm); color: var(--ink-2); }
.etsy-pers__input { height: 40px; border-radius: 8px; border: 1px dashed var(--line-strong); display: flex; align-items: center; padding: 0 12px; font-size: var(--fs-xs); color: var(--faint); background: var(--surface); }
.etsy-card__section { display: grid; gap: 8px; }
.etsy-card__section > b { font-size: var(--fs-sm); }
.etsy-desc { font-size: var(--fs-sm); color: var(--ink-2); max-height: 150px; overflow: hidden; position: relative; display: grid; gap: 2px; }
.etsy-desc::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(transparent, var(--surface)); }
.etsy-desc.is-open { max-height: none; }
.etsy-desc.is-open::after { display: none; }
.etsy-desc__h { font-weight: 800; color: var(--ink); margin-top: 6px; letter-spacing: .02em; }
.etsy-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.etsy-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-3); font-size: var(--fs-xs); font-weight: 650; }
.etsy-tag small { font-size: .62rem; font-weight: 800; color: var(--faint); }
.etsy-tag.is-over { background: var(--no-soft); color: var(--no-ink); }
.etsy-attrs { display: flex; gap: 6px; flex-wrap: wrap; }
.alt-list > summary { justify-content: flex-start; }
.alt-list__max { margin-left: auto; font-weight: 600; font-size: var(--fs-xs); }
.alts { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.alts li { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.alts__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.alts__head b { font-size: var(--fs-xs); }
.alts p { font-size: var(--fs-sm); color: var(--ink-2); }

@media (max-width: 1100px) {
  .seo-editor { grid-template-columns: minmax(0, 1fr); }
  .seo-editor__right { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .seo-head__actions, .seo-head__actions .select, .seo-head__actions .btn { width: 100%; min-width: 0; }
  .seo-section__body { padding: var(--sp-4); }
  .seo-section__head { padding: var(--sp-4) var(--sp-4) 0; }
  .meters { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- shops */
.shop-card { display: grid; overflow: hidden; }
.shop-card__head { display: flex; align-items: center; gap: 14px; padding: var(--sp-6) var(--sp-6) var(--sp-4); }
.shop-card__logo { width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .06em; box-shadow: var(--shadow-md); background: linear-gradient(135deg, #3B6CF6, #7B61FF); }
.shop-card__logo--CBR { background: linear-gradient(135deg, #FF9A5E, #E2531A); }
.shop-card__logo--KBD { background: linear-gradient(135deg, #8F7BFF, #3B6CF6); }
.shop-card__title { flex: 1; min-width: 0; }
.shop-card__title h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); }
.shop-card__title .muted { font-size: var(--fs-sm); }
.shop-card__body { padding: 0 var(--sp-6) var(--sp-5); display: grid; gap: var(--sp-4); }
.shop-card.is-connected { border-color: var(--ok-line); }
.shop-card.is-connected .shop-card__head { background: linear-gradient(180deg, var(--ok-soft), transparent); }
.how { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); counter-reset: how; }
.how li { counter-increment: how; display: grid; gap: 4px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.how li::before { content: counter(how); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 800; font-size: .8rem; margin-bottom: 4px; }
.how b { font-size: var(--fs-sm); }
.how span { font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 1100px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .how { grid-template-columns: minmax(0, 1fr); }
  .shop-card__head { padding: var(--sp-5) var(--sp-4) var(--sp-3); flex-wrap: wrap; }
  .shop-card__body { padding: 0 var(--sp-4) var(--sp-4); }
}

/* --------------------------------------------------------- integrations */
.stat-card { padding: var(--sp-5); display: grid; gap: 8px; }
.stat-card__label { font-size: var(--fs-sm); font-weight: 750; color: var(--muted); }
.stat-card__value { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.integration { padding: var(--sp-5); display: grid; gap: 12px; align-content: start; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.integration:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.integration__head { display: flex; align-items: center; gap: 12px; }
.integration__title { flex: 1; min-width: 0; display: grid; }
.integration__title b { font-size: var(--fs-md); }
.integration__title .muted { font-size: var(--fs-xs); font-weight: 700; }
.integration__detail { font-size: var(--fs-sm); color: var(--ink-2); }
.integration__need { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); font-size: var(--fs-xs); color: var(--ink); }
.integration__need svg { width: 15px; height: 15px; color: var(--warn-ink); flex: none; margin-top: 1px; }
.integration.is-ready { border-color: var(--ok-line); }
.integration.is-later { opacity: .82; }
.integration.is-later .integration__need { background: var(--surface-2); }
.integration.is-later .integration__need svg { color: var(--muted); }
.rules { list-style: none; padding: 0; display: grid; gap: 8px; }
.rule { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 650; }
.rule__icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok-ink); flex: none; }
.rule__icon svg { width: 16px; height: 16px; }
.slider input[type='range'] { width: 100%; accent-color: var(--coral); height: 28px; }
.slider output { font-weight: 800; color: var(--brand); }

/* ----------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); position: relative; }
.login__brand {
  position: relative; overflow: hidden; color: #fff; display: grid; align-items: center; padding: var(--sp-12);
  background:
    radial-gradient(70% 60% at 85% 10%, rgba(255, 138, 76, .45), transparent 60%),
    radial-gradient(70% 70% at 10% 100%, rgba(123, 97, 255, .45), transparent 60%),
    linear-gradient(160deg, #121826, #0B0F1A);
}
.login__brand::after {
  content: ''; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px); background-size: 26px 26px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.login__brand-in { position: relative; z-index: 1; display: grid; gap: var(--sp-8); max-width: 560px; }
.login__brand .brand { color: #fff; }
.login__brand .brand__sub { color: #AEB6C8; }
.login__headline { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -.025em; line-height: 1.08; }
.login__headline em { font-style: normal; background: linear-gradient(100deg, #FFB089, #FF8A4C 40%, #B6A5FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login__points { list-style: none; padding: 0; display: grid; gap: 14px; }
.login__points li { display: flex; gap: 14px; align-items: flex-start; font-size: var(--fs-md); color: #C9CFDC; }
.login__points svg { width: 22px; height: 22px; padding: 8px; box-sizing: content-box; border-radius: 12px; background: rgba(255,255,255,.08); color: #FFB089; flex: none; }
.login__points b { color: #fff; }
.login__flow { display: flex; flex-wrap: wrap; gap: 8px; }
.login__flow span { font-size: .74rem; font-weight: 800; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #DCE2EF; }
.login__flow span.is-gate { background: rgba(47, 191, 127, .18); border-color: rgba(47, 191, 127, .45); color: #9CF0C8; }
.login__panel { position: relative; display: grid; place-items: center; padding: var(--sp-8); }
.login__theme { position: absolute; top: 20px; right: 20px; }
.login__card { width: min(420px, 100%); display: grid; gap: var(--sp-3); }
.login__title { font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; letter-spacing: -.02em; }
.login__form { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); padding: var(--sp-6); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.login__reveal { width: 32px; height: 32px; border: 0; box-shadow: none; }
.login__error { padding: 10px 12px; border-radius: var(--r-sm); background: var(--no-soft); color: var(--no-ink); font-size: var(--fs-sm); font-weight: 650; }
.login__foot { font-size: var(--fs-xs); color: var(--faint); margin-top: var(--sp-4); }
.login__mobile-brand { display: none; }
@media (max-width: 960px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__brand { display: none; }
  .login__mobile-brand { display: flex; padding: 0; margin-bottom: var(--sp-4); }
  .login__panel { padding: var(--sp-6) var(--sp-4); align-items: start; padding-top: 12vh; }
}

@media (max-width: 1280px) { .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) { .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hero { padding: var(--sp-6); } }
@media (max-width: 640px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .flow-step { min-height: 0; padding: 12px; }
  .hero { padding: var(--sp-5); }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; }
  .kpi { padding: var(--sp-4); }
  .kpi__value { font-size: 1.8rem; }
  .card__head .legend-inline { display: none; }
}

.grid--start { align-items: start; }
.mark-legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%; }
.mark-legend__title { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mark-legend__items { display: flex; gap: 16px; flex-wrap: wrap; }
.mark-legend__items > span { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; }
.mark-legend .mark--no { color: var(--no); }

/* ------------------------------------------------- Etsy category (taxonomy) picker */
.taxonomy { gap: 8px; }
.taxonomy__selected { min-height: 28px; display: flex; align-items: center; }
.taxonomy__results { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.taxonomy__results:empty { display: none; }
.taxonomy__item {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; text-align: left;
  padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.taxonomy__item:hover, .taxonomy__item:focus-visible { border-color: var(--brand); background: var(--surface); }
.taxonomy__item.is-selected { border-color: var(--ok); background: var(--ok-soft); }
.taxonomy__item b { font-size: var(--fs-sm); grid-column: 1; }
.taxonomy__item small { grid-column: 1; font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taxonomy__id { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: var(--fs-xs); color: var(--faint); }
.taxonomy__empty { font-size: var(--fs-sm); padding: 6px 2px; }

/* ------------------------------------------------- Phase 2/3: production, orders, inbox, learning */
.stack--tight { gap: 6px; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rows__item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.video-preview { width: 100%; max-width: 640px; border-radius: var(--r-md); border: 1px solid var(--line); background: #000; }

.fulfil-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fulfil-step { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.fulfil-step.is-done { border-color: var(--ok); background: var(--ok-soft); }
.fulfil-step label { cursor: pointer; }
.fulfil-step label > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.fulfil-step.is-done label > svg { color: var(--ok); }
.fulfil-step input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--ok); flex: none; }
.fulfil-step p { margin: 0; }
.sku-links { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.sku-links li { padding: 4px 8px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }

.order, .message { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.order.is-open, .message.is-open { border-color: var(--warn); }
.order__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.order__head > :last-child:is(button, a) { margin-left: auto; }
.order__amount { margin-left: auto; }
.order__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); }
.order__items li { display: flex; flex-wrap: wrap; gap: 8px; }
.order__perso { padding: 1px 6px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.order__note { margin: 0; }
.stars { color: var(--warn); letter-spacing: 1px; }
.message__text { margin: 0; padding: 10px 12px; border-left: 3px solid var(--line); background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; white-space: pre-wrap; }
.message__draft { padding: 10px 12px; border-radius: var(--r-md); border: 1px dashed var(--brand); background: var(--brand-soft); }
.message__draft p { margin: 4px 0 0; white-space: pre-wrap; }
.inbox-conn { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }

.rank { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.rank__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.rank__item > b { margin-left: auto; }
.rank__item--prompt { display: grid; }
.rank__item--prompt p { margin: 0; }

/* Products & categories */
.opt-list { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: var(--fs-sm); cursor: pointer; }
.opt input[type='checkbox'] { width: 15px; height: 15px; accent-color: var(--ok); margin: 0; }
.opt:has(input:checked) { border-color: var(--ok-line); background: var(--ok-soft); }
.input.input--sm { width: 6.5em; flex: none; padding-block: 4px; }
.style-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.option-picks { display: grid; gap: var(--sp-3); }
