/* ============================================================
   ui-polish.css — UI Polish & Restructure (AVA · 2026-04-30)
   Owns: JETR live ops single-row carousel, SPM single-row
   carousel, Genesis layout balance, CTA elite upgrade,
   Alice chat panel polish.
   Loaded after alice-fab.css so it can override.
   Palette: --cyan #00f0ff · --magenta #ff00aa · --green #00ff88
   ============================================================ */

/* ───────── 1 · JETR LIVE OPS — single row carousel ───────── */

.mgr-v2-main.jetr-main-row {
  grid-column: 2 / 4 !important;       /* span out of 3-col grid, no right rail */
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

@media (max-width: 1100px) {
  .mgr-v2-main.jetr-main-row { grid-column: 1 / -1 !important; }
}

.jrow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 8px;
  flex-wrap: wrap;
}
.jrow-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(0, 240, 255, 0.78);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.jrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.7);
  animation: jrowPulse 1.6s ease-in-out infinite;
}
@keyframes jrowPulse { 0%,100% { opacity:.55; } 50% { opacity:1; } }
.jrow-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(245, 245, 245, 0.55);
}

.jrow-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,240,255,0.25) transparent;
}
.jrow-scroll::-webkit-scrollbar { height: 6px; }
.jrow-scroll::-webkit-scrollbar-thumb { background: rgba(0,240,255,0.25); border-radius: 3px; }
.jrow-scroll::-webkit-scrollbar-track { background: transparent; }

.jrow-card {
  position: relative;
  scroll-snap-align: start;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15,17,22,0.92) 0%, rgba(8,9,12,0.96) 100%);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .25s ease;
  cursor: default;
  min-width: 0;
}
.jrow-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.32);
  box-shadow: 0 10px 30px -8px rgba(0, 240, 255, 0.22);
}
.jrow-card-active { border-color: rgba(0, 240, 255, 0.45); }
.jrow-card-active::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,240,255,0.35);
}

.jrow-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0a0a0a;
}
.jrow-thumb video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.jrow-thumb-fill {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0,240,255,0.22), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(255,0,170,0.18), transparent 60%),
    linear-gradient(155deg, #0a1418 0%, #050507 100%);
}
.jrow-thumb-fill::before {
  content: 'JETR';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(0,240,255,0.92), rgba(255,0,170,0.6));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.55;
}

.jrow-mark {
  position: absolute;
  top: 8px; left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px; font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.55);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid rgba(0,240,255,0.35);
  backdrop-filter: blur(4px);
}
.jrow-pill {
  position: absolute;
  top: 8px; right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 7px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}
.jrow-pill-ready  { background: rgba(0,255,136,0.15);  border:1px solid rgba(0,255,136,0.45);  color:#4ade80; }
.jrow-pill-render { background: rgba(245,158,11,0.15); border:1px solid rgba(245,158,11,0.45); color:#f59e0b; }
.jrow-pill-sched  { background: rgba(0,240,255,0.12);  border:1px solid rgba(0,240,255,0.4);   color:#7dd3fc; }

.jrow-body { padding: 10px 11px 12px; }
.jrow-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(245,245,245,0.96);
  margin-bottom: 3px;
}
.jrow-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: rgba(245,245,245,0.55);
  margin-bottom: 8px;
  line-height: 1.35;
}
.jrow-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.jrow-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700;
  color: #00ff88;
  letter-spacing: 0.04em;
}
.jrow-reach {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(245,245,245,0.45);
  letter-spacing: 0.06em;
}

@media (max-width: 540px) {
  .jrow-scroll { grid-auto-columns: 64%; }
  .jrow-head { gap: 4px; }
  .jrow-meta { font-size: 8.5px; }
}

/* ───────── 2 · SPM SINGLE-ROW SIGNAL CAROUSEL ───────── */

.brow {
  margin-top: 16px;
  padding: 14px 14px 6px;
  border: 1px solid rgba(255, 215, 0, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(20,18,4,0.7) 0%, rgba(8,7,2,0.85) 100%);
}
.brow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.brow-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 215, 90, 0.85);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.brow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ffd54a;
  box-shadow: 0 0 10px rgba(255, 215, 74, 0.8);
  animation: jrowPulse 1.6s ease-in-out infinite;
}
.brow-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: rgba(255, 215, 90, 0.5);
  letter-spacing: 0.05em;
}

