/* ============================================================
   LUNA PLAY — Design System v3
   ============================================================ */

:root {
  /* ── Background scale (dark purple-black) ── */
  --bg-0:  #030208;
  --bg-1:  #07060f;
  --bg-2:  #0c0b18;
  --bg-3:  #121021;

  /* ── Surface scale ── */
  --sf-0:  #0f0e1c;
  --sf-1:  #161428;
  --sf-2:  #1d1b34;
  --sf-3:  #252340;

  /* ── Border scale ── */
  --bd-0:  rgba(255,255,255,0.04);
  --bd-1:  rgba(255,255,255,0.08);
  --bd-2:  rgba(255,255,255,0.13);
  --bd-3:  rgba(255,255,255,0.22);

  /* ── Text scale ── */
  --tx-0:  #f0ecff;
  --tx-1:  #c3c0de;
  --tx-2:  #8e8baa;
  --tx-3:  #5e5b78;

  /* ── Brand accent — Lime ── */
  --ac:      #d4ff1e;
  --ac-dim:  rgba(212,255,30,0.10);
  --ac-mid:  rgba(212,255,30,0.22);
  --ac-glow: 0 0 40px rgba(212,255,30,0.16);

  /* ── Semantic colors ── */
  --green:       #4ade80;
  --green-bg:    rgba(74,222,128,0.10);
  --green-bd:    rgba(74,222,128,0.22);
  --amber:       #fbbf24;
  --amber-bg:    rgba(251,191,36,0.10);
  --amber-bd:    rgba(251,191,36,0.22);
  --red:         #f87171;
  --red-bg:      rgba(248,113,113,0.10);
  --red-bd:      rgba(248,113,113,0.22);
  --blue:        #60a5fa;
  --blue-bg:     rgba(96,165,250,0.10);
  --blue-bd:     rgba(96,165,250,0.22);
  --purple:      #a78bfa;
  --purple-bg:   rgba(167,139,250,0.10);
  --purple-bd:   rgba(167,139,250,0.22);

  /* ── Radii ── */
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 9999px;

  /* ── Shadows ── */
  --sh-sm: 0 1px 3px rgba(0,0,0,0.5);
  --sh-md: 0 4px 20px rgba(0,0,0,0.5);
  --sh-lg: 0 12px 40px rgba(0,0,0,0.6);
  --sh-xl: 0 24px 64px rgba(0,0,0,0.7);

  /* ── Easing ── */
  --spring: cubic-bezier(0.16,1,0.3,1);
  --ease:   cubic-bezier(0.25,0.1,0.25,1);

  /* ── Typography ── */
  font-family: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg-0);
  color: var(--tx-0);
}

h1, h2, h3, h4, p { margin: 0; }

button, input, select { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

.hidden { display: none !important; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ─────────────────────────────────────────────────────────────
   SITE — Navigation
───────────────────────────────────────────────────────────── */
.site-layout {
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--tx-0);
}

.site-layout main { overflow: hidden; }

.site-nav {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0;
  width: min(1340px, calc(100% - 64px));
  margin: 0 auto;
  border: 1px solid var(--bd-2);
  border-radius: var(--r-lg);
  background: rgba(7,6,15,0.82);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 var(--bd-2);
  animation: navDrop 0.7s var(--spring) both;
  overflow: hidden;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 28px;
  min-height: 56px;
  border-right: 1px solid var(--bd-1);
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: background 0.2s;
}
.site-logo:hover { background: var(--bd-0); }

.logo-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-3) 0%, #1a1040 100%);
  border: 1px solid var(--bd-2);
  color: var(--ac);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0 12px rgba(212,255,30,0.2);
}

.logo-mark-sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.site-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 22px;
  color: var(--tx-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s;
}
.site-nav-links a:hover { color: var(--tx-0); }

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-left: 1px solid var(--bd-1);
}

/* Site buttons */
.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.site-button.ghost-nav {
  min-height: 38px;
  padding: 0 16px;
  background: transparent;
  color: var(--tx-2);
}
.site-button.ghost-nav:hover { color: var(--tx-0); background: var(--bd-1); }

.site-button.cta-nav {
  min-height: 38px;
  padding: 0 18px;
  background: var(--tx-0);
  color: var(--bg-0);
}
.site-button.cta-nav:hover { background: #ffffff; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(240,236,255,0.15); }

.site-button.cta-hero {
  min-height: 52px;
  padding: 0 28px;
  background: var(--ac);
  color: var(--bg-0);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r);
  box-shadow: 0 0 0 0 rgba(212,255,30,0);
  transition: all 0.2s var(--ease);
}
.site-button.cta-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,255,30,0.28);
}

.site-button.outline-hero {
  min-height: 52px;
  padding: 0 28px;
  background: transparent;
  color: var(--tx-1);
  border: 1px solid var(--bd-2);
  font-size: 15px;
}
.site-button.outline-hero:hover { border-color: var(--bd-3); color: var(--tx-0); transform: translateY(-1px); }

.btn-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Pricing buttons */
.site-button.plan-btn-outline {
  min-height: 42px;
  padding: 0 18px;
  width: 100%;
  background: transparent;
  color: var(--tx-1);
  border: 1px solid var(--bd-2);
  border-radius: var(--r);
}
.site-button.plan-btn-outline:hover { border-color: var(--bd-3); color: var(--tx-0); background: var(--bd-0); }

.site-button.plan-btn-accent {
  min-height: 42px;
  padding: 0 18px;
  width: 100%;
  background: var(--ac);
  color: var(--bg-0);
  font-weight: 700;
  border-radius: var(--r);
}
.site-button.plan-btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(212,255,30,0.24); }

/* ─────────────────────────────────────────────────────────────
   SITE — Hero
───────────────────────────────────────────────────────────── */
.site-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 100px 40px 0;
  background: var(--bg-0);
  isolation: isolate;
  overflow: hidden;
}

.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(167,139,250,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(212,255,30,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 20% 50%, rgba(96,165,250,0.05) 0%, transparent 60%),
    var(--bg-0);
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(rgba(255,255,255,0.25) 0.5px, transparent 0.5px),
    linear-gradient(180deg, transparent 30%, var(--bg-0) 90%);
  background-size: 28px 28px, 100% 100%;
  opacity: 0.28;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.hero-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Network tree */
.network-tree {
  position: absolute;
  top: 16%;
  right: 3%;
  width: min(680px, 52vw);
  height: 430px;
  animation: heroRise 0.9s 0.18s var(--spring) both;
}

.tree-arrows {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.tree-branch {
  fill: none;
  stroke: rgba(212,255,30,0.5);
  stroke-width: 1.5;
  stroke-linecap: round;
  marker-end: url("#treeArrow");
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  filter: drop-shadow(0 0 8px rgba(212,255,30,0.18));
  animation: branchDraw 4s var(--spring) infinite;
}
.branch-2 { animation-delay: 0.2s; }
.branch-3 { animation-delay: 0.4s; }
.branch-4 { animation-delay: 0.6s; }
.branch-5 { animation-delay: 0.8s; }
.branch-6 { animation-delay: 1.0s; }

.tree-node {
  position: absolute;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  border: 1px solid var(--bd-2);
  border-radius: var(--r-pill);
  color: var(--tx-0);
  background: rgba(7,6,15,0.72);
  backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: var(--sh-sm), inset 0 1px 0 var(--bd-1);
}

.tree-root {
  top: 191px;
  left: 0;
  min-width: 138px;
  min-height: 52px;
  border-color: rgba(212,255,30,0.7);
  color: var(--bg-0);
  background: var(--ac);
  box-shadow: var(--ac-glow), var(--sh-md);
  font-weight: 700;
  animation: rootPulse 3s ease-in-out infinite;
}

.network-node {
  right: 0;
  min-width: 148px;
  animation: nodeFloat 5.5s ease-in-out infinite;
}
.node-google    { top: 30px;  }
.node-mintegral { top: 94px;  animation-delay: -0.8s; }
.node-applovin  { top: 158px; animation-delay: -1.6s; }
.node-tiktok    { top: 222px; animation-delay: -2.4s; }
.node-vungle    { top: 286px; animation-delay: -3.2s; }
.node-meta      { top: 350px; animation-delay: -4.0s; }

/* Hero content */
.site-hero-content {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 660px) auto;
  gap: 20px;
  align-items: end;
  padding-bottom: 100px;
}

.hero-badge {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: start;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgba(212,255,30,0.3);
  border-radius: var(--r-pill);
  background: rgba(212,255,30,0.06);
  color: var(--ac);
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
  animation: heroRise 0.8s 0.05s var(--spring) both;
}
.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 8px var(--ac);
  flex: 0 0 auto;
  animation: dotPulse 2.4s ease-in-out infinite;
}

