/* ─────────────────────────── ROOT ─────────────────────────── */
:root {
  --bg: #0a0000;
  --bg-soft: #100404;
  --bg-card: rgba(28, 10, 10, 0.5);
  --bg-card-solid: #140606;
  --bg-elevated: #1a0a0a;
  --bg-input: rgba(20, 8, 8, 0.6);

  --primary: #dc2626;
  --primary-bright: #ef4444;
  --primary-glow: rgba(220, 38, 38, 0.55);
  --primary-dim: rgba(220, 38, 38, 0.1);
  --primary-tint: rgba(220, 38, 38, 0.06);

  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --text-faint: #52525b;

  --border: rgba(220, 38, 38, 0.16);
  --border-bright: rgba(220, 38, 38, 0.32);
  --border-soft: rgba(255, 255, 255, 0.06);

  --grid-color: rgba(220, 38, 38, 0.085);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;

  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-red: 0 0 40px rgba(220, 38, 38, 0.25);
  --shadow-red-lg: 0 0 80px rgba(220, 38, 38, 0.35);

  --font-sans: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Consolas', 'Space Mono', ui-monospace, monospace;

  --t: 0.25s ease;
  --t-slow: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 70px 70px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.92; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0506; }
::-webkit-scrollbar-thumb { background: rgba(220, 38, 38, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(220, 38, 38, 0.5); }

/* ─────────────────────────── REVEAL (SCROLL ANIMATION) ─────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.5s var(--t-slow), transform 0.5s var(--t-slow); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.94); }
.reveal-d-1.in-view { transition-delay: 0.08s; }
.reveal-d-2.in-view { transition-delay: 0.16s; }
.reveal-d-3.in-view { transition-delay: 0.24s; }
.reveal-d-4.in-view { transition-delay: 0.32s; }
.reveal-d-5.in-view { transition-delay: 0.40s; }
.reveal-d-6.in-view { transition-delay: 0.48s; }

/* ─────────────────────────── BUTTONS ─────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 24px rgba(220, 38, 38, 0.32);
}
.btn-primary:hover {
  background: var(--primary-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 32px rgba(220, 38, 38, 0.5);
  opacity: 1;
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}
.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  opacity: 1;
}

.btn-outline-red {
  background: transparent;
  color: var(--primary-bright);
  border-color: var(--border-bright);
}
.btn-outline-red:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
  opacity: 1;
}

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); opacity: 1; }

.btn-danger { background: rgba(220, 38, 38, 0.15); color: var(--primary-bright); border-color: rgba(220, 38, 38, 0.3); }
.btn-danger:hover { background: rgba(220, 38, 38, 0.25); opacity: 1; }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ─────────────────────────── NAVBAR (Frosted Glass Pill) ─────────────────────────── */
.navbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  padding: 0 16px;
  margin-top: 16px;
}
.nav-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 6px;
  background: rgba(20, 6, 6, 0.42);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 100px;
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-radius var(--t), padding var(--t), height var(--t);
}
.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
}
.nav-left { justify-content: flex-start; padding-left: 14px; }
.nav-right { justify-content: flex-end; padding-right: 6px; }
.nav-center {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 100px;
  transition: background var(--t);
  white-space: nowrap;
}
.nav-center:hover { background: rgba(255, 255, 255, 0.04); opacity: 1; }
.nav-center img { width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.7)); }
.nav-link {
  padding: 8px 14px;
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--t);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); opacity: 1; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--t);
  flex: 0 0 auto;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }
.nav-toggle:hover { background: rgba(255, 255, 255, 0.06); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-left, .nav-right { display: none; }
  .nav-center { flex: 1; justify-content: center; padding-left: 38px; }
  .nav-inner { padding: 0 12px; gap: 8px; }

  .navbar.open .nav-inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 16px;
    border-radius: 24px;
    gap: 6px;
    position: relative;
  }
  .navbar.open .nav-left,
  .navbar.open .nav-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    gap: 2px;
  }
  .navbar.open .nav-center {
    align-self: center;
    order: -1;
    flex: 0 0 auto;
    margin: 0 0 8px;
    padding-left: 12px;
  }
  .navbar.open .nav-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
  }
  .navbar.open .nav-link {
    width: 100%;
    text-align: center;
    padding: 11px 16px;
  }
  .navbar.open .btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
}

/* ─────────────────────────── HERO ─────────────────────────── */
.hero {
  position: relative;
  padding: 96px 24px 88px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  width: 720px;
  height: 720px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(220, 38, 38, 0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; }
.hero-logo {
  width: 130px;
  height: 130px;
  margin: 0 auto 32px;
  filter: drop-shadow(0 0 18px rgba(220, 38, 38, 0.7)) drop-shadow(0 0 40px rgba(220, 38, 38, 0.4));
}
.hero h1 {
  font-size: clamp(54px, 9vw, 108px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--primary-bright); }
.hero-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--primary-bright);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-desc {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 44px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}
.hero-trust-item { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust-item svg { width: 16px; height: 16px; color: var(--primary); }

/* ─────────────────────────── SECTIONS ─────────────────────────── */
.section { padding: 100px 24px; position: relative; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 64px; }
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--primary-bright);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 14px;
}
.section-title .accent { color: var(--primary-bright); }
.section-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─────────────────────────── FEATURES (CAPABILITIES) ─────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--t);
  position: relative;
}
.feature-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(220, 38, 38, 0.15);
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--primary-bright);
  border: 1px solid var(--border);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.feature-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ─────────────────────────── ABOUT ─────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.about-title { font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 24px; }
.about-desc { font-size: 16px; color: var(--text-muted); line-height: 1.8; margin-bottom: 28px; }
.about-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--primary-bright);
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  padding: 8px 16px;
  text-transform: uppercase;
  background: var(--primary-tint);
}
.limit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.limit-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.07), transparent 70%);
}
.limit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.limit-head svg { width: 20px; height: 20px; color: var(--primary-bright); }
.limit-head-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--primary-bright);
  letter-spacing: 0.04em;
}
.limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  position: relative;
}
.limit-row + .limit-row { border-top: 1px solid var(--border-soft); }
.limit-key { font-size: 14px; color: var(--text-muted); }
.limit-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary-bright);
  letter-spacing: 0.04em;
}