.brow-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,215,74,0.3) transparent;
}
.brow-scroll::-webkit-scrollbar { height: 6px; }
.brow-scroll::-webkit-scrollbar-thumb { background: rgba(255,215,74,0.28); border-radius: 3px; }

.brow-card {
  position: relative;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 215, 74, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18,16,4,0.95) 0%, rgba(8,7,2,0.98) 100%);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .25s;
}
.brow-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 215, 74, 0.5);
  box-shadow: 0 10px 30px -8px rgba(255, 215, 74, 0.22);
}
.brow-card-active { border-color: rgba(255, 215, 74, 0.55); }
.brow-card-active::after {
  content: ''; position:absolute; inset:0; border-radius:12px; pointer-events:none;
  box-shadow: inset 0 0 0 1px rgba(255,215,74,0.35);
}

.brow-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0a0903;
}
.brow-thumb video { width:100%; height:100%; object-fit:cover; display:block; }
.brow-thumb-fill {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,215,74,0.32), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(255,140,0,0.22), transparent 60%),
    linear-gradient(160deg, #1a1404 0%, #050402 100%);
}
.brow-thumb-fill::before {
  content: 'SPM';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: 0.04em;
  color: rgba(255, 215, 74, 0.55);
}

.brow-mark {
  position: absolute; top:8px; left:8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px; font-weight: 800;
  letter-spacing: 0.18em;
  color: #1a1404;
  background: #ffd54a;
  padding: 3px 7px;
  border-radius: 4px;
}
.brow-pill {
  position: absolute; top:8px; right:8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 7px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}
.brow-pill-live  { background: rgba(0,255,136,0.16);  border:1px solid rgba(0,255,136,0.5);  color:#4ade80; }
.brow-pill-queue { background: rgba(255,215,74,0.14); border:1px solid rgba(255,215,74,0.45); color:#ffd54a; }

.brow-body { padding: 10px 11px 12px; }
.brow-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 232, 130, 0.96);
  margin-bottom: 3px;
}
.brow-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: rgba(255, 232, 130, 0.55);
  margin-bottom: 8px;
  line-height: 1.35;
}
.brow-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.brow-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700;
  color: #ffd54a;
}
.brow-flow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255,232,130,0.5);
  letter-spacing: 0.05em;
}

@media (max-width: 540px) {
  .brow-scroll { grid-auto-columns: 64%; }
  .brow-meta { font-size: 8.5px; }
}

/* ───────── 3 · GENESIS — fix empty left half ───────── */

.genesis .genesis-grid {
  align-items: stretch;             /* match heights */
}
.genesis .genesis-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;                 /* fill column instead of leaving black void */
}
.genesis .genesis-card .genesis-vid {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 380px;
  object-fit: cover;
}
.genesis .genesis-card::after {
  /* subtle inner glow so the card doesn't look like a black slab */
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 0% 100%, rgba(0,240,255,0.07), transparent 60%),
    radial-gradient(100% 80% at 100% 0%, rgba(255,0,170,0.05), transparent 60%);
}

@media (max-width: 900px) {
  .genesis .genesis-card .genesis-vid { min-height: 280px; }
}

/* Chapter cards — keep but make them flex-friendly on narrow */
.genesis .genesis-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.genesis .genesis-chapters .gch { flex: 1 1 calc(50% - 8px); min-width: 160px; }

/* ───────── 4 · CTA ELITE upgrade ───────── */

.cta-inner-elite {
  position: relative;
  z-index: 2;
}