.hero-headline {
  grid-column: 1;
  color: var(--tx-0);
  font-size: clamp(44px, 6.4vw, 84px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.03em;
  animation: heroRise 0.9s 0.12s var(--spring) both;
}

.hero-accent {
  background: linear-gradient(95deg, var(--ac) 0%, #a3ff6e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  grid-column: 1;
  max-width: 540px;
  margin-top: 22px;
  color: var(--tx-2);
  font-size: 17px;
  line-height: 1.6;
  animation: heroRise 0.9s 0.22s var(--spring) both;
}

.site-hero-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-end;
  align-items: flex-end;
  padding-bottom: 8px;
  animation: heroRise 0.9s 0.32s var(--spring) both;
}

.network-marquee {
  overflow: hidden;
  border-top: 1px solid var(--bd-1);
  border-bottom: 1px solid var(--bd-0);
  background: var(--bg-1);
  height: 52px;
  position: relative;
}
.network-marquee::before,
.network-marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 1;
  pointer-events: none;
}
.network-marquee::before { left: 0; background: linear-gradient(to right, var(--bg-1), transparent); }
.network-marquee::after  { right: 0; background: linear-gradient(to left, var(--bg-1), transparent); }

.marquee-track {
  display: flex;
  align-items: center;
  height: 52px;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

.marquee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx-2);
  white-space: nowrap;
  border-right: 1px solid var(--bd-0);
  height: 52px;
  transition: color 0.2s;
}
.marquee-item:hover { color: var(--tx-0); }

.mq-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--tx-3));
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--c, transparent);
}

/* ─────────────────────────────────────────────────────────────
   SITE — Stats bar
───────────────────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(1340px, calc(100% - 64px));
  margin: 48px auto;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
  overflow: hidden;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px 24px;
}
.stat-item strong {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--tx-0);
}
.stat-item span { font-size: 13px; color: var(--tx-2); }

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--bd-1);
  flex: 0 0 auto;
}

/* ─────────────────────────────────────────────────────────────
   SITE — Networks showcase
───────────────────────────────────────────────────────────── */
.networks-section {
  border-top: 1px solid var(--bd-1);
}

.networks-logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 40px;
}

.nlc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 14px 18px;
  background: var(--sf-1);
  border: 1px solid var(--bd-1);
  border-radius: 14px;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: default;
}
.nlc:hover {
  border-color: var(--bd-3);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}

.nlc-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--c, var(--sf-3));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--c, transparent) 30%, transparent);
}

.nlc strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-1);
  line-height: 1.3;
}

.nlc span {
  font-size: 10.5px;
  color: var(--tx-3);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────
   SITE — Feature section
───────────────────────────────────────────────────────────── */
.site-section {
  width: min(1340px, calc(100% - 64px));
  margin: 0 auto;
  padding: 80px 0;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ac);
  font-family: "Cascadia Mono", "Fira Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ac);
  opacity: 0.6;
}

.site-section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.45fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 40px;
}

.site-section-head h2 {
  color: var(--tx-0);
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.site-section-head p {
  color: var(--tx-2);
  font-size: 16px;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--bd-1);
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.feat-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 32px 28px;
  background: var(--sf-0);
  display: grid;
  align-content: start;
  gap: 16px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.feat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.feat-card--lime::before  { background: radial-gradient(ellipse 80% 60% at 0% 0%, rgba(212,255,30,0.08) 0%, transparent 60%); }
.feat-card--blue::before  { background: radial-gradient(ellipse 80% 60% at 0% 0%, rgba(96,165,250,0.08) 0%, transparent 60%); }
.feat-card--purple::before{ background: radial-gradient(ellipse 80% 60% at 0% 0%, rgba(167,139,250,0.08) 0%, transparent 60%); }
.feat-card--green::before { background: radial-gradient(ellipse 80% 60% at 0% 0%, rgba(74,222,128,0.08) 0%, transparent 60%); }

.feat-card:hover { background: var(--sf-1); transform: translateY(-3px); }
.feat-card:hover::before { opacity: 1; }

.feat-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  border: 1px solid var(--bd-1);
}
.feat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feat-card--lime .feat-icon  { background: rgba(212,255,30,0.08);  color: var(--ac);    border-color: rgba(212,255,30,0.2); }
.feat-card--blue .feat-icon  { background: var(--blue-bg);          color: var(--blue);  border-color: var(--blue-bd); }
.feat-card--purple .feat-icon{ background: var(--purple-bg);        color: var(--purple);border-color: var(--purple-bd); }
.feat-card--green .feat-icon { background: var(--green-bg);         color: var(--green); border-color: var(--green-bd); }

.feat-num {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--tx-3);
}

.feat-card h3 {
  color: var(--tx-0);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feat-card p {
  color: var(--tx-2);
  font-size: 14px;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   SITE — How it works
───────────────────────────────────────────────────────────── */
.how-section {
  width: min(1340px, calc(100% - 64px));
  margin: 0 auto;
  padding: 80px 0;
  border-top: 1px solid var(--bd-0);
}

.how-title {
  color: var(--tx-0);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 18px;
  margin-bottom: 56px;
  max-width: 560px;
}

.how-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.how-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.how-step-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--ac-dim);
  border: 1px solid rgba(212,255,30,0.2);
  color: var(--ac);
  font-size: 18px;
  font-weight: 700;
  flex: 0 0 auto;
}

.how-step h3 {
  color: var(--tx-0);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.how-step p { color: var(--tx-2); font-size: 14px; line-height: 1.65; }

.how-step-line {
  flex: 0 0 64px;
  height: 1px;
  background: linear-gradient(90deg, rgba(212,255,30,0.3), transparent);
  margin-top: 22px;
  align-self: flex-start;
}

/* ─────────────────────────────────────────────────────────────
   SITE — Pricing
───────────────────────────────────────────────────────────── */
.site-pricing {
  width: min(1340px, calc(100% - 64px));
  margin: 0 auto;
  padding: 80px 0;
}

.pricing-title {
  max-width: 900px;
  margin-bottom: 48px;
}

.pricing-title h2 {
  color: var(--tx-0);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-top: 14px;
}

.pricing-title mark {
  background: var(--ac);
  color: var(--bg-0);
  padding: 0 4px;
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.pricing-title p {
  margin-top: 18px;
  color: var(--tx-2);
  font-size: 17px;
  line-height: 1.6;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.pricing-grid article {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 32px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--r-lg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-grid article:first-child { border-radius: var(--r-lg); }
.pricing-grid article:last-child  { border-radius: var(--r-lg); }

.pricing-grid article:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  z-index: 2;
}

.pricing-popular {
  background: #ffffff !important;
  border: 2px solid #7c3aed !important;
  box-shadow: 0 4px 32px rgba(124,58,237,0.14) !important;
  border-radius: var(--r-lg) !important;
  z-index: 2;
}

/* Star ribbon for popular/Business plan */
.plan-star-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  border-radius: 0 var(--r-lg) 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 8px 8px 0 0;
  color: #fff;
}

/* Billing toggle */
.billing-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.plans-billing-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  color: #07112d;
}

.billing-label {
  color: #07112d;
  font-size: 14px;
  font-weight: 500;
}

.billing-save-text {
  color: #7c3aed;
  font-size: 13px;
  font-weight: 500;
}

.billing-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  cursor: pointer;
}

.billing-switch input { opacity: 0; width: 0; height: 0; }

.billing-switch-track {
  position: absolute;
  inset: 0;
  background: #c9d0e3;
  border-radius: 999px;
  transition: background 0.2s;
}

.billing-switch-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.billing-switch input:checked + .billing-switch-track { background: #7c3aed; }
.billing-switch input:checked + .billing-switch-track::before { transform: translateX(20px); }

/* Pricing feature rows */
.pricing-feat-head {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0;
}

.pricing-grid li.feat-off {
  opacity: 0.35;
}

.pricing-grid li.feat-off svg {
  stroke: #9ca3af;
}

/* ── Plan card contact button ─────────────────────────────── */
.plan-contact-btn {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid #7c3aed;
  background: #ffffff;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.plan-contact-btn:hover {
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.28);
}

.plan-contact-btn:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* Custom (enterprise) price display */
.pricing-custom {
  font-size: 36px !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--tx-0);
}

/* ── In-app plans panel ─────────────────────────────────────── */