/* ─────────────────────────── PRICING ─────────────────────────── */
.price-group { margin-top: 40px; }
.price-group + .price-group { margin-top: 56px; }
.price-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.price-group-head img { width: 26px; height: 26px; filter: drop-shadow(0 0 4px rgba(220, 38, 38, 0.6)); }
.price-group-title { font-size: 18px; font-weight: 700; }
.price-group-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  background: var(--primary);
  color: #fff;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: uppercase;
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 800px) { .price-grid { grid-template-columns: 1fr; } }

.price-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .price-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .price-grid-3 { grid-template-columns: 1fr; } }

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all var(--t);
}
.price-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.price-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-red);
}
.price-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 5px 16px;
  border-radius: 100px;
  white-space: nowrap;
  text-transform: uppercase;
}
.price-tier { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.price-amount { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.price-num { font-size: 48px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.price-period { color: var(--text-dim); font-size: 15px; }
.price-crypto-note { font-size: 13px; color: var(--text-faint); margin-bottom: 24px; }
.price-features { list-style: none; margin: 0 0 28px; }
.price-card > .btn { margin-top: auto; }
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.price-features li svg { width: 16px; height: 16px; color: var(--primary-bright); flex-shrink: 0; margin-top: 3px; }

/* Enterprise grid (2 cards side by side) */
.enterprise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 900px) { .enterprise-grid { grid-template-columns: 1fr; } }
.enterprise-grid > .mcp-card { display: flex; flex-direction: column; }
.enterprise-grid .mcp-features { flex: 1; }

.mcp-card-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 6px 0 16px;
  color: var(--text);
}

/* MCP wide card */
.mcp-card {
  background: var(--bg-card);
  border: 1px solid var(--primary-bright);
  border-radius: var(--radius);
  padding: 40px 36px;
  position: relative;
  box-shadow: var(--shadow-red);
}
.mcp-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  padding: 6px 18px;
  border-radius: 100px;
  text-transform: uppercase;
  white-space: nowrap;
}
.mcp-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--primary-bright);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.mcp-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.mcp-price-num { font-size: 56px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.mcp-price-period { color: var(--text-dim); font-size: 16px; }
.mcp-desc { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 28px; max-width: 720px; }
.mcp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 24px;
  list-style: none;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .mcp-features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .mcp-features { grid-template-columns: 1fr; } }

/* When inside enterprise-grid (narrower card), use 1 column */
.mcp-features-narrow { grid-template-columns: 1fr !important; }
.mcp-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.mcp-features li svg { width: 16px; height: 16px; color: var(--primary-bright); flex-shrink: 0; margin-top: 3px; }
.mcp-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─────────────────────────── FAQ ─────────────────────────── */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--t);
}
.faq-item:hover { border-color: var(--border-bright); }
.faq-item.open { border-color: var(--border-bright); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  padding: 20px 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color var(--t);
}
.faq-q:hover { color: var(--primary-bright); }
.faq-q-icon {
  color: var(--primary-bright);
  transition: transform 0.35s ease;
  flex-shrink: 0;
}
.faq-q-icon svg { width: 18px; height: 18px; display: block; }
.faq-item.open .faq-q-icon { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 24px;
}
.faq-item.open .faq-a { max-height: 320px; padding: 0 24px 22px; }
.faq-a p { font-size: 14px; color: var(--text-muted); line-height: 1.75; }

/* ─────────────────────────── CTA SECTION ─────────────────────────── */
.cta-section {
  text-align: center;
  padding: 100px 24px;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(220, 38, 38, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { position: relative; max-width: 720px; margin: 0 auto; }
.cta-title { font-size: clamp(34px, 5vw, 52px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 20px; }
.cta-title .accent { color: var(--primary-bright); }
.cta-desc { font-size: 17px; color: var(--text-muted); line-height: 1.7; margin-bottom: 36px; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ─────────────────────────── FOOTER ─────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 64px 24px 36px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand { max-width: 360px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); margin-bottom: 16px; }
.footer-logo img { width: 28px; height: 28px; filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.6)); }
.footer-tagline { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.footer-col-title { font-weight: 700; font-size: 14px; margin-bottom: 18px; color: var(--text); }
.footer-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-list a { font-size: 14px; color: var(--text-muted); transition: color var(--t); }
.footer-list a:hover { color: var(--primary-bright); opacity: 1; }
.footer-socials { display: flex; gap: 10px; margin-bottom: 16px; }
.footer-social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--t);
}
.footer-social:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
.footer-contact { font-size: 13px; color: var(--text-dim); }
.footer-contact a { color: var(--primary-bright); }
.footer-bar {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
}

