/* ===== Confronter Techwizard — Pure Black / Pure White themes ===== */
:root,
[data-theme="dark"] {
  --bg: #000000; /* pure black */
  --bg-elevated: #0a0a0a;
  --bg-card: #111111;
  --bg-alt: #0d0d0d;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --text-dim: #666666;
  --accent: #e50914;
  --accent-hover: #b20710;
  --accent-soft: rgba(229, 9, 20, 0.14);
  --danger: #ef4444;
  --accent-glow: rgba(229, 9, 20, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --sidebar-w: 280px;
  --topbar-h: 64px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-alt: #fafafa;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --text: #000000;
  --text-muted: #525252;
  --text-dim: #a3a3a3;
  --accent: #e50914;
  --accent-hover: #b20710;
  --accent-soft: rgba(229, 9, 20, 0.1);
  --accent-glow: rgba(229, 9, 20, 0.2);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ===== PWA Toast ===== */
.pwa-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: slideDown 0.35s ease;
}

.pwa-toast[hidden] {
  display: none;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-toast-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-toast-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.pwa-toast-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-toast-text strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.pwa-toast-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pwa-install-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s;
}

.pwa-install-btn:hover {
  background: var(--accent-hover);
}

.pwa-dismiss-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: 1.25rem;
  color: var(--text-muted);
  border-radius: 8px;
}

.pwa-dismiss-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* ===== App shell ===== */
.app-shell {
  display: flex;
  min-height: 100dvh;
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
}

.sidebar.open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .sidebar {
    transform: translateX(0);
  }
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  letter-spacing: -0.02em;
}

.logo-text {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.logo-text small {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  color: var(--text-muted);
  border-radius: 8px;
}

@media (max-width: 1023px) {
  .sidebar-close {
    display: grid;
    place-items: center;
  }
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text);
}

.nav-item-accent {
  color: var(--accent);
}

.nav-item-accent:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-icon-sun,
.theme-icon-moon {
  display: none;
  font-size: 1rem;
}
/* Dark mode: show moon (switch to light) */
[data-theme="dark"] .theme-icon-moon {
  display: inline-block;
}
/* Light mode: show sun (switch to dark) */
[data-theme="light"] .theme-icon-sun {
  display: inline-block;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.sidebar-overlay.open {
  display: block;
}

@media (min-width: 1024px) {
  .sidebar-overlay {
    display: none !important;
  }
}

/* ===== Main ===== */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .main-wrapper {
    margin-left: var(--sidebar-w);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-card);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

/* ===== Hero ===== */
.hero {
  padding: 64px 24px 80px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ===== Sections ===== */
.section {
  padding: 64px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-alt {
  background: var(--bg-alt);
  max-width: none;
  padding-left: max(24px, calc((100% - 1100px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1100px) / 2 + 24px));
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-card-accent {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.price-card:hover {
  border-color: var(--border-strong);
}

.price-card.popular {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.price-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

.price-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.price-amount {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.price-note {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.wallet-note {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.step {
  text-align: center;
}

.step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Auth ===== */
.auth-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  background: var(--bg-elevated);
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}

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

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

.footer-logo {
  margin-bottom: 12px;
}

.footer-tag {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer ul a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== Bot Hub page shared styles (used by /bots/) ===== */
.page-header {
  padding: 32px 24px 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 6px;
}

.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px 24px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bot-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.bot-card .bot-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.bot-card .bot-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.bot-card .bot-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===== Wallet top-up ===== */
.wallet-panel {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .wallet-panel {
    grid-template-columns: 1fr;
  }
}

.wallet-balance-card,
.wallet-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.wallet-balance-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.wallet-balance-amount {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 8px;
}

.wallet-balance-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.wallet-form-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.wallet-form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.amount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.amount-btn {
  min-width: 56px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.amount-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.amount-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 12px;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.field-input:focus {
  border-color: var(--accent);
}

.wallet-pay-btn {
  width: 100%;
  margin-top: 20px;
}

.wallet-status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.wallet-status[hidden] {
  display: none;
}

.wallet-status-icon {
  font-size: 1.5rem;
}

.wallet-status strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.wallet-status p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.wallet-status.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.wallet-status.success {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.wallet-gateways {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

/* Font Awesome nav icons */
.nav-fa {
  width: 22px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.9;
}
.nav-item {
  gap: 12px;
}
.feature-icon {
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 12px;
}
.feature-icon i {
  font-size: 1.35rem;
}
.pwa-toast-icon i {
  font-size: 1.1rem;
}
/* theme icons handled above */


/* Pay methods */
.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 4px;
}
.pay-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}
.pay-method input {
  accent-color: var(--accent);
}
.pay-method.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Activate form */
.activate-panel {
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.activate-form .field-label {
  margin-top: 14px;
}

/* AI card */
.ai-card {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.ai-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ai-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.ai-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Admin table */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table tr:last-child td {
  border-bottom: none;
}

/* ===== Makamesco-style template cards ===== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 8px 0 32px;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.template-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.template-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.template-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

[data-theme="light"] .template-icon {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.template-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.template-card .template-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}

.template-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.template-badge.accent {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.template-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.template-users {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.template-users i {
  margin-right: 4px;
}

/* ===== Logged-in sidebar (Keith-style) ===== */
.sidebar.logged-in .nav-item {
  border-radius: 10px;
  margin-bottom: 2px;
}

.sidebar .nav-item.active,
.sidebar .nav-item.nav-item-accent {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-user {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.sidebar-user-meta {
  min-width: 0;
}

.sidebar-user-meta strong {
  display: block;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-meta span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.sidebar-balance-pill {
  margin: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.sidebar-balance-pill .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-balance-pill .amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}

/* Currency switcher */
.currency-switch {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.currency-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.currency-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.wallet-converted {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}


/* ===== Flick-inspired titles & red polish ===== */
.hero h1,
.page-header h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

.hero h1 .accent,
.page-header h1 .accent {
  color: var(--accent);
}

.section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow, rgba(229, 9, 20, 0.35));
}

.btn-primary:hover {
  background: var(--accent-hover) !important;
  filter: brightness(1.05);
}

.btn-outline {
  border: 1.5px solid var(--border-strong);
  font-weight: 600;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-badge {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.price-card.popular,
.price-badge {
  border-color: var(--accent);
}

.price-badge {
  background: var(--accent);
  color: #fff;
}

.nav-item.active,
.nav-item.nav-item-accent {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

.sidebar-balance-pill {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.sidebar-balance-pill .amount {
  color: var(--accent) !important;
}

.currency-btn.active,
.pay-method.active,
.amount-btn.active {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

.feature-icon,
.template-icon {
  color: var(--accent) !important;
}

.bot-status {
  color: var(--accent);
}

.pwa-install-btn {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700;
}

/* Modal / panel like Flick app dialog */
.activate-panel,
.wallet-form-card,
.ai-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-color-meta {
  /* hint for PWA */
}

/* Auth form panel */
.auth-panel {
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg);
}
.auth-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.auth-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 10px;
}
.auth-signed-card {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.auth-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.guest-only[hidden],
.user-only[hidden] {
  display: none !important;
}

.auth-oauth-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.auth-oauth-row .btn { flex: 1; min-width: 120px; justify-content: center; }
.auth-or {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 12px 0 16px;
}