.plans-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.plan-card-v2 {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--dash-line, #e3e6ef);
  border-radius: 12px;
  background: var(--dash-card, #ffffff);
  color: var(--dash-text, #07112d);
  transition: border-color 0.18s, box-shadow 0.18s;
  align-content: start;
}

.plan-card-v2:hover {
  border-color: var(--dash-line-2, #d4d9e7);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.plan-card-v2.active {
  border-color: var(--dash-accent, #a855f7);
  background: rgba(168,85,247,0.04);
}

.plan-card-v2.popular {
  border: 2px solid var(--dash-accent, #a855f7);
  box-shadow: 0 0 28px rgba(168,85,247,0.14);
}

.plan-v2-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-kicker-v2 {
  color: var(--dash-accent-2, #8b5cf6);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-desc {
  color: var(--dash-muted, #727a91);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.plan-price-amount {
  color: var(--dash-text, #07112d);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan-price-amount span {
  color: var(--dash-muted, #727a91);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.plan-price-custom {
  color: var(--dash-text, #07112d);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.plan-feat-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--dash-text, #07112d);
  letter-spacing: 0;
  border-top: 1px solid var(--dash-line, #e3e6ef);
  padding-top: 10px;
  margin-top: 2px;
}

.plan-feat-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-feat-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dash-text, #07112d);
  font-size: 13px;
}

.plan-feat-list li svg {
  flex: 0 0 auto;
  stroke: var(--dash-accent-2, #8b5cf6);
}

.plan-feat-list li.feat-off {
  opacity: 0.35;
}

.plan-feat-list li.feat-off svg {
  stroke: var(--dash-muted, #727a91);
}

.popular-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--ac);
  color: var(--bg-0);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-kicker {
  color: #2563eb;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pricing-grid p {
  color: var(--tx-2);
  font-size: 14px;
  line-height: 1.5;
}

.pricing-amount {
  color: #111827;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.pricing-amount span { color: #6b7280; font-size: 15px; font-weight: 400; letter-spacing: 0; }
.pricing-amount.pricing-custom { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: #111827; }

.pricing-grid ul {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.pricing-grid li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tx-1);
  font-size: 14px;
}
.pricing-grid li svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.enterprise-band {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  margin-top: 1px;
  border: 1px solid var(--bd-1);
  border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--sf-0);
  transition: background 0.24s, border-color 0.24s;
}
.enterprise-band:hover { background: var(--sf-1); border-color: var(--bd-2); }

.enterprise-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--bd-0);
  border: 1px solid var(--bd-1);
  color: var(--tx-2);
}
.enterprise-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.enterprise-band h3 { color: var(--tx-0); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.enterprise-band p  { color: var(--tx-2); font-size: 14px; margin-top: 6px; line-height: 1.5; }
.enterprise-band > .site-button { margin-left: auto; flex: 0 0 auto; }

/* ─────────────────────────────────────────────────────────────
   SITE — Docs
───────────────────────────────────────────────────────────── */
.site-docs {
  width: min(1340px, calc(100% - 64px));
  margin: 0 auto;
  padding: 80px 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.site-docs aside {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 2px;
  padding: 20px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
}

.site-docs aside strong {
  display: block;
  color: var(--tx-0);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.site-docs aside a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--tx-2);
  font-size: 14px;
  transition: color 0.18s, background 0.18s;
}
.site-docs aside a:hover { color: var(--tx-0); background: var(--bd-0); }

.site-docs article {
  padding: 40px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
  overflow: hidden;
}

.site-docs h2 {
  color: var(--tx-0);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 16px;
}

.site-docs article > p {
  max-width: 680px;
  margin-top: 18px;
  color: var(--tx-2);
  font-size: 16px;
  line-height: 1.7;
}

.code-block {
  margin: 28px 0;
  border: 1px solid var(--bd-2);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--bd-1);
}

.code-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.code-dot.red   { background: #ff5f57; }
.code-dot.amber { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-lang {
  margin-left: auto;
  color: var(--tx-3);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.code-block pre {
  margin: 0;
  padding: 22px;
  overflow: auto;
  background: var(--bg-2);
  color: var(--tx-1);
  font-family: "Cascadia Mono", "Fira Code", Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
}

.docs-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid rgba(212,255,30,0.22);
  border-radius: var(--r);
  background: rgba(212,255,30,0.05);
}

.docs-callout-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  fill: none;
  stroke: var(--ac);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-callout strong { display: block; color: var(--ac); font-size: 14px; margin-bottom: 4px; }
.docs-callout span  { color: var(--tx-2); font-size: 14px; line-height: 1.55; }

/* ─────────────────────────────────────────────────────────────
   SITE — Footer
───────────────────────────────────────────────────────────── */
.site-footer {
  width: min(1340px, calc(100% - 64px));
  margin: 0 auto;
  padding: 64px 0 48px;
  border-top: 1px solid var(--bd-1);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 40px 80px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo strong { color: var(--tx-0); font-size: 16px; font-weight: 700; }
.footer-brand > p   { color: var(--tx-3); font-size: 14px; }

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col strong {
  color: var(--tx-0);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col a,
.footer-col button,
.footer-col span {
  color: var(--tx-2);
  font-size: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.18s;
}
.footer-col a:hover,
.footer-col button:hover { color: var(--tx-0); }

.footer-copy {
  grid-column: 1 / -1;
  color: var(--tx-3);
  font-size: 13px;
}

/* ─────────────────────────────────────────────────────────────
   AUTH
───────────────────────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--bg-0);
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(167,139,250,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 85% 80%, rgba(212,255,30,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  padding: 32px;
  border: 1px solid var(--bd-2);
  border-radius: var(--r-xl);
  background: var(--sf-0);
  box-shadow: var(--sh-xl), inset 0 1px 0 var(--bd-2);
  animation: authPop 0.5s var(--spring) both;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--tx-2);
  font-size: 13px;
  transition: color 0.18s;
}
.auth-back:hover { color: var(--tx-0); }
.auth-back svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.auth-brand {
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--bg-3), #1a1040);
  border: 1px solid var(--bd-2);
  color: var(--ac);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0 20px rgba(212,255,30,0.15);
}

.brand-mark-glow {
  box-shadow: 0 0 28px rgba(212,255,30,0.22), inset 0 1px 0 var(--bd-2);
}

.brand strong {
  display: block;
  color: var(--tx-0);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--tx-2);
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r);
  background: var(--bg-2);
}

.auth-tab {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.18s;
}
.auth-tab:hover { color: var(--tx-0); }
.auth-tab.active {
  background: var(--sf-2);
  color: var(--tx-0);
  font-weight: 600;
  box-shadow: var(--sh-sm);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-message {
  min-height: 20px;
  margin-top: 16px;
  color: var(--tx-2);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.wide { width: 100%; }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Layout
───────────────────────────────────────────────────────────── */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  background: var(--bg-1);
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Sidebar
───────────────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--bg-0);
  border-right: 1px solid var(--bd-1);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--bd-0);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--r);
  color: var(--tx-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.18s;
  letter-spacing: -0.01em;
}
.nav-item:hover { color: var(--tx-0); background: var(--bd-0); }
.nav-item.active {
  background: var(--sf-1);
  color: var(--tx-0);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--ac); }

.nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--tx-3);
  transition: color 0.18s;
}
.nav-item:hover .nav-icon { color: var(--tx-1); }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--bd-0);
  display: grid;
  gap: 2px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
}

.status-label {
  color: var(--tx-3);
  font-size: 12px;
}

.status-row strong {
  color: var(--tx-1);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.credits-row strong { color: var(--ac); }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Workspace & topbar
───────────────────────────────────────────────────────────── */
.workspace {
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: rgba(7,6,15,0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--sh-sm), inset 0 1px 0 var(--bd-1);
}

.topbar-left { min-width: 0; }

.eyebrow {
  margin: 0 0 4px;
  color: var(--ac);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tx-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* App shell buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}
.button:hover { transform: translateY(-1px); }

.app-btn-primary {
  background: var(--ac);
  color: var(--bg-0);
  box-shadow: 0 0 0 0 rgba(212,255,30,0);
}
.app-btn-primary:hover { box-shadow: 0 6px 20px rgba(212,255,30,0.25); }

.app-btn-ghost {
  background: var(--bd-0);
  color: var(--tx-1);
  border: 1px solid var(--bd-1);
}
.app-btn-ghost:hover { background: var(--bd-1); color: var(--tx-0); border-color: var(--bd-2); }

.app-btn-danger {
  background: transparent;
  color: var(--tx-2);
  border: 1px solid var(--bd-1);
}
.app-btn-danger:hover { color: var(--red); border-color: var(--red-bd); background: var(--red-bg); }

.button.primary {
  background: var(--ac);
  color: var(--bg-0);
}
.button.primary:hover { box-shadow: 0 6px 20px rgba(212,255,30,0.25); }

.button.secondary {
  background: var(--bd-0);
  color: var(--tx-1);
  border: 1px solid var(--bd-1);
}
.button.secondary:hover { background: var(--bd-1); color: var(--tx-0); }

.button.ghost {
  background: var(--bd-0);
  color: var(--tx-2);
  border: 1px solid var(--bd-1);
}
.button.ghost:hover { background: var(--bd-1); color: var(--tx-0); }

.button.disabled,
.button:disabled {
  opacity: 0.38;
  pointer-events: none;
}

.button-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  width: 38px;
  padding: 0;
}

.link-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--ac);
  font-size: 13px;
  font-weight: 600;
}
.link-button:hover { opacity: 0.8; }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Account strip
───────────────────────────────────────────────────────────── */
.account-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quota-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
  transition: border-color 0.18s, background 0.18s;
}
.quota-card:hover { border-color: var(--bd-2); background: var(--sf-1); }

.quota-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  border: 1px solid transparent;
}
.quota-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quota-icon--lime   { background: var(--ac-dim);    color: var(--ac);     border-color: rgba(212,255,30,0.2); }
.quota-icon--blue   { background: var(--blue-bg);   color: var(--blue);   border-color: var(--blue-bd); }
.quota-icon--purple { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-bd); }
.quota-icon--green  { background: var(--green-bg);  color: var(--green);  border-color: var(--green-bd); }

