/* ============================================================================
   QCMA — Design System
   Palette: neon dark blood-red · neon fire-orange · neon blue · neon white · black
   ========================================================================== */

:root {
  /* Core neon palette */
  --black:        #05060a;
  --ink:          #0a0b12;
  --ink-2:        #0e0f18;
  --panel:        rgba(20, 22, 34, 0.62);
  --panel-solid:  #12131d;
  --hairline:     rgba(255, 255, 255, 0.08);
  --hairline-2:   rgba(255, 255, 255, 0.14);

  --white:        #f4f6ff;
  --mute:         #9aa3bd;
  --mute-2:       #6b7392;

  --blood:        #e01034;   /* neon dark blood red */
  --blood-deep:   #8b0018;
  --fire:         #ff6a00;   /* neon fire orange */
  --fire-2:       #ff9a3c;
  --blue:         #38bdf8;   /* neon blue */
  --blue-2:       #00e5ff;

  /* Gradients */
  --grad-fire:  linear-gradient(135deg, var(--fire) 0%, var(--blood) 100%);
  --grad-blue:  linear-gradient(135deg, var(--blue-2) 0%, var(--blue) 60%, #4f7bff 100%);
  --grad-text-fire: linear-gradient(120deg, #ffb257, var(--fire) 40%, var(--blood) 100%);
  --grad-text-blue: linear-gradient(120deg, var(--blue-2), var(--blue) 60%, #6aa8ff 100%);

  /* Effects */
  --glow-fire: 0 0 0 1px rgba(255,106,0,.35), 0 10px 40px -8px rgba(224,16,52,.55);
  --glow-blue: 0 0 0 1px rgba(56,189,248,.35), 0 10px 40px -10px rgba(56,189,248,.45);
  --shadow-card: 0 24px 60px -24px rgba(0,0,0,.85);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  background: var(--black);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- backdrop */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; background:
  radial-gradient(1200px 700px at 15% -10%, rgba(139,0,24,.28), transparent 60%),
  radial-gradient(1000px 800px at 100% 10%, rgba(56,189,248,.10), transparent 55%),
  var(--black);
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb--red    { width: 520px; height: 520px; left: -140px; top: -120px; background: radial-gradient(circle, var(--blood), transparent 65%); }
.orb--blue   { width: 480px; height: 480px; right: -120px; top: 30%; background: radial-gradient(circle, var(--blue), transparent 65%); opacity: .28; }
.orb--orange { width: 420px; height: 420px; left: 40%; bottom: -160px; background: radial-gradient(circle, var(--fire), transparent 65%); opacity: .22; }
.bg-grid { position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 0%, black, transparent 75%);
}

/* ------------------------------------------------------------------- buttons */
.btn {
  --b: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: .7rem 1.25rem; font-weight: 650; font-size: .95rem; color: var(--white);
  transition: transform .16s ease, box-shadow .25s ease, background .25s ease, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn--lg { padding: .95rem 1.7rem; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--grad-fire); box-shadow: var(--glow-fire); }
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(255,106,0,.5), 0 16px 50px -10px rgba(224,16,52,.75); transform: translateY(-1px); }
.btn--glass { background: rgba(255,255,255,.05); border-color: var(--hairline-2); backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255,255,255,.09); border-color: var(--blue); box-shadow: var(--glow-blue); }
.btn--ghost { background: transparent; color: var(--mute); }
.btn--ghost:hover { color: var(--white); }
.btn--google { background: rgba(255,255,255,.06); border-color: var(--hairline-2); }
.btn--google:hover { background: rgba(255,255,255,.1); }
.btn--danger-ghost { background: transparent; border-color: rgba(224,16,52,.4); color: #ff9db0; }
.btn--danger-ghost:hover { background: rgba(224,16,52,.12); border-color: var(--blood); }

.link { background: none; border: 0; color: var(--blue); font-weight: 600; padding: 0; }
.link:hover { text-decoration: underline; }

/* --------------------------------------------------------------- utilities */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); padding: .35rem .7rem; border: 1px solid rgba(56,189,248,.25);
  border-radius: 999px; background: rgba(56,189,248,.06);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 10px var(--blue-2); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.grad-fire { background: var(--grad-text-fire); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-blue { background: var(--grad-text-blue); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--mute); }

/* ----------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(5,6,10,.85), rgba(5,6,10,.55));
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand__mark, .brand img { border-radius: 9px; box-shadow: 0 0 22px -6px rgba(255,106,0,.6); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong { font-size: 1.02rem; letter-spacing: .12em; }
.brand__text em { font-style: normal; font-size: .68rem; color: var(--mute); letter-spacing: .08em; margin-top: 2px; }
.topnav { display: flex; gap: 1.6rem; margin-left: auto; }
.topnav a { color: var(--mute); font-weight: 550; font-size: .95rem; transition: color .2s; }
.topnav a:hover { color: var(--white); }
.topbar__actions { display: flex; gap: .6rem; }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; opacity: .55; }
.hero__scrim { position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--black) 8%, rgba(5,6,10,.6) 45%, rgba(5,6,10,.35) 100%),
  linear-gradient(to top, var(--black), transparent 55%); }
.hero__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero__title { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 850; margin: 1.1rem 0 1.1rem; }
.hero__sub { color: #c7cde3; font-size: 1.12rem; max-width: 34rem; }
.hero__sub em { color: var(--white); font-style: normal; font-weight: 600; }
.hero__cta { display: flex; gap: .8rem; margin: 1.8rem 0 1.1rem; flex-wrap: wrap; }
.hero__trust { display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--mute); font-size: .9rem; }
.hero__trust span { white-space: nowrap; }

/* hero preview card */
.hero__preview { perspective: 1400px; }
.preview-card {
  background: var(--panel); border: 1px solid var(--hairline-2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); backdrop-filter: blur(18px); overflow: hidden;
  transform: rotateY(-9deg) rotateX(4deg); transition: transform .5s ease;
  animation: floaty 6s ease-in-out infinite;
}
.hero__preview:hover .preview-card { transform: rotateY(0deg) rotateX(0deg); }
@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.preview-card__head { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--hairline); background: rgba(255,255,255,.03); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--red { background: var(--blood); } .dot--orange { background: var(--fire); } .dot--blue { background: var(--blue); }
.preview-card__title { margin-left: .5rem; font-size: .82rem; color: var(--mute); }
.preview-card__body { padding: 1rem; display: grid; gap: .8rem; }
.mini-result { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; padding: .7rem; border: 1px solid var(--hairline); border-radius: 12px; background: rgba(255,255,255,.02); }
.mini-thumb { width: 64px; height: 40px; border-radius: 7px; background: linear-gradient(135deg, #2a1a2f, #3a2410); box-shadow: inset 0 0 20px rgba(255,106,0,.25); }
.mini-lines b { font-size: .84rem; display: block; }
.mini-lines span { font-size: .72rem; color: var(--mute); }
.chips { display: flex; gap: .3rem; margin-top: .35rem; flex-wrap: wrap; }
.chips i { font-style: normal; font-size: .64rem; padding: .12rem .45rem; border-radius: 6px; background: rgba(56,189,248,.1); color: var(--blue); }
.score { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.score--hot { background: rgba(224,16,52,.16); color: #ff859a; box-shadow: inset 0 0 0 1px rgba(224,16,52,.4); }
.score--warm { background: rgba(255,106,0,.16); color: var(--fire-2); box-shadow: inset 0 0 0 1px rgba(255,106,0,.4); }
.mini-coach { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem; border-radius: 12px; background: linear-gradient(135deg, rgba(56,189,248,.1), rgba(224,16,52,.06)); border: 1px solid var(--hairline); }
.mini-coach__avatar { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--grad-fire); display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.mini-coach p { font-size: .78rem; color: #d6dbf0; }

/* ------------------------------------------------------------------ stripe */
.stripe { max-width: var(--maxw); margin: 0 auto; padding: 1.4rem clamp(1rem,4vw,2.5rem); display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.stripe__item { text-align: center; }
.stripe__item b { display: block; font-size: 1.2rem; background: var(--grad-text-fire); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stripe__item span { font-size: .82rem; color: var(--mute); }

/* ----------------------------------------------------------------- sections */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem, 7vw, 6rem) clamp(1rem,4vw,2.5rem); }
.section__head { text-align: center; max-width: 40rem; margin: 0 auto 2.8rem; }
.section__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: .8rem 0 .7rem; }
.section__head p { color: var(--mute); font-size: 1.05rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature { position: relative; padding: 1.6rem; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(12px); transition: transform .25s, border-color .25s, box-shadow .25s; overflow: hidden; }
.feature::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 140px at 0% 0%, rgba(255,106,0,.1), transparent 60%); opacity: 0; transition: opacity .3s; }
.feature:hover { transform: translateY(-4px); border-color: var(--hairline-2); box-shadow: var(--shadow-card); }
.feature:hover::before { opacity: 1; }
.feature h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.feature p { color: var(--mute); font-size: .95rem; }
.feature__icon { width: 48px; height: 48px; border-radius: 13px; margin-bottom: 1rem; background: linear-gradient(135deg, rgba(255,106,0,.14), rgba(224,16,52,.08)); border: 1px solid rgba(255,106,0,.28); display: grid; place-items: center; color: var(--fire-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.feature__icon svg { width: 25px; height: 25px; }

/* how it works */
.section--how { position: relative; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; counter-reset: s; }
.step { padding: 1.8rem 1.5rem; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--panel); position: relative; }
.step__n { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--grad-fire); font-weight: 800; margin-bottom: 1rem; box-shadow: var(--glow-fire); }
.step h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step p { color: var(--mute); }

/* pricing */
.price-wrap { display: grid; place-items: center; }
.price-card { position: relative; width: min(420px, 100%); padding: 2.2rem; border-radius: var(--radius-lg); border: 1px solid var(--hairline-2); background: linear-gradient(180deg, rgba(24,26,40,.85), rgba(12,13,22,.9)); box-shadow: var(--shadow-card); overflow: hidden; text-align: center; }
.price-card__glow { position: absolute; top: -60%; left: 50%; translate: -50% 0; width: 120%; height: 120%; background: radial-gradient(circle, rgba(255,106,0,.22), transparent 55%); pointer-events: none; }
.price-card__badge { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); border: 1px solid rgba(56,189,248,.3); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem; }
.price-card__name { font-size: 1.4rem; }
.price-card__amount { margin: .6rem 0 .2rem; }
.price-card__amount b { font-size: 3.2rem; background: var(--grad-text-fire); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-card__amount span { color: var(--mute); font-weight: 600; }
.price-card__note { color: var(--mute); font-size: .9rem; }
.price-card__list { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; display: grid; gap: .7rem; }
.price-card__list li { position: relative; padding-left: 1.8rem; color: #d6dbf0; }
.price-card__list li::before { content: "✔"; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.price-card__fineprint { color: var(--mute-2); font-size: .8rem; margin-top: .9rem; }

/* faq */
.faq { max-width: 46rem; margin: 0 auto; display: grid; gap: .7rem; }
.faq__item { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--panel); padding: .3rem 1.2rem; transition: border-color .2s; }
.faq__item[open] { border-color: var(--hairline-2); }
.faq__item summary { cursor: pointer; padding: .95rem 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq__item summary::after { content: "+"; color: var(--blue); font-size: 1.3rem; transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--mute); padding-bottom: 1rem; }

/* final cta + footer */
.finalcta { max-width: var(--maxw); margin: 0 auto; text-align: center; padding: clamp(3rem,6vw,5rem) 1.5rem; }
.finalcta h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: .6rem; }
.finalcta p { color: var(--mute); margin-bottom: 1.6rem; font-size: 1.1rem; }
.footer { border-top: 1px solid var(--hairline); padding: 2rem clamp(1rem,4vw,2.5rem); max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: .7rem; }
.footer__brand strong { display: block; } .footer__brand span { color: var(--mute); font-size: .82rem; }
.footer__legal { color: var(--mute-2); font-size: .78rem; max-width: 40rem; }

/* =================================================================== MODAL */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(2,3,8,.72); backdrop-filter: blur(6px); }
.modal__panel { position: relative; width: min(430px, 100%); background: linear-gradient(180deg, rgba(22,24,38,.98), rgba(12,13,22,.98)); border: 1px solid var(--hairline-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 2rem; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal__close { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,.05); border: 1px solid var(--hairline); color: var(--mute); width: 32px; height: 32px; border-radius: 8px; }
.modal__close:hover { color: var(--white); }
.auth { text-align: center; }
.auth__logo { margin: 0 auto .8rem; border-radius: 12px; box-shadow: 0 0 30px -6px rgba(255,106,0,.6); }
.auth__title { font-size: 1.5rem; }
.auth__sub { color: var(--mute); font-size: .9rem; margin-top: .3rem; margin-bottom: 1.4rem; }
.auth__divider { display: flex; align-items: center; gap: .8rem; color: var(--mute-2); font-size: .8rem; margin: 1.1rem 0; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.auth__form { display: grid; gap: .9rem; text-align: left; }
.field { display: grid; gap: .35rem; }
.field span { font-size: .82rem; color: var(--mute); font-weight: 600; }
.field input, .select, .license-form input, #licenseKey { width: 100%; padding: .75rem .9rem; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--hairline-2); color: var(--white); font-size: .95rem; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .select:focus, input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.auth__error { color: #ff859a; font-size: .85rem; background: rgba(224,16,52,.1); border: 1px solid rgba(224,16,52,.3); padding: .6rem .8rem; border-radius: 8px; }
.auth__switch { margin-top: 1.2rem; font-size: .9rem; color: var(--mute); }
.auth__forgot { display: block; margin: .6rem auto 0; }

/* ================================================================= APP SHELL */
#app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1.2rem; border-right: 1px solid var(--hairline); background: linear-gradient(180deg, rgba(12,13,22,.9), rgba(8,9,15,.95)); backdrop-filter: blur(12px); }
.brand--app { margin-bottom: 1.6rem; }
.sidenav { display: grid; gap: .3rem; }
.sidenav__item { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; padding: .7rem .85rem; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--mute); font-weight: 600; font-size: .93rem; transition: all .18s; }
.sidenav__item:hover { background: rgba(255,255,255,.04); color: var(--white); }
.sidenav__item.is-active { background: linear-gradient(135deg, rgba(255,106,0,.14), rgba(224,16,52,.1)); color: var(--white); border-color: rgba(255,106,0,.3); box-shadow: inset 0 0 0 1px rgba(255,106,0,.08); }
.ic { display: inline-grid; place-items: center; }
.ic svg { width: 18px; height: 18px; }
.sidebar__foot { margin-top: auto; }
.trial-pill { padding: .8rem; border-radius: 12px; background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.25); font-size: .82rem; color: #cfe8ff; text-align: center; }
.trial-pill.is-warn { background: rgba(255,106,0,.1); border-color: rgba(255,106,0,.35); color: var(--fire-2); }
.trial-pill b { display: block; font-size: 1.1rem; }

.workspace { display: flex; flex-direction: column; min-width: 0; }
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: 1rem clamp(1rem,3vw,2rem); border-bottom: 1px solid var(--hairline); background: rgba(5,6,10,.7); backdrop-filter: blur(12px); }
.appbar__menu { display: none; background: none; border: 0; color: var(--white); font-size: 1.4rem; }
.appbar__title { font-size: 1.25rem; margin-right: auto; }
.appbar__right { display: flex; align-items: center; gap: .9rem; }
.status-pill { font-size: .78rem; font-weight: 600; padding: .35rem .7rem; border-radius: 999px; background: rgba(56,189,248,.12); color: var(--blue); border: 1px solid rgba(56,189,248,.3); }
.status-pill.is-trial { background: rgba(255,106,0,.12); color: var(--fire-2); border-color: rgba(255,106,0,.3); }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--grad-fire); display: grid; place-items: center; font-weight: 800; cursor: pointer; box-shadow: var(--glow-fire); }
.avatar--lg { width: 60px; height: 60px; font-size: 1.5rem; border-radius: 16px; }

.views { padding: clamp(1.2rem, 3vw, 2rem); }
.view { display: none; animation: fade .25s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* scanbar */
.scanbar { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.4rem; backdrop-filter: blur(10px); }
.scanbar__field { display: grid; gap: .4rem; margin-bottom: .9rem; }
.scanbar__field label { font-size: .82rem; color: var(--mute); font-weight: 600; }
.scanbar__field input { width: 100%; padding: .85rem 1rem; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--hairline-2); color: var(--white); font-size: 1.05rem; }
.scanbar__field input:focus { outline: none; border-color: var(--fire); box-shadow: 0 0 0 3px rgba(255,106,0,.15); }
.scanbar__row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--hairline-2); }
.segmented__btn { padding: .5rem .95rem; border-radius: 8px; border: 0; background: transparent; color: var(--mute); font-weight: 600; font-size: .88rem; transition: all .18s; }
.segmented__btn.is-active { background: var(--grad-fire); color: var(--white); box-shadow: 0 4px 14px -4px rgba(224,16,52,.6); }
.select { width: auto; padding: .6rem .9rem; }
.scanbar__row .btn { margin-left: auto; }

