/* ============================================================
   APEX VISION · SELLER (Jupiter) — extra styles
   Builds on styles.css. Calmer, larger, more human.
   ============================================================ */

/* Single-column layout for seller */
.s-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.s-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(140%);
  background: rgba(10,10,12,0.55);
  position: relative; z-index: 5;
}
.s-nav { display: flex; gap: 6px; }
.s-nav a {
  padding: 8px 16px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-70);
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.s-nav a:hover { color: var(--ink-100); background: rgba(255,255,255,0.04); }
.s-nav a.on { color: var(--ink-100); background: rgba(255,255,255,0.07); }

.s-stage {
  flex: 1;
  overflow-y: auto;
  padding: 36px 28px 64px;
  position: relative;
}
.s-wrap { max-width: 1100px; margin: 0 auto; }

/* Greeting */
.s-greet {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 28px;
}
.s-greet h1 {
  font-size: 38px;
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.s-greet h1 small {
  display: block;
  font-size: 11px;
  color: var(--ink-50);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-weight: 400;
}
.s-streak {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-50);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.s-streak .num {
  display: block;
  font-size: 32px;
  font-weight: 200;
  color: var(--ink-100);
  letter-spacing: -0.02em;
  font-family: var(--font-sans);
  text-transform: none;
}

/* Question card */
.q-card {
  padding: 36px 36px 32px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}
.q-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-50);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.q-meta .pill {
  padding: 4px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
}
.q-card h2 {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.005em;
  line-height: 1.3;
  text-wrap: pretty;
  max-width: 60ch;
}
.q-card .q-tip {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-50);
  max-width: 60ch;
}
.q-cta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.q-cta .duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-50);
  letter-spacing: 0.1em;
}

/* Two col grid */
.s-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }

/* History list */
.history-card { padding: 22px 26px; }
.history-card h3 {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-50); margin-bottom: 16px; font-family: var(--font-mono); font-weight: 500;
}
.h-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 160ms;
  margin: 0 -10px;
  padding-left: 10px; padding-right: 10px;
  border-radius: 10px;
}
.h-row:hover { background: rgba(255,255,255,0.03); }
.h-row:first-child { border-top: none; }
.h-score {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.h-score.high { background: rgba(255,255,255,0.92); color:#000; border-color: rgba(255,255,255,0.95); }
.h-title { font-size: 13.5px; font-weight: 500; }
.h-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-50); margin-top: 3px; letter-spacing: 0.05em; }
.h-trend {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-50);
}
.h-arrow { color: var(--ink-50); }

/* Skill bars (right column) */
.skills-card { padding: 22px 26px; }
.skill-row { padding: 12px 0; border-top: 1px solid var(--glass-border); }
.skill-row:first-of-type { border-top: none; }
.skill-row .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.skill-row .name { font-size: 12.5px; font-weight: 500; }
.skill-row .val { font-family: var(--font-mono); font-size: 13px; color: var(--ink-90); }
.skill-row .delta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-50); margin-left: 6px; }
.skill-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.skill-bar .fill { height: 100%; background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.95)); border-radius: 99px; transition: width 800ms cubic-bezier(0.2,0.8,0.2,1); }

/* ============================================================
   RECORDING STAGE
   ============================================================ */
.rec-stage {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(5,5,7,0.85);
  backdrop-filter: blur(28px) saturate(140%);
  display: grid; place-items: center;
  padding: 32px;
  animation: fadeIn 280ms ease;
}

.rec-frame {
  width: min(1100px, 100%);
  max-height: calc(100vh - 64px);
  border-radius: 28px;
  padding: 32px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
}

.rec-head {
  display: flex; justify-content: space-between; align-items: center;
}
.rec-head .step {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-50);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.rec-head .close {
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  color: var(--ink-70);
  transition: background 160ms, color 160ms;
}
.rec-head .close:hover { background: rgba(255,255,255,0.08); color: var(--ink-100); }