/* ─────────────────────────── AUTH PAGE ─────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 24px 64px;
  position: relative;
}
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color var(--t);
}
.back-home:hover { color: var(--text); opacity: 1; }
.back-home svg { width: 16px; height: 16px; }

.auth-shell {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16px;
}
.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 44px 40px;
  position: relative;
  box-shadow: var(--shadow-red);
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.6), transparent);
}
.auth-logo-wrap { text-align: center; margin-bottom: 22px; }
.auth-logo-img { width: 84px; height: 84px; margin: 0 auto; filter: drop-shadow(0 0 15px rgba(220, 38, 38, 0.7)); }
.auth-title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 8px; letter-spacing: -0.02em; }
.auth-sub { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 32px; }
.auth-toggle { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-muted); }
.auth-toggle a { color: var(--primary-bright); font-weight: 600; cursor: pointer; transition: color var(--t); }
.auth-toggle a:hover { color: var(--primary); opacity: 1; }

/* ─────────────────────────── FORMS ─────────────────────────── */
.form-group { margin-bottom: 18px; }
.otp-row { display: flex; gap: 10px; align-items: stretch; }
.otp-row .form-control { flex: 1; }
.otp-send-btn { white-space: nowrap; }
.otp-help { margin-top: 8px; font-size: 12px; color: var(--text-faint); line-height: 1.5; }
.otp-actions { display: flex; gap: 10px; margin-top: 16px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-label .opt { color: var(--text-faint); font-weight: 400; font-size: 12px; margin-left: 4px; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.input-icon svg { width: 18px; height: 18px; }
.form-control {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.input-wrap .form-control { padding-left: 46px; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }
.form-control::placeholder { color: var(--text-faint); }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.form-error { font-size: 13px; color: var(--primary-bright); margin-top: 8px; }

/* ─────────────────────────── ALERTS ─────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.alert-error { background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.25); color: #fca5a5; }
.alert-success { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.2); color: #86efac; }
.alert-warning { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.22); color: #fcd34d; }

/* ─────────────────────────── BADGES ─────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  font-weight: 600;
}
.badge-primary { background: var(--primary-dim); color: var(--primary-bright); border: 1px solid var(--border-bright); }
.badge-purple { background: rgba(139,92,246,0.13); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.26); }
.badge-green { background: rgba(34,197,94,0.13); color: #86efac; border: 1px solid rgba(34,197,94,0.26); }
.badge-red { background: rgba(220,38,38,0.13); color: #fca5a5; border: 1px solid rgba(220,38,38,0.26); }
.badge-yellow { background: rgba(245,158,11,0.13); color: #fcd34d; border: 1px solid rgba(245,158,11,0.26); }

/* ─────────────────────────── SPINNER ─────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary-bright);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────── MODAL ─────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-size: 22px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all var(--t);
}
.modal-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }

.announcement-modal-card {
  max-width: 760px;
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(28, 10, 10, 0.98), rgba(16, 6, 6, 0.98));
}
.announcement-modal-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--primary-bright);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.announcement-modal-image-wrap {
  margin-bottom: 20px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.announcement-modal-image-wrap img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}
.announcement-modal-body {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
}
.announcement-modal-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.announcement-modal-expiry {
  color: var(--text-faint);
  font-size: 12px;
}

/* ─────────────────────────── TABLES ─────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(220, 38, 38, 0.03); }

/* ─────────────────────────── CHAT LAYOUT ─────────────────────────── */
body.chat-page, body.admin-page { background-image: none; background-color: var(--bg); }
.chat-layout { display: flex; height: 100vh; overflow: hidden; }

.chat-sidebar {
  width: 268px;
  flex-shrink: 0;
  background: rgba(10, 5, 6, 0.85);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sb-head { padding: 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.sb-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.sb-logo img { width: 26px; height: 26px; filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.6)); }
.sb-section {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  text-transform: uppercase;
  padding: 14px 14px 6px;
}
.chat-list { flex: 1; overflow-y: auto; padding: 4px 8px; }
.chat-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  transition: all var(--t);
  border: 1px solid transparent;
}
.chat-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.chat-item.active { background: var(--primary-dim); color: var(--primary-bright); border-color: var(--border-bright); }
.chat-item-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-del { opacity: 0; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 1px 5px; transition: color var(--t); flex-shrink: 0; }
.chat-item:hover .chat-item-del { opacity: 1; }
.chat-item-del:hover { color: var(--primary-bright); }
.sb-foot { padding: 14px; border-top: 1px solid var(--border); }
.sb-user { display: flex; align-items: center; gap: 12px; }
.sb-avatar {
  width: 34px; height: 34px;
  background: var(--primary-dim);
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-bright);
  font-size: 14px;
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sb-user-plan { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.sb-logout { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 6px; border-radius: 8px; transition: all var(--t); }
.sb-logout:hover { background: rgba(220, 38, 38, 0.12); color: var(--primary-bright); }
.sb-logout svg { width: 18px; height: 18px; }

.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; position: relative; }
.chat-top {
  position: relative;
  z-index: 120;
  overflow: visible;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10, 5, 6, 0.7);
  backdrop-filter: blur(12px);
}
.chat-plans-btn {
  margin-left: auto;
  flex-shrink: 0;
}
.chat-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
/* ── Subscription success modal ── */
.success-modal-card {
  text-align: center;
  padding: 36px 32px 28px !important;
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.08), transparent 60%), var(--bg-card-solid) !important;
  border: 1px solid rgba(34, 197, 94, 0.32) !important;
  box-shadow: 0 0 60px rgba(34, 197, 94, 0.18) !important;
}
.success-icon-wrap {
  width: 88px;
  height: 88px;
  margin: 4px auto 24px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.08) 70%);
  border: 2px solid rgba(34, 197, 94, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.45), inset 0 0 20px rgba(34, 197, 94, 0.15);
  animation: success-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.success-icon-wrap svg {
  width: 44px;
  height: 44px;
  color: #22c55e;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6));
  animation: success-check 0.6s 0.2s cubic-bezier(0.65, 0, 0.45, 1) backwards;
}
@keyframes success-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes success-check {
  0% { stroke-dasharray: 0 50; }
  100% { stroke-dasharray: 50 0; }
}
.success-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 10px;
  animation: success-fade 0.5s 0.3s backwards;
}
.success-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0;
  animation: success-fade 0.5s 0.4s backwards;
}
.success-sub strong { color: #22c55e; font-weight: 700; }
.success-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 26px -32px 22px;
  animation: success-fade 0.5s 0.5s backwards;
}
.success-modal-card .btn { animation: success-fade 0.5s 0.6s backwards; }
@keyframes success-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── Live payment status card ── */
.pay-status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s ease;
}
.pay-status-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.pay-status-icon .spinner { width: 18px; height: 18px; }
.pay-status-icon svg { width: 22px; height: 22px; }
.pay-status-text { flex: 1; min-width: 0; }
.pay-status-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 2px; }
.pay-status-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.pay-status-desc strong { color: var(--text); font-family: var(--font-mono); font-weight: 700; }