.quota-card > div > span {
  display: block;
  color: var(--tx-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.quota-card > div > strong {
  display: block;
  color: var(--tx-0);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Panel base
───────────────────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
}

.build-panel,
.job-panel,
.outputs-panel,
.preview-panel,
.history-panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-head h2 {
  color: var(--tx-0);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin-top: 4px;
  color: var(--tx-2);
  font-size: 13px;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Apps panel
───────────────────────────────────────────────────────────── */
.apps-panel {
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
  overflow: hidden;
}

.apps-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bd-1);
}

.apps-panel-title h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--tx-0);
  letter-spacing: -0.01em;
}

.apps-panel-title p {
  margin-top: 3px;
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.5;
}

.apps-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.apps-new-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

/* Active pill */
.app-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--bd-2);
  border-radius: var(--r-pill);
  background: var(--sf-1);
  color: var(--tx-1);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: all 0.2s var(--ease);
}

.app-active-pill:has(.active-pill-dot:not(.inactive)) {
  border-color: rgba(212,255,30,0.3);
  background: rgba(212,255,30,0.06);
  color: var(--ac);
}

.active-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ac);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(212,255,30,0.6);
  animation: pillPulse 2.4s ease-in-out infinite;
}

.active-pill-dot.inactive {
  background: var(--tx-3);
  box-shadow: none;
  animation: none;
}

@keyframes pillPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* App list */
.app-list {
  display: flex;
  flex-direction: column;
}

.app-list-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 20px;
  color: var(--tx-3);
}

.app-list-empty-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--sf-1);
  border: 1px solid var(--bd-1);
  color: var(--tx-3);
}

.app-list-empty-icon svg { width: 18px; height: 18px; }

.app-list-empty strong {
  display: block;
  color: var(--tx-1);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.app-list-empty span {
  font-size: 12px;
  color: var(--tx-3);
}

/* App card row */
.app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--bd-0);
  border-radius: 0;
  background: transparent;
  color: var(--tx-0);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.15s var(--ease);
  position: relative;
}

.app-card:last-child { border-bottom: 0; }

.app-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ac);
  opacity: 0;
  transition: opacity 0.18s;
}

.app-card:hover { background: var(--sf-1); }
.app-card.active { background: rgba(212,255,30,0.04); }
.app-card.active::before { opacity: 1; }

/* App avatar */
.app-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease);
  position: relative;
  overflow: hidden;
}
.app-card:hover .app-avatar { transform: scale(1.06); }

.app-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: none;
}
.app-avatar-img[src]:not([src=""]) { display: block; }

.app-avatar--0 { background: rgba(212,255,30,0.10); color: #d4ff1e; border-color: rgba(212,255,30,0.22); }
.app-avatar--1 { background: rgba(96,165,250,0.10);  color: #60a5fa; border-color: rgba(96,165,250,0.22); }
.app-avatar--2 { background: rgba(167,139,250,0.10); color: #a78bfa; border-color: rgba(167,139,250,0.22); }
.app-avatar--3 { background: rgba(74,222,128,0.10);  color: #4ade80; border-color: rgba(74,222,128,0.22); }
.app-avatar--4 { background: rgba(251,191,36,0.10);  color: #fbbf24; border-color: rgba(251,191,36,0.22); }

/* Card body */
.app-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-card-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-card-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--tx-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.app-version-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--bd-1);
  color: var(--tx-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.app-card-date {
  font-size: 12px;
  color: var(--tx-2);
  line-height: 1.4;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-pill);
  background: var(--bd-0);
  color: var(--tx-2);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.store-chip--android { border-color: rgba(74,222,128,0.18); color: var(--green); }
.store-chip--ios     { border-color: rgba(167,139,250,0.18); color: var(--purple); }

/* Card tail */
.app-card-tail {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.app-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: rgba(212,255,30,0.10);
  border: 1px solid rgba(212,255,30,0.28);
  color: var(--ac);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-card-arrow {
  width: 16px;
  height: 16px;
  color: var(--tx-3);
  transition: color 0.15s, transform 0.18s var(--ease);
}
.app-card:hover .app-card-arrow {
  color: var(--tx-1);
  transform: translateX(3px);
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL — No-app empty state
───────────────────────────────────────────────────────────── */
.no-app-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 72px 32px 80px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
  margin: 0 22px 24px;
  animation: fadeUp 0.4s var(--spring) both;
}

.no-app-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  background: var(--ac-dim);
  border: 1px solid rgba(212,255,30,0.18);
  color: var(--ac);
}

.no-app-icon svg {
  width: 28px;
  height: 28px;
}

.no-app-state h3 {
  color: var(--tx-0);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 360px;
}

.no-app-state p {
  color: var(--tx-2);
  font-size: 14px;
  line-height: 1.65;
  max-width: 420px;
}

.workspace-body { display: contents; }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — App context bar (app "page" header)
───────────────────────────────────────────────────────────── */
.app-context-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-0);
  animation: fadeUp 0.32s var(--spring) both;
}

.app-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r);
  background: transparent;
  color: var(--tx-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.app-back-btn:hover { border-color: var(--bd-2); color: var(--tx-0); background: var(--sf-1); transform: none; }

.app-back-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.18s var(--ease);
}
.app-back-btn:hover .app-back-icon { transform: translateX(-3px); }

.app-ctx-divider {
  width: 1px;
  height: 28px;
  background: var(--bd-1);
  flex-shrink: 0;
}

.app-ctx-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.app-ctx-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.app-ctx-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: none;
}
.app-ctx-icon[src]:not([src=""]) { display: block; }

.app-ctx-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-ctx-info strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tx-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-ctx-info span {
  font-size: 12px;
  color: var(--tx-2);
}

.app-ctx-stores {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ad-id {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  margin-top: 4px;
  padding: 0 8px;
  border: 1px solid var(--bd-0);
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--tx-3);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Builder
───────────────────────────────────────────────────────────── */
.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.78fr);
  gap: 18px;
  align-items: start;
}

/* ── Form fields ── */
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.field { display: grid; gap: 7px; }

.field > span {
  color: var(--tx-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r);
  background: var(--bg-2);
  color: var(--tx-0);
  font-size: 14px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  outline: none;
}
.field textarea {
  padding-top: 11px;
  line-height: 1.45;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--tx-3); }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--bd-2); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(212,255,30,0.5);
  background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(212,255,30,0.08);
}

.field select,
.mini-field select {
  cursor: pointer;
  color-scheme: light;
}
.field select option,
.mini-field select option {
  background: #ffffff;
  color: #020617;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
  color: var(--tx-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Dropzone ── */
.dropzone {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 180px;
  border: 1px dashed var(--bd-2);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  cursor: pointer;
  text-align: center;
  padding: 28px;
  transition: all 0.2s var(--ease);
}
.dropzone:hover,
.dropzone.dragging {
  border-color: rgba(212,255,30,0.45);
  background: rgba(212,255,30,0.03);
}
.dropzone.dragging { transform: scale(1.01); }
.dropzone input { display: none; }

.drop-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  border: 1px solid var(--bd-1);
  background: var(--sf-1);
  color: var(--tx-2);
  transition: all 0.2s;
}
.drop-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dropzone:hover .drop-icon,
.dropzone.dragging .drop-icon {
  border-color: rgba(212,255,30,0.3);
  background: var(--ac-dim);
  color: var(--ac);
}

.dropzone strong {
  color: var(--tx-0);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dropzone > span:last-child { color: var(--tx-3); font-size: 13px; }

/* ── Network grid ── */
.network-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.network-tile {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-1);
  cursor: pointer;
  transition: all 0.18s;
}
.network-tile:hover { border-color: var(--bd-2); background: var(--sf-2); }
.network-tile input { position: absolute; opacity: 0; pointer-events: none; }

.network-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--bg-1);
  border: 1px solid var(--bd-1);
  transition: all 0.18s;
  overflow: hidden;
  flex-shrink: 0;
}