.scan-status { display: flex; align-items: center; gap: .7rem; color: var(--mute); padding: .8rem 0; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--fire); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* results grid */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.rcard { border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--panel); overflow: hidden; backdrop-filter: blur(10px); transition: transform .2s, border-color .2s, box-shadow .2s; display: flex; flex-direction: column; }
.rcard:hover { transform: translateY(-3px); border-color: var(--hairline-2); box-shadow: var(--shadow-card); }
.rcard__thumb { position: relative; aspect-ratio: 16/9; background: #14151f; overflow: hidden; }
.rcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rcard__badge { position: absolute; top: .6rem; left: .6rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .25rem .55rem; border-radius: 7px; background: rgba(5,6,10,.7); backdrop-filter: blur(4px); }
.rcard__badge.is-short { color: var(--blue-2); box-shadow: inset 0 0 0 1px rgba(0,229,255,.4); }
.rcard__badge.is-long { color: var(--fire-2); box-shadow: inset 0 0 0 1px rgba(255,106,0,.4); }
.rcard__score { position: absolute; top: .6rem; right: .6rem; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: rgba(5,6,10,.8); backdrop-filter: blur(6px); }
.rcard__body { padding: 1rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.rcard__title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.rcard__meta { display: flex; gap: .8rem; flex-wrap: wrap; color: var(--mute); font-size: .82rem; }
.rcard__meta b { color: var(--white); }
.rcard__channel { font-size: .84rem; color: var(--blue); }
.rcard__hook { font-size: .85rem; color: #d6dbf0; background: rgba(56,189,248,.06); border-left: 2px solid var(--blue); padding: .5rem .7rem; border-radius: 0 8px 8px 0; }
.rcard__tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.tag { font-size: .7rem; padding: .18rem .5rem; border-radius: 6px; background: rgba(255,255,255,.05); color: var(--mute); border: 1px solid var(--hairline); }
.tag--key { background: rgba(56,189,248,.1); color: var(--blue); border-color: rgba(56,189,248,.25); }
.rcard__actions { display: flex; gap: .5rem; margin-top: auto; padding-top: .3rem; }
.rcard__actions .btn { flex: 1; padding: .55rem; font-size: .82rem; }
.iconbtn { flex: none !important; width: 40px; background: rgba(255,255,255,.05); border: 1px solid var(--hairline-2); border-radius: 999px; color: var(--mute); }
.iconbtn.is-saved { color: var(--fire); border-color: rgba(255,106,0,.4); }

/* empty state */
.empty { text-align: center; padding: 4rem 1rem; color: var(--mute); }
.empty__art { font-size: 3rem; margin-bottom: .8rem; }
.empty h3 { font-size: 1.3rem; color: var(--white); margin-bottom: .4rem; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 1.6rem; backdrop-filter: blur(10px); max-width: 900px; }
.panel h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.insights-body { margin-top: 1.4rem; display: grid; gap: 1.4rem; }
.cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.cloud .tag { font-size: .85rem; padding: .35rem .7rem; }
.insight-block h3 { font-size: 1rem; margin-bottom: .6rem; color: var(--blue); }

/* chat */
.view--coach { height: calc(100vh - 140px); }
.chat { display: flex; flex-direction: column; height: 100%; max-width: 820px; margin: 0 auto; }
.chat__log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding: .5rem; }
.msg { max-width: 78%; padding: .85rem 1.1rem; border-radius: 16px; line-height: 1.5; font-size: .95rem; white-space: pre-wrap; }
.msg--user { align-self: flex-end; background: var(--grad-fire); border-bottom-right-radius: 5px; }
.msg--ai { align-self: flex-start; background: rgba(255,255,255,.05); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; }
.msg--ai b { color: var(--blue); }
.chat__composer { display: flex; gap: .6rem; margin-top: 1rem; }
.chat__composer input { flex: 1; padding: .85rem 1.1rem; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--hairline-2); color: var(--white); }
.chat__composer input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.chat__attach { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hairline-2); background: rgba(255,255,255,.05); color: var(--mute); display: grid; place-items: center; cursor: pointer; transition: all .18s; }
.chat__attach:hover { color: var(--blue); border-color: var(--blue); background: rgba(56,189,248,.1); }
.chat__attach svg { width: 20px; height: 20px; }
.chat__previews { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem .2rem -.2rem; }
.chat-chip { position: relative; display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem .4rem .4rem; border: 1px solid var(--hairline-2); border-radius: 10px; background: rgba(255,255,255,.04); font-size: .8rem; max-width: 210px; }
.chat-chip img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.chat-chip .file-ic { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; background: rgba(56,189,248,.12); color: var(--blue); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.chat-chip .chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d6dbf0; }
.chat-chip .chip-x { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(224,16,52,.2); color: #ff9db0; cursor: pointer; font-size: .75rem; line-height: 1; display: grid; place-items: center; }
.chat-chip .chip-x:hover { background: var(--blood); color: #fff; }
.msg__atts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.msg__atts img { width: 130px; max-width: 45vw; border-radius: 8px; display: block; }
.msg__atts .file-ic { padding: .35rem .7rem; border-radius: 8px; background: rgba(0,0,0,.25); font-size: .75rem; align-self: center; }
.chat__suggestions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.chat__suggestions button { font-size: .82rem; padding: .45rem .8rem; border-radius: 999px; background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.25); color: var(--blue); }
.chat__suggestions button:hover { background: rgba(56,189,248,.16); }

/* account */
.account__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.account__status { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.4rem; border: 1px solid var(--hairline-2); background: rgba(255,255,255,.03); }
.account__status.is-active { border-color: rgba(56,189,248,.35); background: rgba(56,189,248,.08); }
.account__status.is-trial { border-color: rgba(255,106,0,.35); background: rgba(255,106,0,.08); }
.account__status.is-locked { border-color: rgba(224,16,52,.4); background: rgba(224,16,52,.1); }
.account__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.account__cell { padding: 1.2rem; border: 1px solid var(--hairline); border-radius: 12px; }
.account__cell h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.license-form { display: flex; gap: .5rem; margin-top: .8rem; }
.license-form input { flex: 1; }
.license-msg { margin-top: .6rem; font-size: .85rem; }
.license-msg.ok { color: var(--blue); } .license-msg.err { color: #ff859a; }
.account__foot { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--hairline); }
.channel-body { margin-top: 1.4rem; }

/* =================================================================== PAYWALL */
#paywall { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; background: radial-gradient(800px 500px at 50% 0%, rgba(139,0,24,.25), transparent), var(--black); }
.paywall__card { width: min(440px,100%); text-align: center; padding: 2.4rem; border-radius: var(--radius-lg); border: 1px solid var(--hairline-2); background: linear-gradient(180deg, rgba(22,24,38,.98), rgba(12,13,22,.98)); box-shadow: var(--shadow-card); }
.paywall__card img { margin: 0 auto 1rem; border-radius: 14px; box-shadow: 0 0 34px -6px rgba(255,106,0,.6); }
.paywall__card h2 { font-size: 1.6rem; }
.paywall__card p { color: var(--mute); margin: .6rem 0 1.2rem; }
.paywall__price { margin-bottom: 1.4rem; }
.paywall__price b { font-size: 2.4rem; background: var(--grad-text-fire); -webkit-background-clip: text; background-clip: text; color: transparent; }
.paywall__price span { color: var(--mute); }
.paywall__card .btn { margin-bottom: .7rem; }
.paywall__logout { display: block; margin: .6rem auto 0; color: var(--mute); }

/* =================================================================== TOASTS */
.toasts { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200; display: grid; gap: .6rem; }
.toast { padding: .85rem 1.2rem; border-radius: 12px; background: rgba(18,19,29,.96); border: 1px solid var(--hairline-2); box-shadow: var(--shadow-card); font-size: .9rem; animation: slidein .25s ease; max-width: 320px; }
.toast.is-ok { border-left: 3px solid var(--blue); }
.toast.is-err { border-left: 3px solid var(--blood); }
.toast.is-info { border-left: 3px solid var(--fire); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* =================================================================== RESPONSIVE */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__preview { display: none; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .stripe { grid-template-columns: repeat(2,1fr); gap: 1.2rem; }
  .topnav { display: none; }
  .account__grid { grid-template-columns: 1fr; }

  #app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 260px; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.is-open { transform: none; }
  .appbar__menu { display: block; }
}
@media (max-width: 520px) {
  .stripe { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .scanbar__row .btn { margin-left: 0; width: 100%; }
}