.pay-status-waiting   { border-color: var(--border); }
.pay-status-confirming { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.06); }
.pay-status-confirming .pay-status-title { color: #fcd34d; }
.pay-status-confirming .pay-status-icon { color: #f59e0b; }

.pay-status-partial   { border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.10); }
.pay-status-partial .pay-status-title { color: #fbbf24; }
.pay-status-partial .pay-status-icon { color: #f59e0b; }

.pay-status-finished  { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.08); }
.pay-status-finished .pay-status-title { color: #86efac; }
.pay-status-finished .pay-status-icon { color: #22c55e; }

.pay-status-failed    { border-color: rgba(220, 38, 38, 0.45); background: rgba(220, 38, 38, 0.08); }
.pay-status-failed .pay-status-title { color: #fca5a5; }
.pay-status-failed .pay-status-icon { color: var(--primary-bright); }

/* ── Custom Dropdown (reusable, replaces native <select class="form-control">) ── */
.cdrop { position: relative; width: 100%; }
.cdrop-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 15px;
  font-size: 15px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.cdrop-btn:hover { border-color: var(--border-bright); }
.cdrop.open .cdrop-btn { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.cdrop-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdrop-chev { width: 16px; height: 16px; color: var(--text-muted); transition: transform 0.2s ease; flex-shrink: 0; }
.cdrop.open .cdrop-chev { transform: rotate(180deg); color: var(--primary-bright); }

.cdrop-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 5px;
  z-index: 1100;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.cdrop.open .cdrop-menu { opacity: 1; transform: none; pointer-events: auto; }

.cdrop-opt {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 13px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.3;
  transition: background 0.12s ease, color 0.12s ease;
}
.cdrop-opt:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.cdrop-opt.active { background: var(--primary-dim); color: var(--primary-bright); font-weight: 600; }

.cdrop-hidden { display: none !important; }

/* ── OTP 6-cell input ── */
.otp-grid {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.otp-cell {
  width: 44px;
  height: 52px;
  flex: 0 0 44px;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  padding: 0;
}
.otp-cell:focus {
  border-color: var(--primary);
  background: var(--primary-tint);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  color: var(--primary-bright);
}
.otp-cell:not(:placeholder-shown) { color: var(--primary-bright); border-color: var(--border-bright); }

@media (max-width: 480px) {
  .otp-grid { gap: 6px; max-width: 280px; }
  .otp-cell { width: 40px; height: 48px; flex-basis: 40px; font-size: 18px; border-radius: 9px; }
}

.otp-help { font-size: 12px; color: var(--text-faint); text-align: center; margin: 14px 0 18px; line-height: 1.6; }
.otp-actions { display: flex; gap: 10px; }

/* ── Model picker (custom dropdown) ── */
.model-pick { position: relative; display: flex; align-items: center; z-index: 220; }
.model-pick-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 12px 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
}
.model-pick-btn:hover { border-color: var(--border-bright); background: var(--primary-tint); }
.model-pick-btn.open { border-color: var(--primary); background: var(--primary-tint); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); }
.model-pick.no-model-access .model-pick-btn {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  opacity: 0.62;
}
.model-pick.no-model-access .model-pick-btn:hover {
  opacity: 0.78;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}
.model-pick.no-model-access .model-dot {
  background: var(--text-faint);
  box-shadow: none;
}
.model-pick-chevron { width: 14px; height: 14px; opacity: 0.7; transition: transform 0.2s ease; }
.model-pick-btn.open .model-pick-chevron { transform: rotate(180deg); opacity: 1; }
.model-dot { width: 8px; height: 8px; background: var(--primary-bright); border-radius: 50%; box-shadow: 0 0 8px var(--primary-bright); flex-shrink: 0; }

.model-pick-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 6px;
  z-index: 260;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(220, 38, 38, 0.08);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.model-pick-menu.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.model-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  text-align: left;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.model-opt:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.model-opt.active { background: var(--primary-dim); color: var(--text); }
.model-opt.active .model-opt-name { color: var(--primary-bright); }
.model-opt-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-bright);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all 0.15s ease;
}
.model-opt.active .model-opt-dot {
  border-color: var(--primary-bright);
  background: var(--primary-bright);
}
.model-opt.active .model-opt-dot::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #0a0000;
  border-radius: 50%;
}
.model-opt-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.model-opt-name { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.model-opt-desc { font-size: 12px; color: var(--text-faint); line-height: 1.4; }
.model-opt-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 100px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.chat-messages { flex: 1; overflow-y: auto; padding: 28px 28px 180px; display: flex; flex-direction: column; gap: 20px; }
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 40px;
}
.chat-empty-icon {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.5));
  opacity: 0.8;
}
.chat-empty h3 { font-size: 22px; font-weight: 700; color: var(--text); }
.chat-empty p { font-size: 14px; max-width: 380px; line-height: 1.7; color: var(--text-muted); }