/* refined orbit halo behind headline */
.cta-orbit {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 90vw);
  aspect-ratio: 1 / 1;
  pointer-events: none;
  z-index: -1;
  opacity: 0.85;
}
.cta-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.22);
}
.cta-orbit-ring-1 { inset: 18%; border-color: rgba(0,240,255,0.28); animation: ctaOrbit 28s linear infinite; }
.cta-orbit-ring-2 { inset: 9%; border-color: rgba(255,0,170,0.18); border-style: dashed; animation: ctaOrbit 46s linear infinite reverse; }
.cta-orbit-ring-3 { inset: 0; border-color: rgba(0,240,255,0.12); }
.cta-orbit-pulse {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(0,240,255,0.18), transparent 55%);
  animation: ctaPulse 6s ease-in-out infinite;
  filter: blur(6px);
}
@keyframes ctaOrbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ctaPulse { 0%,100% { opacity:.5; } 50% { opacity:.95; } }

/* eyebrow with SLA hint */
.cta-eyebrow.cta-eyebrow-pro {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(0,240,255,0.3);
  border-radius: 999px;
  background: rgba(0,240,255,0.05);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(0,240,255,0.92);
  backdrop-filter: blur(8px);
}
.cta-eyebrow-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px rgba(0,255,136,0.85), 0 0 0 0 rgba(0,255,136,0.5);
  animation: ctaEyeDot 1.6s ease-out infinite;
}
@keyframes ctaEyeDot {
  0% { box-shadow: 0 0 10px rgba(0,255,136,0.85), 0 0 0 0 rgba(0,255,136,0.5); }
  100% { box-shadow: 0 0 10px rgba(0,255,136,0.85), 0 0 0 12px rgba(0,255,136,0); }
}
.cta-eyebrow-sla {
  padding-left: 10px;
  border-left: 1px solid rgba(0,240,255,0.25);
  color: rgba(245,245,245,0.55);
  font-size: 10px;
  letter-spacing: 0.12em;
}

/* sharper headline gradient on the last line */
.cta-h2.cta-h2-pro .cta-h-grad {
  background: linear-gradient(120deg, #00f0ff 0%, #7dd3fc 35%, #ff00aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(0,240,255,0.25));
}

/* sharper sub copy */
.cta-sub.cta-sub-pro {
  max-width: 580px;
  margin: 14px auto 22px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(245,245,245,0.78);
}
.cta-sub.cta-sub-pro strong {
  color: #00f0ff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ───────── 5 · ALICE CHAT PANEL POLISH ───────── */

/* Tighten panel padding when expanded */
#alice-panel.av4-panel.av3-open,
#alice-panel.av4-panel.av5-open,
#alice-panel.av4-panel.open {
  padding: 14px 14px 12px !important;
}

/* Cleaner header */
#alice-panel.av4-panel .av3-header {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0,240,255,0.1);
}

/* Suggestion cards: 2x3 grid (was wrapping flexy) */
#alice-panel.av4-panel .av3-cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 4px 0 12px !important;
  padding: 0 !important;
}
#alice-panel.av4-panel .av3-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,240,255,0.02);
  border-radius: 8px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  text-align: left;
  min-width: 0;
}
#alice-panel.av4-panel .av3-card:hover {
  border-color: rgba(0,240,255,0.32);
  background: rgba(0,240,255,0.06);
  transform: translateY(-1px);
}
#alice-panel.av4-panel .av3-card .av3-card-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(0,240,255,0.7);
  text-transform: uppercase;
}
#alice-panel.av4-panel .av3-card .av3-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(245,245,245,0.95);
  line-height: 1.3;
  /* prevent text overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#alice-panel.av4-panel .av3-card .av3-card-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: rgba(245,245,245,0.5);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* Tighter input row */
#alice-panel.av4-panel .av3-input-row {
  padding: 8px 10px;
  border: 1px solid rgba(0,240,255,0.18);
  border-radius: 10px;
  background: rgba(0,0,0,0.45);
  margin-top: 6px;
}

/* Foot status line cleaner */
#alice-panel.av4-panel .av3-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Mobile narrowing */
@media (max-width: 480px) {
  #alice-panel.av4-panel .av3-cards {
    grid-template-columns: 1fr !important;
  }
  #alice-panel.av4-panel.av3-open,
  #alice-panel.av4-panel.av5-open,
  #alice-panel.av4-panel.open {
    padding: 12px !important;
  }
}