.rec-video {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--glass-border);
  aspect-ratio: 16 / 9;
}
.rec-video canvas, .rec-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rec-video .question-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 26px 24px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
}
.rec-video .question-overlay .q-text {
  font-size: 16px; font-weight: 400; line-height: 1.4;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  max-width: 80%;
}
.rec-video .rec-badge {
  position: absolute; top: 18px; left: 18px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.rec-video .rec-time {
  position: absolute; top: 18px; right: 18px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.rec-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.rec-meters {
  display: flex; gap: 18px; align-items: center;
}
.meter {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: 9.5px;
  color: var(--ink-50); letter-spacing: 0.18em; text-transform: uppercase;
}
.meter .bars {
  display: flex; gap: 2px; height: 18px;
  align-items: flex-end;
}
.meter .bars span {
  width: 3px; background: rgba(255,255,255,0.4); border-radius: 1px;
  transition: height 120ms;
}

.rec-btn {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.95);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 200ms, background 200ms;
}
.rec-btn:hover { transform: scale(1.05); }
.rec-btn:active { transform: scale(0.97); }
.rec-btn .inner {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: #000;
  transition: width 200ms, height 200ms, border-radius 200ms;
}
.rec-btn.recording .inner { width: 22px; height: 22px; border-radius: 4px; }
.rec-btn.idle .inner { width: 60px; height: 60px; border-radius: 50%; background: #c00; background: #1a1a1a; }

/* Permission gate */
.gate {
  display: grid; place-items: center;
  text-align: center;
  padding: 40px;
}
.gate h2 { font-size: 26px; font-weight: 300; margin-bottom: 12px; letter-spacing: -0.01em; }
.gate p { color: var(--ink-70); max-width: 46ch; margin: 0 auto 28px; line-height: 1.55; }
.gate .device-pulse {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  display: grid; place-items: center;
  margin: 0 auto 24px;
  position: relative;
}
.gate .device-pulse::before, .gate .device-pulse::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  animation: pulseRing 2.6s ease-out infinite;
}
.gate .device-pulse::after { animation-delay: 1.3s; }
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Processing */
.processing {
  display: grid; place-items: center;
  text-align: center; padding: 50px 30px;
}
.processing .ring {
  width: 140px; height: 140px;
  position: relative;
  margin: 0 auto 28px;
}
.processing .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.processing .ring .label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-70);
  text-transform: uppercase;
}
.proc-steps {
  display: flex; gap: 22px;
  justify-content: center;
  margin-top: 30px;
}
.proc-step {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-50);
  text-transform: uppercase;
  text-align: center;
}
.proc-step .dot-lg {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  display: grid; place-items: center;
  background: rgba(255,255,255,0.03);
  position: relative;
  transition: background 240ms, border-color 240ms;
}
.proc-step.active .dot-lg {
  background: rgba(255,255,255,0.08);
  border-color: var(--glass-border-strong);
}
.proc-step.active .dot-lg::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  animation: pulseRing 1.6s ease-out infinite;
}
.proc-step.done .dot-lg {
  background: rgba(255,255,255,0.92);
  color: #000;
  border-color: rgba(255,255,255,0.92);
}
.proc-step.done { color: var(--ink-90); }

/* ============================================================
   RESULTS
   ============================================================ */

.r-hero {
  padding: 36px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 18px;
}
.score-circle {
  width: 220px; height: 220px;
  position: relative;
}
.score-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-circle .center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.score-circle .center > div {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%;
}
.score-circle .center .v {
  font-size: 64px; font-weight: 200; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  width: 100%;
}
.score-circle .center .l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-50);
  text-transform: uppercase;
  margin-top: 4px;
}

.r-hero .summary .label-row {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-50);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.r-hero .summary h2 {
  font-size: 22px; font-weight: 300; line-height: 1.35;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.r-hero .summary .insight {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-70);
  line-height: 1.6;
  max-width: 60ch;
}
.r-hero .summary .actions { display: flex; gap: 10px; margin-top: 22px; }

/* Results grid */
.r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Radar */
.radar-card { padding: 26px; }
.radar-card h3 { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-50); margin-bottom: 16px; font-family: var(--font-mono); font-weight: 500; }
.radar-wrap {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 22px;
  align-items: center;
}
.radar-wrap svg { width: 100%; height: auto; display: block; }
.dim-list {
  display: flex; flex-direction: column; gap: 12px;
}
.dim-list .dim {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  font-size: 12px;
}
.dim-list .dim .name { color: var(--ink-90); }
.dim-list .dim .val { font-family: var(--font-mono); color: var(--ink-100); font-variant-numeric: tabular-nums; }
.dim-list .dim .ev {
  grid-column: 1 / 3;
  font-size: 11px; color: var(--ink-50); line-height: 1.45;
}