.message { display: flex; gap: 12px; max-width: 860px; }
.message.user { align-self: flex-end; flex-direction: row-reverse; max-width: 75%; }
.message.assistant { align-self: flex-start; max-width: 88%; }
.msg-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.message.user .msg-avatar { background: var(--primary-dim); color: var(--primary-bright); border: 1px solid var(--border-bright); }
.message.assistant .msg-avatar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--primary-bright);
}
.message.assistant .msg-avatar img { width: 22px; height: 22px; filter: drop-shadow(0 0 4px rgba(220, 38, 38, 0.6)); }
.msg-bubble { padding: 13px 17px; border-radius: 16px; font-size: 14px; line-height: 1.75; word-break: break-word; }
.message.user .msg-bubble { background: rgba(220, 38, 38, 0.1); border: 1px solid var(--border-bright); border-radius: 16px 16px 4px 16px; color: var(--text); }
.message.assistant .msg-bubble { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 4px 16px 16px 16px; }
.stream-text { display: block; min-width: 0; }
.msg-bubble .msg-h1, .msg-bubble .msg-h2, .msg-bubble .msg-h3, .msg-bubble .msg-h4 {
  display: block;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 14px 0 8px;
}
.msg-bubble .msg-h1:first-child, .msg-bubble .msg-h2:first-child, .msg-bubble .msg-h3:first-child, .msg-bubble .msg-h4:first-child { margin-top: 2px; }
.msg-bubble .msg-h1 { font-size: 22px; letter-spacing: -0.01em; }
.msg-bubble .msg-h2 { font-size: 18px; }
.msg-bubble .msg-h3 { font-size: 16px; }
.msg-bubble .msg-h4 { font-size: 14px; color: var(--text-muted, #c8c8c8); text-transform: none; }
.msg-bubble > code,
.msg-bubble p code,
.msg-bubble li code,
.msg-bubble br + code {
  font-family: 'Consolas', 'Space Mono', ui-monospace, monospace;
  font-size: 12.5px;
  color: #ff8f8f;
  background: rgba(220, 38, 38, 0.10);
  border: 1px solid rgba(220, 38, 38, 0.22);
  padding: 1px 7px;
  border-radius: 5px;
}
.code-card {
  margin: 14px 0;
  border: 1px solid var(--border);
  background: var(--bg-card-solid);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0,0,0,0.55), 0 2px 0 rgba(255,255,255,0.02) inset;
  font-family: 'Consolas', 'Space Mono', ui-monospace, monospace;
}

/* ── Tab-style header (VS Code editor tab look) ── */
.code-card-head {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.code-card-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 10px 0 14px;
  background: var(--bg-card-solid);
  border-right: 1px solid var(--border);
  position: relative;
  min-width: 0;
  max-width: 320px;
}
.code-card-tab::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--border-bright);
}
.code-card-tab-name {
  font-size: 13px;
  color: #ffffff;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code-card-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.code-lang-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.code-lang-icon-image {
  background: none;
  border-radius: 0;
}
.code-lang-icon-image img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}
.code-lang-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.code-lang-python { color: #ffd43b; }
.code-lang-javascript { background: #f7df1e; color: #111; font-weight: 800; font-size: 9px; letter-spacing: -0.3px; }
.code-lang-typescript { background: #3178c6; color: #fff; font-weight: 800; font-size: 9px; letter-spacing: -0.3px; }
.code-lang-jsx { background: #61dafb; color: #111; font-weight: 800; font-size: 8px; letter-spacing: -0.3px; }
.code-lang-tsx { background: #3178c6; color: #fff; font-weight: 800; font-size: 8px; letter-spacing: -0.3px; }
.code-lang-html { background: #e34f26; color: #fff; }
.code-lang-css { background: #1572b6; color: #fff; }
.code-lang-php { background: #777bb4; color: #fff; font-weight: 800; font-size: 8.5px; letter-spacing: -0.3px; }
.code-lang-java { background: #f89820; color: #fff; }
.code-lang-kotlin { background: #7f52ff; color: #fff; }
.code-lang-swift { background: #fa7343; color: #fff; }
.code-lang-go { background: #00add8; color: #fff; }
.code-lang-rust { background: #ce422b; color: #fff; }
.code-lang-cpp { background: #00599c; color: #fff; font-size: 8.5px; letter-spacing: -0.3px; }
.code-lang-c { background: #5577a7; color: #fff; }
.code-lang-csharp { background: #239120; color: #fff; }
.code-lang-ruby { background: #cc342d; color: #fff; }
.code-lang-sql { background: #336791; color: #fff; }
.code-lang-json { background: #292929; color: #f7df1e; font-size: 9px; }
.code-lang-yaml { background: #cb171e; color: #fff; }
.code-lang-markdown { background: #444; color: #fff; font-size: 8.5px; letter-spacing: -0.3px; }
.code-lang-docker { background: #2496ed; color: #fff; }
.code-lang-powershell { background: #012456; color: #fff; }
.code-lang-bash { background: #3c3c3c; color: #d4d4d4; }
.code-lang-generic { background: rgba(255,255,255,0.08); color: #d4d4d4; }
.code-card-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #cccccc;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.code-card-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}
.code-card-btn:active { background: rgba(255, 255, 255, 0.16); }
.code-card-btn.is-copied {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}
.code-card-btn.is-downloaded {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
.code-card-btn svg { width: 15px; height: 15px; }

/* ── Body: gutter + code ── */
.code-card-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  max-height: 460px;
  overflow: auto;
  background: var(--bg-card-solid);
}
.code-card-gutter {
  display: flex;
  flex-direction: column;
  padding: 14px 10px 14px 14px;
  background: var(--bg-card-solid);
  user-select: none;
  position: sticky;
  left: 0;
  z-index: 1;
}
.code-card-gutter span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 26px;
  height: calc(13.5px * 1.6);
  text-align: right;
  font-family: 'Consolas', 'Space Mono', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #6e7681;
  font-variant-numeric: tabular-nums;
}
.code-card pre {
  margin: 0;
  padding: 14px 18px 14px 14px;
  overflow: visible;
  background: transparent;
}
.code-card code {
  display: block;
  background: none;
  padding: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: #d4d4d4;
  white-space: pre;
  tab-size: 4;
}

.code-card-expanded {
  position: fixed;
  inset: 24px;
  z-index: 500;
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.7);
}
.code-card-expanded .code-card-body {
  height: calc(100% - 38px);
  max-height: none;
}
.code-card-expanded pre {
  height: 100%;
}
.code-card-expanded code {
  min-height: 100%;
}
.code-card .hljs {
  background: transparent;
  color: #d4d4d4;
  padding: 0;
}
.code-card .tok-keyword { color: #569cd6; }
.code-card .tok-builtin { color: #4ec9b0; }
.code-card .tok-string { color: #ce9178; }
.code-card .tok-comment { color: #6a9955; }
.code-card .tok-number { color: #b5cea8; }
.code-card .tok-function { color: #dcdcaa; }
.code-card .tok-attr { color: #9cdcfe; }

.message.assistant.streaming-pending .msg-bubble {
  background: transparent;
  border: none;
  padding: 4px 0;
  min-height: 34px;
  display: flex;
  align-items: center;
}
.typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  width: auto;
}
.typing-dot { width: 7px; height: 7px; background: var(--primary-bright); border-radius: 50%; animation: tdot 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tdot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

/* Composer floats over the message area — messages scroll behind it.
   The fade lets long code blocks visibly pass under the composer instead of
   appearing to be clipped by an invisible bar. */
.chat-input-box {
  position: absolute;
  left: 0; right: 0;
  bottom: 38px;
  z-index: 5;
  max-width: 920px;
  width: calc(100% - 48px);
  margin: 0 auto;
}
.chat-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: 10px;
  z-index: 5;
  max-width: 920px;
  width: calc(100% - 48px);
  margin: 0 auto;
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
}
/* Soft fade behind composer so content scrolling underneath dissolves naturally */
.chat-main::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg) 35%, rgba(10, 0, 0, 0.85) 60%, rgba(10, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 4;
}
.chat-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.chat-stop {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-bright);
  background: rgba(220, 38, 38, 0.12);
  color: #fff;
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t), transform var(--t);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.22);
  flex-shrink: 0;
}
.chat-stop:hover {
  background: rgba(220, 38, 38, 0.22);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}
.chat-stop:active { transform: translateY(0); }
.chat-stop svg { width: 14px; height: 14px; flex-shrink: 0; }
.chat-input-box {
  background: #1c0a0a;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 10px 18px;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.chat-tools {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.chat-tool {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  height: 32px;
  width: auto;
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t), box-shadow var(--t);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-tool svg { width: 15px !important; height: 15px !important; flex-shrink: 0; display: block; }
.chat-tool span { line-height: 1; }
.chat-tool:hover:not(:disabled) { color: var(--text); border-color: var(--border-bright); background: rgba(255,255,255,0.03); }
.chat-tool.active {
  color: #fff;
  background: rgba(220, 38, 38, 0.16);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.35) inset;
}
.chat-tool.active:hover { background: rgba(220, 38, 38, 0.22); }
.chat-tool.chat-tool-dim { opacity: 0.45; }
.chat-tool.chat-tool-disabled, .chat-tool:disabled { opacity: 0.4; cursor: not-allowed; }

.file-chip-wrap { display: inline-flex; gap: 6px; align-items: center; }
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  height: 32px;
  border: 1px solid var(--border-bright);
  background: rgba(220, 38, 38, 0.08);
  color: var(--text);
  border-radius: 999px;
  font-size: 12px;
  max-width: 220px;
}
.file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip-x {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.file-chip-x:hover { background: var(--primary); color: #fff; }
.file-chip-thumb { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }

/* Inline image inside a chat bubble */
.msg-attach-img { max-width: 320px; max-height: 320px; border-radius: 10px; margin-top: 8px; display: block; border: 1px solid var(--border); }
.msg-attach-file { margin-top: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--text-muted); display: inline-flex; gap: 8px; align-items: center; }
.chat-input-box:hover { border-color: var(--border-bright); }
.chat-input-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14), 0 6px 24px rgba(0, 0, 0, 0.3);
}
.chat-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  min-height: 28px;
  max-height: 200px;
  padding: 6px 0;
  font-family: inherit;
}
.chat-textarea::placeholder { color: var(--text-faint); }
.chat-send {
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--t);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.32);
}
.chat-send:hover { background: var(--primary-bright); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(220, 38, 38, 0.42); }
.chat-send:active { transform: translateY(0); }
.chat-send:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.chat-send svg { width: 18px; height: 18px; }

.sub-banner {
  padding: 12px 22px;
  background: rgba(245, 158, 11, 0.06);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #fcd34d;
  flex-shrink: 0;
}
.sub-banner a { color: #fcd34d; font-weight: 700; text-decoration: underline; cursor: pointer; }

.chat-menu-btn { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }
.chat-menu-btn svg { width: 22px; height: 22px; display: block; }
.chat-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 199; }
.chat-overlay.active { display: block; }

@media (max-width: 800px) {
  .chat-menu-btn { display: block; }
  .chat-sidebar { position: fixed; left: -290px; top: 0; height: 100%; z-index: 200; transition: left var(--t); }
  .chat-sidebar.open { left: 0; }
}

/* ─────────────────────────── ADMIN LAYOUT ─────────────────────────── */
.admin-header {
  background: rgba(10, 5, 6, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.admin-logo img { width: 28px; height: 28px; filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.6)); }
.admin-sep { width: 1px; height: 22px; background: var(--border); }
.admin-page-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary-bright);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.admin-content { max-width: 1400px; margin: 0 auto; padding: 36px 32px; }
.admin-h1 { font-size: 30px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.admin-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-danger-btn { color: #fca5a5; }
.admin-danger-btn:hover { color: #fff; background: rgba(220, 38, 38, 0.18); }
.admin-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.admin-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.admin-toggle-track {
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
  display: inline-flex;
  align-items: center;
  padding: 3px;
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
}
.admin-toggle-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--t), background var(--t);
}
.admin-toggle input:checked + .admin-toggle-track {
  background: rgba(220, 38, 38, 0.28);
  border-color: var(--primary);
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.22);
}
.admin-toggle input:checked + .admin-toggle-track .admin-toggle-thumb {
  transform: translateX(26px);
  background: var(--primary-bright);
}
.admin-logs-modal { max-width: 980px; }
.logs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.logs-header .admin-sub { margin-bottom: 0; }
.logs-header .btn { flex-shrink: 0; }
.admin-log-session {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  padding: 18px;
}
.admin-log-session + .admin-log-session { margin-top: 14px; }
.admin-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.admin-log-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.admin-log-meta { font-size: 12px; color: var(--text-faint); }
.admin-log-messages { display: flex; flex-direction: column; gap: 12px; }
.admin-log-message {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.24);
}
.admin-log-message.is-user { border-color: rgba(245, 158, 11, 0.22); }
.admin-log-message.is-assistant { border-color: rgba(34, 197, 94, 0.22); }
.admin-log-message-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.admin-log-message-body { font-size: 13px; line-height: 1.7; color: var(--text-muted); }
.admin-log-message-body pre { margin: 8px 0; }
.announcement-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.announcement-builder,
.announcement-history {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.announcement-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.announcement-section-head h3 {
  margin: 0 0 6px;
  font-size: 19px;
}
.announcement-section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.announcement-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.announcement-textarea {
  min-height: 210px;
  resize: vertical;
}
.announcement-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  margin-bottom: 18px;
}
.announcement-upload-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.announcement-image-meta {
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 12px;
}
.announcement-duration-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.announcement-preview-card {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(220, 38, 38, 0.12), transparent 34%),
    rgba(0, 0, 0, 0.2);
}
.announcement-preview-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.announcement-preview-shell {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(12, 6, 6, 0.86);
}
.announcement-preview-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}
.announcement-preview-content {
  padding: 18px;
}
.announcement-preview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 12px;
}
.announcement-preview-content h4 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.15;
}
.announcement-preview-body {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
}
.announcement-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.announcement-history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.announcement-history-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}
.announcement-history-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.announcement-history-body {
  padding: 16px;
}
.announcement-history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.announcement-history-top h4 {
  margin: 0;
  font-size: 17px;
}
.announcement-history-copy {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}
.announcement-history-meta {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-faint);
  font-size: 11.5px;
}
.announcement-history-actions {
  margin-top: 14px;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 36px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; transition: all var(--t); }
.stat-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.stat-card.accent { border-color: var(--border-bright); box-shadow: 0 0 24px rgba(220, 38, 38, 0.1); }
.stat-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--text-faint); text-transform: uppercase; margin-bottom: 12px; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-card.accent .stat-value { color: var(--primary-bright); }
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.stat-card-top .stat-label { margin-bottom: 0; }
.stat-foot { margin-top: 8px; font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: 0.02em; }
.stat-value.stat-warn { color: #f59e0b; }
.or-refresh-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-faint);
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t);
  flex-shrink: 0;
}
.or-refresh-btn:hover { color: var(--text); border-color: var(--border-bright); background: rgba(255,255,255,0.06); }
.or-refresh-btn:active { transform: rotate(180deg); transition: transform 0.4s; }
.revenue-range {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.revenue-range button {
  border: 0;
  border-radius: 999px;
  padding: 4px 8px;
  background: transparent;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-transform: uppercase;
  transition: all var(--t);
}
.revenue-range button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.revenue-range button.active { color: var(--primary-bright); background: rgba(220, 38, 38, 0.16); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.24); }

.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary-bright); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color var(--t);
}
.sortable-th:hover { color: var(--primary-bright); }
.sortable-th [data-sort-icon],
.sortable-th [data-payment-sort-icon] {
  display: inline-block;
  min-width: 14px;
  margin-left: 6px;
  color: var(--primary-bright);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: 1px;
}

/* ─────────────────────────── PAYMENT MODAL ─────────────────────────── */
/* legacy crypto-list (kept for back-compat with older modal markup) */
.crypto-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 20px 0; align-items: stretch; }
.crypto-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; transition: all var(--t); display: flex; flex-direction: column; }
.crypto-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.crypto-card.popular { border-color: var(--primary); box-shadow: 0 0 20px rgba(220, 38, 38, 0.18); }
.crypto-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

/* ── Settings modal ── */
.settings-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 100px;
  margin-bottom: 24px;
  border: 1px solid var(--border-soft);
}
.settings-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--t);
}
.settings-tab:hover { color: var(--text); }
.settings-tab.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }

.settings-info-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 16px;
  margin-bottom: 14px;
}
.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}
.settings-info-row:last-child { border-bottom: none; }
.settings-info-key { font-size: 13px; color: var(--text-muted); }
.settings-info-val { font-size: 13px; color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }
.settings-sub-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 8%, rgba(239, 68, 68, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(220, 38, 38, 0.11), rgba(255, 255, 255, 0.02));
}
.settings-sub-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 7px;
}
.settings-sub-title { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.2; }
.settings-sub-empty {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}
.settings-sub-empty-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.settings-sub-empty p { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin-bottom: 18px; }
.settings-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-sub-actions { margin-top: 18px; }
.settings-sub-card + .settings-sub-card {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.settings-feature-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.22);
}
.settings-feature-card h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.settings-feature-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.settings-feature-card li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.settings-feature-card li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 900;
}
.settings-feature-card li.yes::before { content: '+'; color: #22c55e; }
.settings-feature-card li.no::before { content: '-'; color: var(--primary-bright); }

.settings-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.settings-segmented button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--t);
}
.settings-segmented button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.settings-segmented button.active { background: var(--primary); color: #fff; }

/* Font size & density classes applied to body.chat-page */
body.chat-page.fs-small .msg-bubble { font-size: 13px; }
body.chat-page.fs-medium .msg-bubble { font-size: 14px; }
body.chat-page.fs-large .msg-bubble { font-size: 15.5px; line-height: 1.7; }
body.chat-page.dens-compact .chat-messages { gap: 10px; }
body.chat-page.dens-cozy .chat-messages { gap: 18px; }
body.chat-page.dens-comfortable .chat-messages { gap: 28px; padding: 32px 28px; }

/* ── Pricing modal — pro plan cards ── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 4px;
  align-items: stretch;
}
@media (max-width: 800px) { .plan-grid { grid-template-columns: 1fr; } }

.plan-card {
  position: relative;
  background: linear-gradient(180deg, rgba(28, 10, 10, 0.65) 0%, rgba(20, 8, 8, 0.55) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px 20px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.plan-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.plan-card.has-current-plan {
  border-color: rgba(34, 197, 94, 0.34);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12), 0 10px 28px rgba(34, 197, 94, 0.08);
}

.plan-card.popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(40, 10, 12, 0.7) 0%, rgba(20, 6, 8, 0.6) 100%);
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.18), inset 0 1px 0 rgba(220, 38, 38, 0.15);
}

.plan-card-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 4px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.plan-card-header { margin-bottom: 18px; }
.plan-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  padding: 5px 11px;
  border-radius: 100px;
  text-transform: uppercase;
}
.plan-tier-badge.tier-v4 { color: var(--primary-bright); border-color: var(--border-bright); background: var(--primary-tint); }
.plan-tier-badge.tier-v4 em { font-style: normal; font-size: 9px; padding: 2px 6px; background: var(--primary); color: #fff; border-radius: 100px; margin-left: 2px; }
.plan-tier-badge.tier-ent { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); background: rgba(139, 92, 246, 0.08); }

.plan-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.plan-price-amt {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.plan-price-period { font-size: 13px; color: var(--text-dim); }
.plan-price-save {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.24);
  color: #4ade80;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  min-height: 36px;
}

.plan-feats {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.plan-feats li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}
.plan-feats li svg { width: 14px; height: 14px; color: var(--primary-bright); flex-shrink: 0; margin-top: 2px; }

.plan-card .btn { margin-top: auto; }
.plan-current-btn {
  border-color: rgba(34, 197, 94, 0.34) !important;
  background: rgba(34, 197, 94, 0.10) !important;
  color: #86efac !important;
  opacity: 1 !important;
}
.plan-card [data-role="price"],
.plan-card [data-role="period"],
.plan-card [data-role="save"],
.plan-card [data-role="desc"],
.plan-card [data-role="features"] li,
.plan-card [data-role="action"],
.plan-card [data-role="alt-options"] > * {
  transition: opacity 0.24s ease, transform 0.24s ease, filter 0.24s ease;
  will-change: opacity, transform, filter;
}
.plan-card.is-switching [data-role="price"],
.plan-card.is-switching [data-role="period"],
.plan-card.is-switching [data-role="save"],
.plan-card.is-switching [data-role="desc"],
.plan-card.is-switching [data-role="features"] li,
.plan-card.is-switching [data-role="action"],
.plan-card.is-switching [data-role="alt-options"] > * {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
}

.plan-alt {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan-alt-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  width: 100%;
  padding: 7px 4px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.plan-alt-link:hover { background: rgba(255, 255, 255, 0.03); color: var(--text); }
.plan-alt-link:hover .plan-alt-price { color: var(--primary-bright); }
.plan-alt-link.is-current { color: #86efac; }
.plan-alt-link.is-current small {
  color: #22c55e;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  margin-left: 5px;
}
.plan-alt-link.active {
  background: var(--primary-tint);
  color: var(--primary-bright);
  box-shadow: inset 0 0 0 1px var(--border-bright);
}
.plan-alt-price {
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}
.plan-alt-price small {
  font-size: 10px;
  color: #22c55e;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-left: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.plan-alt-empty {
  color: var(--text-faint);
  font-size: 12px;
  text-align: center;
  padding: 8px 0 2px;
}
.crypto-tier { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--text-faint); text-transform: uppercase; margin-bottom: 6px; }
.crypto-price { font-size: 24px; font-weight: 700; line-height: 1; margin-bottom: 12px; }
.crypto-period { font-size: 13px; color: var(--text-dim); }
.pay-amount-big { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--primary-bright); text-align: center; margin: 16px 0 4px; word-break: break-all; }
.payment-expiry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 18%, rgba(245, 158, 11, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(220, 38, 38, 0.06));
}
.payment-expiry-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.payment-expiry-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
}
.payment-expiry-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.11), 0 0 24px rgba(245, 158, 11, 0.55);
  animation: paymentPulse 1.4s ease-in-out infinite;
}
.payment-expiry-card.is-warning .payment-expiry-value { color: var(--primary-bright); }
.payment-expiry-card.is-warning .payment-expiry-dot { background: var(--primary-bright); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.12), 0 0 24px rgba(239, 68, 68, 0.55); }
.payment-expiry-card.is-expired { border-color: rgba(148, 163, 184, 0.2); background: rgba(255, 255, 255, 0.03); }
.payment-expiry-card.is-expired .payment-expiry-value { color: var(--text-faint); }
.payment-expiry-card.is-expired .payment-expiry-dot { animation: none; background: var(--text-faint); box-shadow: none; }
@keyframes paymentPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}
.payment-qr-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 18px;
  align-items: center;
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at 14% 20%, rgba(245, 158, 11, 0.16), transparent 34%);
}
.payment-qr-card::before {
  content: '';
  position: absolute;
  inset: -80px auto auto -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  filter: blur(12px);
}
.payment-qr-card[data-coin="blue"] { background: linear-gradient(145deg, rgba(59, 130, 246, 0.10), rgba(255, 255, 255, 0.018)); }
.payment-qr-card[data-coin="blue"]::before { background: rgba(59, 130, 246, 0.22); }
.payment-qr-card[data-coin="red"] { background: linear-gradient(145deg, rgba(239, 68, 68, 0.11), rgba(255, 255, 255, 0.018)); }
.payment-qr-card[data-coin="red"]::before { background: rgba(239, 68, 68, 0.22); }
.payment-qr-card[data-coin="green"] { background: linear-gradient(145deg, rgba(34, 197, 94, 0.10), rgba(255, 255, 255, 0.018)); }
.payment-qr-card[data-coin="green"]::before { background: rgba(34, 197, 94, 0.20); }
.payment-qr-orbit {
  position: relative;
  z-index: 1;
  padding: 8px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 18px 42px rgba(0,0,0,0.28);
}
.payment-qr-frame {
  padding: 10px;
  border-radius: 20px;
  background: #fff;
}
.payment-qr-frame img {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 12px;
}
.payment-qr-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.payment-qr-meta span {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.payment-qr-meta small {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.payment-cancel-btn {
  width: 100%;
  margin-top: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t);
}
.payment-cancel-btn:hover {
  border-color: rgba(239, 68, 68, 0.36);
  color: var(--primary-bright);
  background: rgba(220, 38, 38, 0.08);
}
.payment-cancel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pay-address-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all var(--t);
  font-family: inherit;
}
.copy-btn:hover { border-color: var(--primary); color: var(--primary-bright); }

/* ─────────────────────────── UTILS ─────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-primary { color: var(--primary-bright); }
.text-mono { font-family: var(--font-mono); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* ─────────────────────────── RESPONSIVE TWEAKS ─────────────────────────── */
@media (max-width: 900px) {
  .nav-inner { padding: 0 20px; }
  .section { padding: 80px 20px; }
  .hero { padding: 64px 20px 72px; }
  .hero-logo { width: 110px; height: 110px; margin-bottom: 26px; }
  .hero-trust { gap: 22px; }
  .section-head { margin-bottom: 48px; }
  .price-group + .price-group { margin-top: 44px; }
  .mcp-card { padding: 32px 28px; }
  .mcp-price-num { font-size: 44px; }
  .price-num { font-size: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { background-size: 50px 50px; }
  .section { padding: 64px 18px; }
  .hero { padding: 48px 18px 60px; }
  .hero-logo { width: 96px; height: 96px; margin-bottom: 24px; }
  .hero h1 { font-size: clamp(46px, 13vw, 72px); }
  .hero-tag { font-size: 12px; letter-spacing: 0.28em; }
  .hero-desc { font-size: 15px; margin-bottom: 32px; }
  .hero-actions { gap: 10px; flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { gap: 18px; font-size: 12px; }
  .section-title { font-size: clamp(28px, 8vw, 40px); }
  .section-sub { font-size: 15px; }
  .section-head { margin-bottom: 36px; }
  .auth-wrap { padding: 24px 16px 48px; }
  .auth-card { padding: 28px 22px; max-width: 100%; }
  .auth-logo-img { width: 72px; height: 72px; }
  .auth-title { font-size: 24px; }
  .price-card, .mcp-card { padding: 24px 22px; }
  .price-num, .mcp-price-num { font-size: 38px; }
  .feature-card { padding: 22px 20px; }
  .feature-title { font-size: 16px; }
  .feature-desc { font-size: 13.5px; }
  .stat-value { font-size: 26px; }
  .admin-content { padding: 24px 18px; }
  .admin-h1 { font-size: 24px; }
  .admin-header { padding: 0 18px; height: 58px; gap: 12px; }
  .admin-header .admin-page-tag { display: none; }
  .admin-header .admin-sep { display: none; }
  .announcement-admin-layout,
  .announcement-form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  footer { padding: 48px 20px 28px; }
  .cta-section { padding: 72px 20px; }
  .cta-actions .btn { width: 100%; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .pill { font-size: 10px; padding: 6px 12px; }
  .price-group-head { flex-wrap: wrap; }
  .mcp-actions { flex-direction: column; align-items: stretch; }
  .mcp-actions .btn { width: 100%; }
  .modal { padding: 24px 22px; }
  .crypto-list { grid-template-columns: 1fr; }
  .settings-tabs { border-radius: 16px; flex-wrap: wrap; }
  .settings-tab { flex: 1 1 30%; }
  .settings-feature-grid { grid-template-columns: 1fr; }
  .payment-qr-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .payment-qr-meta { align-items: center; }
  .chat-input-box { left: 16px; right: 16px; width: auto; max-width: none; margin: 0; bottom: 36px; }
  .chat-hint { left: 16px; right: 16px; width: auto; max-width: none; margin: 0; bottom: 10px; }
  .chat-messages { padding: 18px 16px 160px; gap: 14px; }
  .chat-top { padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
  .chat-top .btn { padding: 7px 12px; font-size: 12px; }
  .message.user { max-width: 88%; }
  .message.assistant { max-width: 92%; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 42px; }
  .hero-trust { gap: 14px; }
  .nav-logo { font-size: 16px; }
  .nav-logo img { width: 26px; height: 26px; }
  .price-num, .mcp-price-num { font-size: 34px; }
  .auth-title { font-size: 22px; }
  .stat-value { font-size: 22px; }
}