.network-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.network-initial {
  font-size: 12px;
  font-weight: 800;
  color: var(--tx-2);
  letter-spacing: -0.02em;
}

.network-copy { display: grid; min-width: 0; gap: 3px; }
.network-copy strong { color: var(--tx-0); font-size: 13px; font-weight: 600; }
.network-copy span { color: var(--tx-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.network-selected {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--bd-2);
  border-radius: 50%;
  transition: all 0.18s;
}

.network-tile:has(input:checked) {
  border-color: rgba(212,255,30,0.35);
  background: rgba(212,255,30,0.05);
}
.network-tile:has(input:checked) .network-selected {
  border-color: var(--ac);
  background: radial-gradient(circle at center, var(--ac) 0 42%, transparent 45%);
}
.network-tile:has(input:checked) .network-icon { border-color: var(--bd-2); background: var(--bg-2); }

/* ── Build actions ── */
.build-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--bd-0);
}

.build-btn { min-height: 44px; padding: 0 22px; font-size: 15px; }

.build-status-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
}

.inline-status {
  font-size: 13px;
  font-weight: 500;
  color: var(--tx-2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-pill);
  background: var(--sf-2);
  color: var(--tx-1);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Job panel
───────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--tx-3);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.2s;
}

.step-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 2px solid var(--bd-2);
  border-radius: 50%;
  transition: all 0.2s;
}

.step-label { flex: 1; }

.step.active,
.step.done {
  border-color: var(--green-bd);
  background: var(--green-bg);
  color: var(--green);
}
.step.active .step-dot,
.step.done .step-dot {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 8px rgba(74,222,128,0.4);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0;
}

.metrics div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--bd-0);
  border-radius: var(--r);
  background: var(--bg-2);
}

.metrics span { color: var(--tx-3); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.metrics strong { color: var(--tx-0); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

.log-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--tx-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.log-header svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.log {
  min-height: 110px;
  max-height: 220px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--bd-0);
  border-radius: var(--r-lg);
  background: var(--bg-0);
  color: var(--tx-2);
  font-family: "Cascadia Mono", "Fira Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: var(--bd-2) transparent;
}
.log::-webkit-scrollbar { width: 4px; }
.log::-webkit-scrollbar-thumb { background: var(--bd-2); border-radius: var(--r-pill); }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Outputs
───────────────────────────────────────────────────────────── */
.output-list,
.history-list {
  display: grid;
  gap: 8px;
}

.empty {
  min-height: 90px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px dashed var(--bd-1);
  border-radius: var(--r-lg);
  color: var(--tx-3);
  background: var(--bg-2);
  text-align: center;
  font-size: 14px;
}

.output-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-1);
  transition: all 0.18s;
}
.output-item:hover { border-color: var(--bd-2); background: var(--sf-2); }

.output-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.output-title strong {
  color: var(--tx-0);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-meta,
.history-meta {
  margin-top: 5px;
  color: var(--tx-3);
  font-size: 12px;
  line-height: 1.45;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.network-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--tx-2);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 200px;
}
.check-chip strong,
.check-chip span { overflow: hidden; text-overflow: ellipsis; }

.check-chip.pass   { color: var(--green);  border-color: var(--green-bd);  background: var(--green-bg); }
.check-chip.warn   { color: var(--amber);  border-color: var(--amber-bd);  background: var(--amber-bg); }
.check-chip.fail   { color: var(--red);    border-color: var(--red-bd);    background: var(--red-bg); }
.check-chip.info   { color: var(--blue);   border-color: var(--blue-bd);   background: var(--blue-bg); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.pass { color: var(--green);  background: var(--green-bg);  border: 1px solid var(--green-bd); }
.badge.warn { color: var(--amber);  background: var(--amber-bg);  border: 1px solid var(--amber-bd); }
.badge.fail { color: var(--red);    background: var(--red-bg);    border: 1px solid var(--red-bd); }

.history-item > .badge { justify-self: start; }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Preview
───────────────────────────────────────────────────────────── */
.preview-history {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.preview-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r);
  background: var(--bg-2);
}

.preview-mode {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--tx-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.18s;
}
.preview-mode:hover { color: var(--tx-0); }
.preview-mode.active {
  background: var(--sf-3);
  color: var(--tx-0);
  box-shadow: var(--sh-sm);
}

.device-frame {
  position: relative;
  width: min(100%, 400px);
  height: 690px;
  margin: 0 auto;
  padding: 14px;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 44px;
  background: linear-gradient(180deg, #1a1826 0%, #0e0c18 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), inset 0 0 0 1px rgba(255,255,255,0.06), var(--sh-xl);
  transition: width 0.3s var(--spring), height 0.3s var(--spring), border-radius 0.3s var(--spring);
}

.device-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #08060e;
  border-radius: 0 0 18px 18px;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: 0;
  z-index: 1;
}

.device-frame.preview-mobile   { width: min(100%, 380px); height: 680px; }
.device-frame.preview-portrait { width: min(100%, 400px); height: 720px; }
.device-frame.preview-landscape{ width: min(100%, 720px); height: 420px; border-radius: 28px; }

.device-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 32px;
  background: #ffffff;
}
.device-frame.preview-landscape iframe { border-radius: 18px; }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — History
───────────────────────────────────────────────────────────── */
.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-1);
  cursor: pointer;
  transition: all 0.18s;
}
.history-item:hover { border-color: var(--bd-2); background: var(--sf-2); transform: translateX(2px); }
.history-item strong { color: var(--tx-0); font-size: 13px; font-weight: 600; letter-spacing: -0.01em; display: block; }

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Plans
───────────────────────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.plan-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-1);
  transition: all 0.18s;
}
.plan-card:hover { border-color: var(--bd-2); background: var(--sf-2); }
.plan-card.active { border-color: rgba(212,255,30,0.35); background: rgba(212,255,30,0.04); }

.plan-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.plan-head h2 { color: var(--tx-0); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

.plan-price {
  margin-top: 6px;
  color: var(--tx-0);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.plan-price span { color: var(--tx-3); font-size: 13px; font-weight: 400; letter-spacing: 0; }

.plan-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.plan-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tx-2);
  font-size: 13px;
}
.plan-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ac);
  opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL — Team
───────────────────────────────────────────────────────────── */
.team-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.team-create-status {
  grid-column: 1 / -1;
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.4;
}

.support-solutions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.support-solutions article,
.ticket-card {
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-1);
}

.support-solutions article {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.support-question-card > span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--dash-accent-2);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.support-solutions strong,
.ticket-head strong {
  display: block;
  color: var(--tx-0);
  font-size: 15px;
}

.support-solutions p,
.ticket-message,
.ticket-head span,
.ticket-reply span {
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.45;
}

.support-question-card .button {
  justify-self: start;
  margin-top: 2px;
}

.ticket-form {
  display: grid;
  grid-template-columns: 170px 140px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ticket-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
}

.ticket-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #dbe2ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  padding: 22px;
}

.ticket-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ticket-modal-head h2 {
  color: #020617;
  font-size: 22px;
  margin: 0;
}

.ticket-modal-head p {
  margin: 6px 0 0;
  color: var(--dash-muted);
  font-size: 13px;
}

.ticket-modal .icon-button {
  min-width: 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #d8deeb;
  border-radius: 999px;
  background: #ffffff;
  color: #020617;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.ticket-modal .ticket-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.ticket-modal-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ticket-modal-actions .ticket-status {
  margin-right: auto;
  grid-column: auto;
}

.ticket-message-field,
.ticket-status {
  grid-column: 1 / -1;
}

.ticket-list {
  display: grid;
  gap: 12px;
}

.ticket-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ticket-head > div {
  display: grid;
  gap: 3px;
}

.ticket-message {
  margin: 0;
  white-space: pre-wrap;
}

.ticket-replies {
  display: grid;
  gap: 8px;
}

.ticket-reply {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sf-0);
  border: 1px solid var(--bd-1);
}

.ticket-reply.admin-reply {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.08);
}

.ticket-reply p {
  margin: 0;
  color: var(--tx-1);
  white-space: pre-wrap;
}

.muted-reply {
  color: var(--tx-3);
}

.ticket-reply-form {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.ticket-reply-field textarea,
.ticket-message-field textarea {
  min-height: 78px;
  resize: vertical;
}

.admin-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-create-form .button {
  align-self: end;
}

.admin-create-status {
  align-self: center;
  grid-column: span 3;
  color: var(--tx-2);
  font-size: 12px;
  line-height: 1.4;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-user-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--bd-1);
  border-radius: var(--r-lg);
  background: var(--sf-1);
}