/* Recommendations */
.recs-card { padding: 26px; display: flex; flex-direction: column; }
.rec {
  padding: 18px 0;
  border-top: 1px solid var(--glass-border);
}
.rec:first-of-type { border-top: none; }
.rec .priority {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--ink-50);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rec .priority.high { color: var(--ink-100); }
.rec .priority.high .dot { background: #fff; }
.rec .problem { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink-100); }
.rec .impact { margin-top: 6px; font-size: 12.5px; color: var(--ink-65); line-height: 1.55; }
.rec .tip { font-size: 14px; font-weight: 500; line-height: 1.4; }
.rec .problem + .tip,
.rec .impact + .tip { margin-top: 10px; }
.rec .drill { margin-top: 8px; font-size: 12.5px; color: var(--ink-70); line-height: 1.55; }
.rec .drill::before { content: '→ '; color: var(--ink-50); font-family: var(--font-mono); }
.rec .metric { margin-top: 8px; font-size: 11.5px; color: var(--ink-50); line-height: 1.45; font-family: var(--font-mono); }
.rec .metric::before { content: 'META '; color: var(--ink-70); }

/* Transcript card */
.transcript-card { padding: 26px; grid-column: 1 / 3; }
.transcript-card h3 { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-50); margin-bottom: 16px; font-family: var(--font-mono); font-weight: 500; }
.tr-row {
  display: grid; grid-template-columns: 60px 1fr auto; gap: 14px;
  padding: 10px 0;
  align-items: start;
  border-top: 1px dashed var(--glass-border);
  font-size: 13px;
  line-height: 1.55;
}
.tr-row:first-of-type { border-top: none; }
.tr-row .ts { font-family: var(--font-mono); color: var(--ink-50); font-size: 10.5px; padding-top: 3px; letter-spacing: 0.04em; }
.tr-row .text { color: var(--ink-90); text-wrap: pretty; }
.tr-row .text mark {
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}
.tr-row .meta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-50); letter-spacing: 0.08em; padding-top: 4px; }

/* Mini sparkline trend */
.trend-card { padding: 26px; }
.trend-card h3 { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-50); margin-bottom: 4px; font-family: var(--font-mono); font-weight: 500; }
.trend-card .sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-50); margin-bottom: 16px; letter-spacing: 0.06em; }
.trend-card svg { width: 100%; height: 120px; display: block; }

/* Avatar */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-border);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-90);
}

/* ── Animación de entrada por pantalla ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.s-stage {
  animation: fadeUp 240ms ease both;
}

/* ── Hover en cards de features / escenarios ─────────────────────────────── */
.card-hover {
  transition: background 160ms, border-color 160ms, transform 160ms, box-shadow 160ms;
  cursor: pointer;
}
.card-hover:hover {
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(255,255,255,0.22) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px -8px rgba(0,0,0,0.5);
}
.card-hover:active {
  transform: translateY(0);
}

/* ── Escenario seleccionado ──────────────────────────────────────────────── */
.scenario-card {
  transition: background 160ms, border-color 160ms, box-shadow 160ms;
  cursor: pointer;
}
.scenario-card:hover:not(.selected) {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.scenario-card.selected {
  background: rgba(158,245,190,0.07) !important;
  border-color: rgba(158,245,190,0.45) !important;
  box-shadow: 0 0 0 1px rgba(158,245,190,0.15), 0 8px 32px -8px rgba(0,0,0,0.4);
}

/* ── Botón "Comenzar grabación" prominente cuando hay selección ──────────── */
.btn-record-ready {
  background: white !important;
  color: #111 !important;
  border-color: white !important;
  box-shadow: 0 0 28px rgba(255,255,255,0.12);
}
.btn-record-ready:hover {
  background: #f0f0f0 !important;
  box-shadow: 0 0 40px rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