.admin-user-main,
.admin-org-row,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-main {
  justify-content: space-between;
}

.admin-user-main strong,
.admin-org-row strong {
  display: block;
  color: var(--tx-0);
}

.admin-user-main span,
.admin-org-row span,
.mini-field span {
  color: var(--tx-3);
  font-size: 12px;
}

.admin-org-row {
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--bd-1);
}

.admin-org-row > div {
  min-width: 220px;
  margin-right: auto;
}

.mini-field {
  display: grid;
  gap: 5px;
  min-width: 110px;
}

.mini-field input,
.mini-field select {
  width: 110px;
  height: 36px;
  border: 1px solid var(--bd-1);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--sf-0);
  color: var(--tx-0);
}

.admin-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────
   DRAWER
───────────────────────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  background: rgba(3,2,8,0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-drawer-panel {
  width: min(100%, 440px);
  height: 100%;
  padding: 24px;
  border: 1px solid var(--bd-2);
  border-radius: var(--r-xl);
  background: var(--sf-0);
  box-shadow: var(--sh-xl), inset 0 1px 0 var(--bd-2);
  animation: drawerIn 0.28s var(--spring);
  overflow-y: auto;
}

.app-drawer-panel form {
  display: grid;
  gap: 16px;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.drawer-head h2 { color: var(--tx-0); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

.drawer-note {
  color: var(--tx-2);
  font-size: 13px;
  line-height: 1.55;
}

/* ─────────────────────────────────────────────────────────────
   REVEAL / SCROLL ANIMATIONS
───────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--spring), transform 0.6s var(--spring);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────────────────────────────
   KEYFRAMES
───────────────────────────────────────────────────────────── */
@keyframes navDrop {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(32px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

@keyframes authPop {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes drawerIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes nodeFloat {
  0%,100% { transform: translate3d(0,0,0); }
  50%      { transform: translate3d(0,-7px,0); }
}

@keyframes rootPulse {
  0%,100% { box-shadow: 0 0 32px rgba(212,255,30,0.22); transform: scale(1); }
  50%     { box-shadow: 0 0 56px rgba(212,255,30,0.38); transform: scale(1.03); }
}

@keyframes branchDraw {
  0%       { stroke-dashoffset: 760; opacity: 0; }
  15%      { opacity: 1; }
  50%,70%  { stroke-dashoffset: 0; opacity: 1; }
  100%     { stroke-dashoffset: -760; opacity: 0; }
}

@keyframes marqueePulse {
  0%,100% { color: var(--tx-3); }
  50%     { color: var(--tx-1); }
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.6; transform: scale(0.8); }
}

/* ─────────────────────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — 1200px
───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid article:first-child { border-radius: var(--r-lg); }
  .pricing-grid article:last-child  { border-radius: var(--r-lg); }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .plans-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .site-section-head { grid-template-columns: 1fr; }
  .networks-logo-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — 1040px
───────────────────────────────────────────────────────────── */
@media (max-width: 1040px) {
  .site-nav { grid-template-columns: auto auto; top: 0; }
  .site-nav-links { display: none; }
  .site-hero-content { grid-template-columns: 1fr; }
  .site-hero-actions { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: flex-start; }
  .site-docs { grid-template-columns: 1fr; }
  .site-docs aside { position: static; }

  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--bd-1);
  }
  .sidebar-brand { border-bottom: 0; border-right: 1px solid var(--bd-1); }
  .nav-list { flex-direction: row; padding: 10px; justify-content: center; }
  .sidebar-footer { display: none; }

  .builder-grid,
  .preview-history { grid-template-columns: 1fr; }
  .account-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — 760px
───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  :root { font-size: 14px; }

  .site-nav,
  .site-section,
  .how-section,
  .site-pricing,
  .site-docs,
  .stats-bar,
  .site-footer { width: calc(100% - 32px); }

  .site-hero { min-height: auto; padding: 88px 16px 0; }
  .network-tree { display: none; }
  .site-hero-content { padding-bottom: 80px; }
  .hero-headline { font-size: 38px; }
  .networks-logo-grid { grid-template-columns: repeat(2, 1fr); }

  .feature-grid,
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid article,
  .pricing-grid article:first-child,
  .pricing-grid article:last-child { border-radius: var(--r-lg); }

  .how-steps { flex-direction: column; gap: 24px; }
  .how-step-line { display: none; }

  .enterprise-band { flex-direction: column; }
  .enterprise-band > .site-button { margin-left: 0; width: 100%; }

  .footer-links { flex-direction: column; gap: 32px; }
  .site-footer { grid-template-columns: 1fr; }

  .workspace { padding: 16px; gap: 14px; }

  .account-strip,
  .field-row,
  .network-grid,
  .metrics,
  .team-form,
  .support-solutions,
  .ticket-form,
  .ticket-modal .ticket-form,
  .ticket-reply-form,
  .plans-grid,
  .plans-cards-grid { grid-template-columns: 1fr; }

  .topbar,
  .panel-head { flex-direction: column; align-items: flex-start; }
  .top-actions,
  .build-actions,
  .output-actions { flex-wrap: wrap; }

  .output-item,
  .history-item { grid-template-columns: 1fr; }

  .device-frame,
  .device-frame.preview-mobile,
  .device-frame.preview-portrait { width: 100%; height: 540px; }
  .device-frame.preview-landscape { width: 100%; height: 280px; border-radius: 20px; }

  .preview-controls { width: 100%; justify-content: stretch; }
  .preview-mode { flex: 1; }

  .stats-bar { flex-wrap: wrap; }
  .stat-divider { display: none; }
  .stat-item { flex: 1 1 40%; }

  .sidebar { grid-template-columns: 1fr; }
  .sidebar-brand { border-right: 0; border-bottom: 1px solid var(--bd-1); }
  .nav-list { flex-wrap: wrap; }

  .drawer-backdrop { padding: 8px; }
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD REDESIGN — LunaX structure, Luna Play theme
───────────────────────────────────────────────────────────── */
.shell {
  --dash-bg: #f7f7fb;
  --dash-rail: #1b1d34;
  --dash-rail-2: #15172c;
  --dash-card: #ffffff;
  --dash-line: #e3e6ef;
  --dash-line-2: #d4d9e7;
  --dash-text: #07112d;
  --dash-muted: #727a91;
  --dash-soft: #f0f2f7;
  --dash-accent: #a855f7;
  --dash-accent-2: #8b5cf6;
  --dash-lime: #d4ff1e;

  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--dash-bg);
  color: var(--dash-text);
}

.shell .sidebar {
  position: sticky;
  top: 0;
  width: 220px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--dash-rail);
  border-right: 0;
  color: #ffffff;
  overflow: hidden;
}

.shell .sidebar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, rgba(212, 255, 30, 0.55), rgba(168, 85, 247, 0.3), transparent 42%);
  opacity: 0.72;
}

.shell .sidebar-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 25px 18px 20px;
  border-bottom: 0;
}

.shell .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--dash-lime);
  color: #121427;
  box-shadow: 0 14px 30px rgba(212, 255, 30, 0.22);
}

.shell .sidebar-brand strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.shell .sidebar-brand span {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,0.52);
  font-size: 12px;
  font-weight: 600;
}

.shell .nav-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 16px;
}

.shell .nav-item {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(232, 233, 255, 0.62);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.shell .nav-item:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.055);
  transform: none;
}

.shell .nav-item.active {
  color: #ffffff;
  background: rgba(255,255,255,0.075);
}

.shell .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 5px;
  height: 38px;
  border-radius: 0 6px 6px 0;
  background: var(--dash-lime);
}

.shell .nav-spacer { margin-top: auto; }

.shell .nav-icon {
  width: 17px;
  height: 17px;
  color: currentColor;
}

.shell .sidebar-footer {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.shell .status-row {
  padding: 7px 9px;
}

.shell .status-label {
  color: rgba(255,255,255,0.48);
}

.shell .status-row strong {
  color: rgba(255,255,255,0.84);
}

.shell .credits-row strong {
  color: var(--dash-lime);
}

.shell .nav-button {
  margin-top: 5px;
  justify-content: flex-start;
}

.shell .workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 25px 34px;
  background: var(--dash-bg);
  color: var(--dash-text);
}

.shell .topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  margin: -18px -25px 0;
  padding: 16px 25px 10px;
  border: 0;
  border-radius: 0;
  background: rgba(247, 247, 251, 0.94);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.workspace-search {
  width: min(530px, 45vw);
  height: 31px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #ffffff;
  color: var(--dash-muted);
}

.workspace-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.workspace-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dash-text);
  font-size: 13px;
}

.workspace-search input::placeholder {
  color: var(--dash-muted);
}

.workspace-search span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f0f1f7;
  color: #a1a7b7;
  font-size: 12px;
  font-weight: 800;
}

.topbar-plan {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #2b345b;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.topbar-plan span + span {
  padding-left: 8px;
  border-left: 1px solid #cfd4e3;
}

.topbar-plan strong {
  color: var(--dash-accent-2);
  font-weight: 850;
}

.upgrade-btn {
  min-height: 31px;
  margin-left: 8px;
  padding: 0 16px;
  border-radius: 999px;
  background: #ffad0d;
  color: #ffffff;
  box-shadow: none;
}

.upgrade-btn:hover {
  background: #f59e0b;
  transform: translateY(-1px);
}

.dashboard-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-top: 4px;
}

.dashboard-title-row h1 {
  margin-top: 24px;
  color: var(--dash-text);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.dashboard-title-row p {
  margin-top: 16px;
  color: var(--dash-text);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb {
  color: #8b93a7;
  font-size: 13px;
  font-weight: 650;
}

.breadcrumb span {
  color: #b0b6c8;
  padding: 0 6px;
}

.shell .top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.shell .button {
  min-height: 32px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.shell .app-btn-primary {
  background: linear-gradient(135deg, var(--dash-accent-2), var(--dash-accent));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(168, 85, 247, 0.2);
}

.shell .app-btn-primary:hover {
  box-shadow: 0 14px 26px rgba(168, 85, 247, 0.28);
}

.shell .app-btn-ghost,
.shell .button.ghost,
.shell .button.secondary {
  color: #2f365d;
  background: #ffffff;
  border: 1px solid #cfd5e5;
  box-shadow: none;
}

.shell .account-strip,
.shell .no-app-state {
  display: none !important;
}

.shell .apps-panel {
  border: 0;
  border-radius: 12px;
  background: transparent;
  overflow: visible;
}

.shell .apps-panel-head {
  padding: 0 0 16px;
  border-bottom: 0;
}

.shell .apps-panel-title h2 {
  color: var(--dash-text);
  font-size: 14px;
  font-weight: 850;
}

.shell .apps-panel-title p {
  color: var(--dash-muted);
  font-size: 13px;
}

.shell .app-active-pill {
  min-height: 30px;
  border: 1px solid #d9deec;
  background: #ffffff;
  color: #4f5875;
}

.shell .active-pill-dot {
  background: var(--dash-accent-2);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.apps-table-head {
  display: grid;
  grid-template-columns: 44px minmax(280px, 1.6fr) minmax(130px, 0.7fr) minmax(130px, 0.55fr) minmax(155px, 0.7fr) 38px;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--dash-line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #ffffff;
  color: #34416a;
  font-size: 12px;
  font-weight: 800;
}

.shell .app-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dash-line);
  border-radius: 0 0 12px 12px;
  background: #ffffff;
  overflow: hidden;
}

.shell .app-list-empty {
  min-height: 210px;
  justify-content: center;
  color: var(--dash-muted);
}

.shell .app-list-empty strong {
  color: var(--dash-text);
}

.shell .app-card {
  min-height: 64px;
  display: grid;
  grid-template-columns: 44px minmax(280px, 1.6fr) minmax(130px, 0.7fr) minmax(130px, 0.55fr) minmax(155px, 0.7fr) 38px;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--dash-line);
  background: #ffffff;
  color: var(--dash-text);
}

.shell .app-card:last-child {
  border-bottom: 0;
}

.shell .app-card::before {
  display: none;
}

.shell .app-card:hover,
.shell .app-card.active {
  background: #fafbfe;
}

.app-row-check {
  width: 16px;
  height: 16px;
  display: block;
  border: 1px solid #cbd2e1;
  border-radius: 4px;
  background: #f8fafc;
}

.shell .app-card.active .app-row-check {
  border-color: var(--dash-accent-2);
  background: linear-gradient(135deg, var(--dash-accent-2), var(--dash-accent));
  box-shadow: inset 0 0 0 3px #ffffff;
}

.app-name-cell {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.app-name-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-name-copy small {
  color: var(--dash-muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell .app-avatar,
.shell .app-ctx-avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 6px;
  font-size: 13px;
  color: #ffffff;
}

.shell .app-avatar--0,
.shell .app-avatar--1,
.shell .app-avatar--2,
.shell .app-avatar--3,
.shell .app-avatar--4 {
  border-color: transparent;
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
}

.shell .app-card:hover .app-avatar {
  transform: none;
}

.shell .app-card-name {
  max-width: min(420px, 45vw);
  color: #020617;
  font-size: 14px;
  font-weight: 780;
}

.platform-cell,
.shell .app-links {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.shell .store-chip {
  height: 23px;
  border: 0;
  background: transparent;
  color: #c5cad8;
  font-size: 0;
  padding: 0 2px;
}

.shell .store-chip svg {
  width: 16px;
  height: 16px;
}

.shell .store-chip:not(:has(svg)) {
  font-size: 12px;
  color: #9aa3b8;
}

.concept-cell {
  color: #020617;
  font-size: 14px;
  font-weight: 680;
}

.shell .app-card-date {
  color: #17213f;
  font-size: 13px;
}

.app-row-menu {
  color: #c4cad8;
  font-size: 23px;
  line-height: 1;
}

.shell .workspace-body {
  display: block;
}

.shell .app-context-bar {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.shell .app-back-btn {
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: #d7dae4;
  color: #ffffff;
  font-size: 0;
}

.shell .app-back-icon {
  width: 15px;
  height: 15px;
}

.shell .app-ctx-divider {
  display: none;
}

.shell .app-ctx-avatar {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  border-radius: 8px;
}

.shell .app-ctx-info strong {
  color: #020617;
  font-size: 24px;
  font-weight: 850;
}

.shell .app-ctx-info span {
  color: var(--dash-muted);
  font-size: 13px;
}

.shell .app-ctx-stores .store-chip {
  font-size: 12px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid #dde2ef;
  background: #ffffff;
}

.shell .panel,
.shell .build-panel,
.shell .job-panel,
.shell .outputs-panel,
.shell .preview-panel,
.shell .history-panel {
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.shell .build-panel,
.shell .job-panel,
.shell .outputs-panel,
.shell .preview-panel,
.shell .history-panel {
  padding: 20px;
}

.shell .panel-head h2 {
  color: #020617;
  font-size: 18px;
  font-weight: 850;
}

.shell .panel-head p,
.shell .field > span,
.shell .section-label,
.shell .inline-status,
.shell .history-meta,
.shell .output-meta {
  color: var(--dash-muted);
}

.shell .builder-grid {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.52fr);
  gap: 20px;
}

.shell .dropzone {
  min-height: 160px;
  border: 1px dashed #ccd4e4;
  border-radius: 12px;
  background: #f7f9fd;
}

.shell .dropzone:hover,
.shell .dropzone.dragging {
  border-color: var(--dash-accent-2);
  background: #f5f1ff;
}

.shell .drop-icon {
  border-color: #dce2ee;
  background: #ffffff;
  color: var(--dash-accent-2);
}

.shell .dropzone strong,
.shell .field input,
.shell .field select,
.shell .field textarea,
.shell .network-copy strong,
.shell .output-title strong,
.shell .history-item strong {
  color: #020617;
}

.shell .field input,
.shell .field select,
.shell .field textarea {
  border: 1px solid #dce2ee;
  background: #f5f6f8;
  color: #020617;
}

.shell .field input:focus,
.shell .field select:focus,
.shell .field textarea:focus {
  border-color: var(--dash-accent-2);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.shell .network-tile {
  border-color: #dce2ee;
  background: #ffffff;
}

.shell .network-tile:hover {
  border-color: #c7cede;
  background: #fafbff;
}

.shell .network-tile:has(input:checked) {
  border-color: rgba(168, 85, 247, 0.42);
  background: #fbf8ff;
}

.shell .network-tile:has(input:checked) .network-selected {
  border-color: var(--dash-accent-2);
  background: radial-gradient(circle at center, var(--dash-accent-2) 0 42%, transparent 45%);
}

.shell .network-icon {
  border-color: #e1e6f2;
  background: #f8fafc;
}

.shell .steps,
.shell .metrics,
.shell .output-list,
.shell .history-list {
  color: #020617;
}

.shell .step {
  color: #6f7890;
}

.shell .step.active {
  border-color: rgba(168,85,247,0.22);
  background: #faf5ff;
  color: #5b21b6;
}

.shell .step.done {
  color: #047857;
}

.shell .metrics > div {
  border-color: #e4e8f2;
  background: #f8fafc;
}

.shell .log {
  background: #111827;
  color: #d9e3f0;
}

.shell .output-item,
.shell .history-item {
  border-color: #e4e8f2;
  background: #ffffff;
}

.shell .empty {
  border-color: #dce2ee;
  background: #f8fafc;
  color: var(--dash-muted);
}

.shell .preview-history {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.52fr);
}

.shell .preview-controls {
  border-color: #dce2ee;
  background: #f4f6fa;
}

.shell .preview-mode {
  color: #677089;
}

.shell .preview-mode.active {
  color: #ffffff;
  background: var(--dash-accent-2);
}

.shell .device-frame {
  background: linear-gradient(180deg, #f1f4fa, #e9edf5);
  border-color: #d5dbe8;
  box-shadow: inset 0 0 0 6px #ffffff;
}

.shell .plans-grid .plan-card,
.shell .team-form,
.shell .support-solutions article,
.shell .ticket-form,
.shell .ticket-card,
.shell .admin-create-form,
.shell #memberList .history-item,
.shell .admin-user-card {
  color: #020617;
}

.shell .drawer-backdrop {
  background: rgba(20, 23, 42, 0.28);
}

.shell .app-drawer-panel {
  background: #ffffff;
  border-color: #e0e5f0;
  color: #020617;
}

.shell .drawer-head h2 {
  color: #020617;
}

.shell .page-section {
  display: block;
}

.shell .page-section.hidden {
  display: none !important;
}

.app-creatives-page {
  min-height: 560px;
}

.app-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 18px;
}

.app-detail-head h2 {
  color: #020617;
  font-size: 15px;
  font-weight: 850;
}

.creative-list {
  min-height: 440px;
}

.creative-empty-state {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.creative-empty-art {
  position: relative;
  width: 170px;
  height: 112px;
  margin-bottom: 4px;
}

.creative-empty-art span {
  position: absolute;
  display: block;
  border-radius: 16px;
}

.creative-empty-art span:nth-child(1) {
  width: 88px;
  height: 88px;
  left: 16px;
  bottom: 4px;
  background: #ffd86b;
  border-radius: 88px 88px 10px 10px;
}

.creative-empty-art span:nth-child(1)::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 0 0;
  background: var(--dash-bg);
}

.creative-empty-art span:nth-child(2) {
  width: 62px;
  height: 38px;
  right: 34px;
  top: 8px;
  background: #9ab6ff;
  transform: rotate(30deg);
}

.creative-empty-art span:nth-child(3) {
  width: 74px;
  height: 24px;
  right: 10px;
  bottom: 24px;
  background: #fb7185;
  transform: rotate(45deg);
}

.creative-empty-state p {
  color: var(--dash-muted);
  font-size: 14px;
}

.creative-empty-state h3 {
  color: #020617;
  font-size: 20px;
  font-weight: 850;
}

.creative-empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.creative-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.creative-row + .creative-row {
  margin-top: 10px;
}

.creative-row:hover {
  border-color: var(--dash-line-2);
  background: #fbfcff;
}

.creative-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.creative-row-main strong {
  color: #020617;
  font-size: 14px;
  font-weight: 800;
}

.creative-row-main span {
  color: var(--dash-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell .creative-upload-page {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
  align-items: start;
}

.shell .creative-upload-page .job-panel,
.shell .creative-upload-page .section-label,
.shell .creative-upload-page .network-grid {
  display: none;
}

.shell .creative-upload-page .build-panel {
  min-height: auto;
}

.creative-review-page {
  display: grid;
  grid-template-columns: minmax(420px, 0.98fr) minmax(340px, 0.82fr);
  gap: 20px;
  align-items: stretch;
  width: min(1152px, 100%);
  margin: 6px auto 0;
}

.creative-review-page.hidden {
  display: none !important;
}

.review-preview-card,
.review-network-card {
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  background: #ffffff;
  padding: 20px;
}

.review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.review-card-head h2 {
  color: #020617;
  font-size: 20px;
  font-weight: 850;
}

.review-card-head p {
  margin-top: 4px;
  color: #34416a;
  font-size: 14px;
}

.review-device-tabs,
.review-orientation-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 9px;
  background: #f0f2f8;
}

.review-orientation-tabs {
  margin-bottom: 14px;
}

.review-tab,
.review-chip {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #68728c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.review-tab.active,
.review-chip.active {
  color: #ffffff;
  background: var(--dash-accent-2);
}

.review-stage {
  min-height: 560px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f4f6fb;
  overflow: hidden;
}

.review-device {
  display: grid;
  place-items: center;
  border: 8px solid #d6dce8;
  background: #e9edf5;
  box-shadow: 0 0 0 6px #ffffff, 0 18px 38px rgba(30, 41, 59, 0.12);
  transition: width 0.22s ease, height 0.22s ease, border-radius 0.22s ease;
}

.review-iphone.review-portrait {
  width: 230px;
  height: 430px;
  border-radius: 34px;
}

.review-iphone.review-landscape {
  width: 430px;
  height: 230px;
  border-radius: 30px;
}

.review-ipad.review-portrait {
  width: 330px;
  height: 470px;
  border-radius: 24px;
}

.review-ipad.review-landscape {
  width: 500px;
  height: 330px;
  border-radius: 24px;
}

.review-device-content {
  max-width: 70%;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  color: #0f172a;
}

.review-app-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--dash-accent-2), #38bdf8);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.review-device-content strong {
  max-width: 100%;
  color: #07112d;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.review-device-content span {
  color: #64748b;
  font-size: 12px;
}

.review-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #020617;
  font-size: 13px;
  font-weight: 750;
}

.review-select-all input {
  accent-color: var(--dash-accent-2);
}

.review-network-list {
  display: grid;
  gap: 9px;
}

.review-network-option {
  min-height: 40px;
  display: grid;
  grid-template-columns: 18px 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid #d8deeb;
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
}

.review-network-option:has(input:checked) {
  border-color: rgba(168, 85, 247, 0.44);
  background: #fbf8ff;
}

.review-network-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.review-network-check {
  width: 16px;
  height: 16px;
  border: 1px solid #c8cfdd;
  border-radius: 4px;
  background: #f8fafc;
}

.review-network-option:has(input:checked) .review-network-check {
  border-color: var(--dash-accent-2);
  background: var(--dash-accent-2);
  box-shadow: inset 0 0 0 4px #ffffff;
}

.review-network-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
}

.review-network-icon svg {
  width: 20px;
  height: 20px;
}

.review-network-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.review-network-copy strong {
  color: #07112d;
  font-size: 13px;
  font-weight: 800;
}

.review-network-copy span {
  color: var(--dash-muted);
  font-size: 11px;
}

.review-network-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--dash-line);
  color: #34416a;
  font-size: 14px;
}

.review-network-card {
  display: flex;
  flex-direction: column;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.creative-result-page.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .shell .sidebar {
    position: static;
    width: auto;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .shell .sidebar-brand {
    border-right: 1px solid rgba(255,255,255,0.08);
  }

  .shell .nav-list {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .shell .nav-spacer {
    margin-top: 0;
  }

  .shell .sidebar-footer {
    display: none;
  }

  .topbar-plan {
    flex-wrap: wrap;
  }

  .shell .builder-grid,
  .shell .preview-history,
  .creative-review-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .shell .workspace {
    padding: 14px;
  }

  .shell .topbar {
    margin: -14px -14px 0;
    padding: 12px 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-search {
    width: 100%;
  }

  .topbar-plan {
    justify-content: flex-start;
    white-space: normal;
  }

  .dashboard-title-row {
    flex-direction: column;
  }

  .shell .apps-panel-head,
  .shell .apps-panel-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .apps-table-head {
    display: none;
  }

  .shell .app-list {
    border-radius: 12px;
  }

  .shell .app-card {
    grid-template-columns: 26px minmax(0, 1fr) 30px;
    gap: 10px;
    padding: 14px;
  }

  .shell .platform-cell,
  .shell .concept-cell,
  .shell .app-card-date {
    grid-column: 2 / -1;
  }

  .shell .app-card-tail {
    grid-column: 3;
    grid-row: 1;
  }

  .shell .field-row,
  .shell .network-grid,
  .shell .metrics,
  .shell .team-form,
  .shell .support-solutions,
  .shell .ticket-form,
  .shell .ticket-modal .ticket-form,
  .shell .ticket-reply-form,
  .shell .admin-create-form,
  .shell .plans-grid {
    grid-template-columns: 1fr;
  }

  .shell .app-context-bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .creative-empty-actions,
  .review-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .review-stage {
    min-height: 360px;
  }

  .review-iphone.review-portrait,
  .review-ipad.review-portrait {
    width: min(230px, 78vw);
    height: 380px;
  }

  .review-iphone.review-landscape,
  .review-ipad.review-landscape {
    width: min(330px, 82vw);
    height: 210px;
  }
}
