/* ═══════════════════════════════════════════════════════════════
   WritexNova — Premium Light & Minimal Design System v6.0
   Clean. Refined. Conversion-optimized.
   Font: DM Sans (display) + DM Mono (mono accents)
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Theme Color Variables (overridden by JS applyThemeColor) ── */
  --primary:           #9333EA;
  --primary-dark:      #7C3AED;
  --primary-light:     #C084FC;
  --accent:            #7C3AED;
  --glow-color:        rgba(147,51,234,0.35);
  --glow-color-lg:     rgba(147,51,234,0.5);
  --gradient-main:     linear-gradient(135deg, #7C3AED 0%, #9333EA 50%, #C084FC 100%);
  --border-focus:      #9333EA;

  /* ── Status Colors ── */
  --success:        #059669;
  --warning:        #d97706;
  --danger:         #dc2626;
  --info:           #2563eb;

  /* ── Light theme ── */
  --bg:             #fafaf9;
  --bg-card:        #ffffff;
  --bg-2:           #f5f5f4;
  --bg-3:           #e7e5e4;
  --text:           #1c1917;
  --text-muted:     #57534e;
  --text-light:     #a8a29e;
  --border:         #e7e5e4;

  /* ── Gradients ── */
  --grad-primary:      var(--gradient-main);
  --grad-subtle:       linear-gradient(135deg, #fafaf9 0%, #f0efee 100%);
  --grad-hero:         linear-gradient(160deg, #2e1065 0%, #4c1d95 45%, #7c3aed 100%);
  --grad-card:         linear-gradient(145deg, rgba(147,51,234,.05) 0%, rgba(124,58,237,.02) 100%);

  /* ── Shadows ── */
  --shadow-xs:         0 1px 2px rgba(28,25,23,.05);
  --shadow-sm:         0 1px 3px rgba(28,25,23,.08), 0 1px 2px rgba(28,25,23,.04);
  --shadow-md:         0 4px 16px rgba(28,25,23,.08), 0 2px 4px rgba(28,25,23,.04);
  --shadow-lg:         0 8px 32px rgba(28,25,23,.1), 0 4px 8px rgba(28,25,23,.06);
  --shadow-xl:         0 24px 64px rgba(28,25,23,.12);
  --shadow-primary:    0 4px 14px var(--glow-color);
  --shadow-primary-lg: 0 8px 28px var(--glow-color-lg);

  /* ── Radii ── */
  --radius-xs:      4px;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      20px;
  --radius-2xl:     28px;
  --radius-full:    9999px;

  /* ── Motion ── */
  --transition:     all .18s cubic-bezier(.4,0,.2,1);
  --transition-slow: all .32s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:           #0c0a09;
  --bg-card:      #1c1917;
  --bg-2:         #292524;
  --bg-3:         #44403c;
  --text:         #fafaf9;
  --text-muted:   #a8a29e;
  --text-light:   #57534e;
  --border:       #292524;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.6);
  --shadow-xl:    0 24px 64px rgba(0,0,0,.7);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ── Typography ───────────────────────────────────────────────── */
h1 {
  font-size: clamp(1.9rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
}
h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}
p { color: var(--text-muted); }

/* ── Container ────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
@media(min-width:640px)  { .container { padding: 0 28px; } }
@media(min-width:1024px) { .container { padding: 0 40px; } }

/* ── Grid System ─────────────────────────────────────────────── */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
@media(min-width:640px)  { .grid-2 { grid-template-columns: repeat(2,1fr); gap: 20px; } .grid-4 { gap: 16px; } }
@media(min-width:768px)  { .grid-3 { grid-template-columns: repeat(2,1fr); gap: 20px; } }
@media(min-width:1024px) { .grid-3 { grid-template-columns: repeat(3,1fr); gap: 24px; } .grid-4 { grid-template-columns: repeat(4,1fr); gap: 20px; } }

/* ══════════════════════════════════════════════════════════════
   BUTTONS — Refined, not flashy
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: -.01em;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-sm  { padding: 7px 14px; font-size: .82rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: 13px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl  { padding: 15px 34px; font-size: 1rem; border-radius: var(--radius-lg); font-weight: 700; letter-spacing: -.015em; }
.btn-full{ width: 100%; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-primary-lg);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: rgba(79,70,229,.06); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--text-light);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.btn-accent:hover { background: #6d28d9; box-shadow: 0 6px 20px rgba(124,58,237,.45); transform: translateY(-1px); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* Secondary white on dark bg */
.btn-white {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { background: #f0efff; transform: translateY(-1px); }

/* ── Spinner ──────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: none; flex-shrink: 0;
}
.spinner-dark { border-color: rgba(79,70,229,.2); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   CARD — Clean white, refined shadow
══════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
@media(min-width:640px) { .card { padding: 28px; } }
.card-hover { transition: var(--transition-slow); }
.card-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(79,70,229,.2);
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
}
.badge-primary  { background: rgba(79,70,229,.1);  color: var(--primary); }
.badge-accent   { background: rgba(124,58,237,.1); color: var(--accent); }
.badge-success  { background: rgba(5,150,105,.1);  color: var(--success); }
.badge-warning  { background: rgba(217,119,6,.1);  color: var(--warning); }
.badge-danger   { background: rgba(220,38,38,.1);  color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   NAV — Slim, clean, sticky
══════════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,249,.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px; height: 60px; gap: 12px;
}
[data-theme="dark"] .nav { background: rgba(12,10,9,.88); }
@media(min-width:640px) { .nav { padding: 0 28px; height: 64px; } }

.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.1rem; color: var(--text);
  text-decoration: none !important; flex-shrink: 0;
  letter-spacing: -.02em;
}
.nav-brand:hover { text-decoration: none !important; color: var(--text); }
.brand-writex { color: #111827; transition: color 0.3s; }
.brand-nova   { color: #7c3aed; transition: color 0.3s; }
[data-theme="dark"] .brand-writex { color: #ffffff; }
[data-theme="dark"] .brand-nova   { color: #7c3aed; }
.logo { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: contain; }

.nav-links {
  display: none; list-style: none;
  flex: 1; gap: 2px; align-items: center; justify-content: center;
}
@media(min-width:768px) { .nav-links { display: flex; } }
.nav-links a {
  padding: 6px 13px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  transition: var(--transition); text-decoration: none !important;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: rgba(79,70,229,.07);
}

.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-auth-area { display: flex; gap: 8px; align-items: center; }
.mobile-auth-area { display: flex; flex-direction: column; gap: 8px; }

/* Mobile toggle */
.nav-mobile-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font-size: 1.1rem; flex-shrink: 0; margin-left: 8px;
}
@media(min-width:768px) { .nav-mobile-toggle { display: none; } }

/* Mobile drawer */
.mobile-menu {
  display: none; position: fixed; top: 60px; right: 12px;
  width: min(320px, calc(100vw - 24px));
  background: var(--bg-card); z-index: 99;
  padding: 12px; flex-direction: column; gap: 2px;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.15), 0 2px 8px rgba(0,0,0,.08);
  overflow-y: auto;
  max-height: calc(100vh - 80px);
}
@media(min-width:640px) { .mobile-menu { top: 64px; } }
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block; padding: 11px 14px;
  border-radius: var(--radius-md); color: var(--text);
  font-weight: 500; text-decoration: none !important; transition: var(--transition);
  font-size: .95rem;
}
.mobile-menu a:hover, .mobile-menu a.active { background: var(--bg-2); color: var(--primary); }
.mobile-menu-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: var(--transition);
}
.theme-toggle:hover { background: var(--bg-card); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .theme-toggle {
  border: 2px solid rgba(124,58,237,.6);
  background: rgba(124,58,237,.15);
  box-shadow: 0 0 0 1px rgba(124,58,237,.2), 0 0 12px rgba(124,58,237,.3);
}
/* theme icon set by JS */

/* ══════════════════════════════════════════════════════════════
   HERO — Bold but airy
══════════════════════════════════════════════════════════════ */
.hero {
  background: var(--grad-hero);
  padding: 72px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid texture */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Glow blobs */
.hero::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.25) 0%, transparent 70%);
  top: -200px; right: -100px;
  pointer-events: none;
}

@media(min-width:768px) { .hero { padding: 96px 0 88px; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-full); padding: 6px 16px;
  font-size: .8rem; font-weight: 600; margin-bottom: 24px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  letter-spacing: .02em;
}

.hero h1 {
  color: #fff;
  margin-bottom: 20px;
  max-width: 740px;
  margin-left: auto; margin-right: auto;
  position: relative; z-index: 1;
}

.hero h1 span {
  background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #f9a8d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: rgba(255,255,255,.72);
  font-size: clamp(.95rem, 2.5vw, 1.15rem);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
  position: relative; z-index: 1;
}

.hero-cta {
  display: flex; flex-direction: column; gap: 12px;
  align-items: center; position: relative; z-index: 1;
}
@media(min-width:480px) { .hero-cta { flex-direction: row; justify-content: center; } }

.hero-cta-secondary {
  color: rgba(255,255,255,.9) !important;
  border: 1.5px solid rgba(255,255,255,.3) !important;
  background: rgba(255,255,255,.08) !important;
}
.hero-cta-secondary:hover {
  background: rgba(255,255,255,.15) !important;
  border-color: rgba(255,255,255,.6) !important;
}

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-top: 32px;
  position: relative; z-index: 1;
}
.trust-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-full);
  padding: 5px 14px; font-size: .78rem; font-weight: 500;
}

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 28px;
  justify-content: center; margin-top: 44px;
  position: relative; z-index: 1;
}
.hero-stat-num   { font-size: 2rem; font-weight: 800; color: #c4b5fd; display: block; letter-spacing: -.03em; }
.hero-stat-label { font-size: .78rem; color: rgba(255,255,255,.55); }

/* Hero model chips */
.hero-models {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-top: 24px; position: relative; z-index: 1;
}
.model-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-full);
  color: rgba(255,255,255,.88);
  font-size: .78rem; font-weight: 600;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════════════════════════ */
.section { padding: 56px 0; }
@media(min-width:768px) { .section { padding: 80px 0; } }
.section-bg { background: var(--bg-2); }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub {
  text-align: center; color: var(--text-muted);
  font-size: clamp(.9rem,2vw,1.05rem);
  max-width: 540px; margin: 0 auto 40px; line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   TOOL CARDS — Premium pastel gradients
══════════════════════════════════════════════════════════════ */
.tools-grid-6 {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media(min-width:600px)  { .tools-grid-6 { grid-template-columns: repeat(2,1fr); gap: 20px; } }
@media(min-width:1024px) { .tools-grid-6 { grid-template-columns: repeat(3,1fr); gap: 24px; } }

.tool-card {
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  transition: var(--transition-slow);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .3s;
  background: rgba(255,255,255,.5);
  pointer-events: none;
}
.tool-card:hover::before { opacity: 1; }

.tool-card-icon {
  font-size: 2rem; margin-bottom: 14px; display: block;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.tool-card:hover .tool-card-icon { transform: scale(1.12) rotate(-3deg); }
.tool-card h3 { margin-bottom: 8px; font-size: 1.05rem; color: var(--text); }
.tool-card p  { font-size: .875rem; margin-bottom: 20px; line-height: 1.6; min-height: 48px; }

/* Color variants */
.tool-card-indigo {
  background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
  border-color: #c7d2fe;
}
.tool-card-amber {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}
.tool-card-purple {
  background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: #ddd6fe;
}
.tool-card-green {
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #bbf7d0;
}
.tool-card-rose {
  background: linear-gradient(145deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fecdd3;
}
.tool-card-sky {
  background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

@media(hover: hover) and (pointer: fine) {
  .tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(28,25,23,.1);
  }
}

[data-theme="dark"] .tool-card-indigo { background: linear-gradient(145deg,#1e1b4b,#1a1838); border-color: #3730a3; }
[data-theme="dark"] .tool-card-amber  { background: linear-gradient(145deg,#451a03,#292524); border-color: #92400e; }
[data-theme="dark"] .tool-card-purple { background: linear-gradient(145deg,#2e1065,#1e1b4b); border-color: #5b21b6; }
[data-theme="dark"] .tool-card-green  { background: linear-gradient(145deg,#052e16,#0f2a1a); border-color: #15803d; }
[data-theme="dark"] .tool-card-rose   { background: linear-gradient(145deg,#4c0519,#1f0a0d); border-color: #be123c; }
[data-theme="dark"] .tool-card-sky    { background: linear-gradient(145deg,#082f49,#0c1a25); border-color: #0369a1; }

/* ── Feature / Step cards ─────────────────────────────────────── */
.feature-card { padding: 28px 24px; }
.feature-icon { font-size: 2.2rem; margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p  { font-size: .9rem; margin-bottom: 20px; }

.card-indigo { background: linear-gradient(145deg,#eef2ff,#e0e7ff); border-color: #c7d2fe; }
.card-purple { background: linear-gradient(145deg,#f5f3ff,#ede9fe); border-color: #ddd6fe; }
.card-amber  { background: linear-gradient(145deg,#fffbeb,#fef3c7); border-color: #fde68a; }
[data-theme="dark"] .card-indigo { background: linear-gradient(145deg,#1e1b4b,#1a1838); border-color: #3730a3; }
[data-theme="dark"] .card-purple { background: linear-gradient(145deg,#2e1065,#1e1b4b); border-color: #5b21b6; }
[data-theme="dark"] .card-amber  { background: linear-gradient(145deg,#451a03,#292524); border-color: #92400e; }

.step-card { text-align: center; padding: 28px 20px; }
.step-number {
  width: 52px; height: 52px; border-radius: var(--radius-full);
  background: var(--grad-primary); color: #fff;
  font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; box-shadow: var(--shadow-primary);
}
.step-card h3 { margin-bottom: 8px; }
.step-card p  { font-size: .9rem; }

/* ══════════════════════════════════════════════════════════════
   TOOL PAGE LAYOUT
══════════════════════════════════════════════════════════════ */
.tool-page {
  max-width: 1100px; margin: 0 auto;
  padding: 28px 20px 56px; display: flex; flex-direction: column; gap: 18px;
}
@media(min-width:640px) { .tool-page { padding: 36px 28px 64px; gap: 22px; } }

.tool-header { text-align: center; padding: 8px 0; }
.tool-header h1 { margin-bottom: 8px; }
.tool-header p  { font-size: .95rem; }

/* ── Usage Banner ─────────────────────────────────────────────── */
.usage-card { padding: 16px 20px; }
.usage-top  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.usage-label { font-size: .85rem; font-weight: 600; color: var(--text); }
.usage-pct   { font-size: .82rem; color: var(--text-muted); }
.usage-bar   { height: 5px; background: var(--bg-2); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 10px; }
.usage-fill  { height: 100%; background: var(--grad-primary); border-radius: var(--radius-full); transition: width .5s ease; }
.usage-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.usage-chip  { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: .74rem; color: var(--text-muted); }
.usage-fill-init { width: 0%; }

/* ── Form Card ────────────────────────────────────────────────── */
.form-card { display: flex; flex-direction: column; gap: 16px; }
.form-row  { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media(min-width:480px) { .form-row { grid-template-columns: 1fr 1fr; } }
.word-counter { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.word-counter span { font-size: .77rem; color: var(--text-muted); }
.word-counter .over-limit { color: var(--danger) !important; font-weight: 600; }
.word-counter-hint { margin-left: auto; font-size: .74rem; color: var(--text-light); }

/* ── Form Elements ───────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .84rem; font-weight: 600; color: var(--text); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif; font-size: .9rem; line-height: 1.5;
  transition: var(--transition);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  -webkit-user-select: text !important;
  user-select: text !important;
  touch-action: auto !important;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--glow-color);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
  background: var(--bg-card);
}
.form-textarea { resize: vertical; min-height: 110px; }
.textarea-tall { min-height: 260px; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234f46e5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer;
}
.form-hint { font-size: .77rem; color: var(--text-muted); }
.danger-star { color: var(--danger); }
.optional-label { color: var(--text-muted); font-size: .77rem; font-weight: 400; }

/* ── Output Box ───────────────────────────────────────────────── */
.output-wrap { position: relative; }
.output-box {
  min-height: 320px; padding: 18px;
  background: transparent; border: none;
  border-radius: var(--radius-md);
  font-size: .92rem; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; color: var(--text);
}
.output-placeholder { color: var(--text-light); font-style: italic; }
.output-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.output-header h3 { font-size: 1rem; font-weight: 700; }
.output-actions { display: flex; gap: 8px; flex-wrap: wrap; min-height: 36px; }
.output-actions.hidden { opacity: 0; pointer-events: none; visibility: hidden; display: flex !important; min-height: 0; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 100px; color: var(--text-muted); font-size: .9rem; }
.model-badge-wrap { margin-top: 10px; }

/* ── Bypass toggle ────────────────────────────────────────────── */
.bypass-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.bypass-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.bypass-row-text { flex: 1; }
.bypass-row-text label { font-size: .9rem; font-weight: 600; cursor: pointer; }
.bypass-row-text small { display: block; font-size: .77rem; color: var(--text-muted); margin-top: 2px; }
.badge-bypass { font-size: .68rem; vertical-align: middle; margin-left: 4px; }

/* ── Detector Result ──────────────────────────────────────────── */
.detector-result { text-align: center; padding: 8px 0; }
.detector-circle {
  width: 120px; height: 120px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto 16px; border: 4px solid var(--border);
  font-size: 1.8rem; font-weight: 800; transition: var(--transition-slow);
}
.detector-circle.ai    { border-color: var(--danger);  background: rgba(220,38,38,.07);  color: var(--danger); }
.detector-circle.mixed { border-color: var(--warning); background: rgba(217,119,6,.07);  color: var(--warning); }
.detector-circle.human { border-color: var(--success); background: rgba(5,150,105,.07);  color: var(--success); }
.detector-label     { font-size: .77rem; font-weight: 600; opacity: .8; }
.detector-heading   { margin-bottom: 8px; }
.detector-reasoning { font-size: .9rem; color: var(--text-muted); max-width: 480px; margin: 0 auto 16px; }
.signals-wrap { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.result-card-title  { margin-bottom: 16px; }
.detector-h-spacing { margin-bottom: 8px; }

/* ── Ad Slot ──────────────────────────────────────────────────── */
.ad-slot {
  background: linear-gradient(135deg, rgba(79,70,229,.06) 0%, rgba(124,58,237,.04) 100%);
  border: 1.5px solid rgba(79,70,229,.18);
  border-radius: 0;
  padding: 11px 20px;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  display: none;
  font-weight: 500;
}
.ad-slot.visible { display: block; }
.ad-slot a { color: var(--primary); font-weight: 700; text-decoration: none; }
.ad-slot a:hover { text-decoration: underline; }

/* ── Progress bar ─────────────────────────────────────────────── */
.progress-bar { height: 5px; background: var(--bg-2); border-radius: var(--radius-full); overflow: hidden; margin: 12px 0; }
.progress-fill { height: 100%; background: var(--grad-primary); border-radius: var(--radius-full); transition: width .3s ease; width: 0%; }

/* ── Button variants for tools ───────────────────────────────── */
.btn-tool { padding: 14px; font-size: .95rem; }
.btn-auth { padding: 13px; font-size: 1rem; }
.btn-auth-submit { width: 100%; padding: 13px; font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px;
  max-width: calc(100vw - 40px);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: .875rem; font-weight: 500; max-width: 360px;
  animation: slideIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideIn { from { transform: translateX(110%); opacity:0; } to { transform: translateX(0); opacity:1; } }
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger);  }
.toast.warning { border-color: var(--warning); }
.toast.info    { border-color: var(--info);    }

/* ══════════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(28,25,23,.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-2xl);
  padding: 32px 28px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-xl); border: 1px solid var(--border);
  animation: modalIn .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn { from { transform: scale(.93) translateY(16px); opacity:0; } to { transform: scale(1) translateY(0); opacity:1; } }
.modal-icon  { font-size: 2.8rem; text-align: center; margin-bottom: 12px; }
.modal-title { font-size: 1.25rem; font-weight: 800; text-align: center; margin-bottom: 8px; letter-spacing: -.02em; }
.modal-body  { color: var(--text-muted); text-align: center; font-size: .9rem; margin-bottom: 20px; line-height: 1.6; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
@media(min-width:400px) { .modal-actions { flex-direction: row; justify-content: center; } }
.modal-centered { text-align: center; }
.modal-ad-wrap {
  background: var(--bg-2); border: 1px dashed var(--border);
  border-radius: var(--radius-md); padding: 14px; text-align: center; margin-bottom: 16px;
}
.modal-ad-text  { font-size: .82rem; color: var(--text-muted); margin-bottom: 8px; }
.modal-ad-timer { font-size: .85rem; color: var(--text-muted); margin-top: 8px; }

/* ══════════════════════════════════════════════════════════════
   PRICING PAGE — Premium card design
══════════════════════════════════════════════════════════════ */
.pricing-hero { text-align: center; padding: 56px 0 24px; }
.pricing-hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -.03em;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 14px;
}
.pricing-hero p { color: var(--text-muted); margin-bottom: 32px; font-size: 1.05rem; }

/* Billing toggle */
.billing-toggle {
  display: inline-flex;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-full); padding: 4px; gap: 4px; margin-bottom: 44px;
}
.bill-btn {
  padding: 8px 24px; border-radius: var(--radius-full); border: none;
  background: transparent; color: var(--text-muted);
  font-weight: 600; cursor: pointer; transition: var(--transition); font-size: .875rem;
  font-family: 'DM Sans', sans-serif;
}
.bill-btn.active { background: var(--bg-card); color: var(--primary); box-shadow: var(--shadow-sm); }
.bill-save {
  background: linear-gradient(135deg,var(--success),#047857);
  color: #fff; font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: var(--radius-full); margin-left: 4px;
}

/* Pricing grid */
.pricing-grid-3 {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  align-items: stretch; max-width: 1080px; margin: 0 auto 32px;
}
@media(min-width:700px)  { .pricing-grid-3 { grid-template-columns: repeat(2,1fr); gap: 24px; } }
@media(min-width:1024px) { .pricing-grid-3 { grid-template-columns: repeat(3,1fr); gap: 28px; } }

.plan-card {
  border-radius: var(--radius-xl); padding: 28px 24px;
  border: 1.5px solid var(--border); background: var(--bg-card);
  position: relative; display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s;
}
@media(hover: hover) and (pointer: fine) {
  .plan-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
}

.plan-card.popular {
  border-color: var(--primary);
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(79,70,229,.04) 100%);
  box-shadow: 0 4px 24px rgba(79,70,229,.15);
}
@media(min-width:1024px) {
  .plan-card.popular { transform: scale(1.03); box-shadow: 0 8px 36px rgba(79,70,229,.22); }
  .plan-card.popular:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 20px 56px rgba(79,70,229,.3); }
}
@media(max-width:1023px) { .plan-card.popular { transform: none !important; } }

.plan-card.plan-premium {
  border-color: var(--accent);
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(124,58,237,.04) 100%);
}
.plan-card.popular, .plan-card.plan-premium { padding-top: 44px; }

/* Badge wrapper */
.plan-badge-wrap {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; white-space: nowrap; z-index: 2;
}
.plan-badge {
  display: inline-flex; align-items: center;
  padding: 4px 14px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.badge-popular  { background: var(--grad-primary); color: #fff; }
.badge-value    { background: linear-gradient(135deg,var(--success),#047857); color: #fff; }
.badge-premium  { background: linear-gradient(135deg,#7c3aed,#db2777); color: #fff; }
.badge-inline   { font-size: .62rem; vertical-align: middle; margin-left: 4px; }

/* Plan elements */
.plan-icon  { font-size: 2rem; margin-bottom: 10px; }
.plan-name  { font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; color: var(--text); letter-spacing: -.02em; }
.plan-desc  { font-size: .875rem; color: var(--text-muted); margin-bottom: 18px; min-height: 42px; line-height: 1.55; }
.plan-price { font-size: 2.8rem; font-weight: 800; line-height: 1; color: var(--text); margin-bottom: 4px; letter-spacing: -.04em; }
.plan-price .per  { font-size: .95rem; font-weight: 500; color: var(--text-muted); }
.plan-price .orig { font-size: .88rem; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }
.plan-price-note  { font-size: .77rem; color: var(--text-muted); margin-bottom: 18px; min-height: 16px; }

/* Tier select */
.tier-wrap  { margin-bottom: 18px; }
.tier-label { font-size: .77rem; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 5px; }
.tier-select {
  width: 100%; padding: 11px 36px 11px 14px;
  border-radius: var(--radius-md); border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text);
  font-size: .875rem; font-weight: 500; font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%234f46e5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  transition: var(--transition);
}
.tier-select:hover  { border-color: var(--primary); background-color: var(--bg-card); }
.tier-select:focus  { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--glow-color); box-shadow: 0 0 0 3px rgba(79,70,229,.1); background-color: var(--bg-card); }

/* Plan features */
.plan-features {
  list-style: none; padding: 0; margin: 16px 0 24px;
  display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.plan-features li { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; line-height: 1.45; color: var(--text); }
.plan-features li .fi { flex-shrink: 0; font-size: .82rem; margin-top: 2px; }
.plan-features li.no  { color: var(--text-muted); }

/* Plan buttons */
.plan-btn {
  margin-top: auto; padding: 13px 20px; font-size: .95rem; font-weight: 700;
  border-radius: var(--radius-md); border: none; cursor: pointer; width: 100%;
  text-align: center; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif;
}
.plan-basic .plan-btn { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.plan-basic .plan-btn:hover { background: var(--primary-dark); box-shadow: var(--shadow-primary-lg); transform: translateY(-1px); }
.btn-pro { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-pro:hover { background: var(--primary-dark); box-shadow: var(--shadow-primary-lg); transform: translateY(-1px); }
.btn-premium { background: linear-gradient(135deg,#7c3aed,#db2777); color: #fff; box-shadow: 0 4px 18px rgba(124,58,237,.35); }
.btn-premium:hover { box-shadow: 0 8px 28px rgba(124,58,237,.5); transform: translateY(-1px); opacity: .95; }

/* Compare table */
.compare-section { margin-top: 60px; }
.compare-section .section-title { margin-bottom: 8px; }
.compare-section .section-sub   { margin-bottom: 28px; }
.compare-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.compare-table {
  width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 540px;
}
.compare-table th {
  background: var(--bg-2); padding: 13px 16px;
  text-align: center; font-weight: 700; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.compare-table th.feature-col { text-align: left; min-width: 160px; }
.compare-table th.col-pro     { color: var(--primary); }
.compare-table th.col-premium { color: var(--accent); }
.compare-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.compare-table td:first-child { text-align: left; font-weight: 500; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover td { background: var(--bg-2); }
.chk { color: var(--success); font-size: 1.05rem; }
.crs { color: var(--text-light); }

/* Current plan banner */
.cur-plan-banner { display: none !important; }
.cur-plan-banner.visible {
  display: flex !important; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  background: rgba(79,70,229,.07); border: 1.5px solid rgba(79,70,229,.2);
  border-radius: var(--radius-lg); padding: 14px 20px; text-align: center;
  margin: 0 auto 32px; max-width: 500px; font-size: .9rem;
}

/* Payment row */
.payment-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 28px 0; flex-wrap: wrap;
}
.pay-icon {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .77rem; color: var(--text-muted); font-weight: 500;
}

/* FAQ */
.faq-section { max-width: 680px; margin: 60px auto 0; }
.faq-section .section-title { margin-bottom: 24px; }
.faq-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; text-align: left; padding: 16px 20px; background: var(--bg-card);
  border: none; font-weight: 600; font-size: .9rem; color: var(--text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; transition: var(--transition); font-family: 'DM Sans', sans-serif;
}
.faq-q:hover { background: var(--bg-2); }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--primary); flex-shrink: 0; transition: var(--transition); }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { display: none; padding: 0 20px 16px; color: var(--text-muted); font-size: .875rem; line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* Plan tease grid (home page) */
.plan-tease-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 28px; }
@media(min-width:480px) { .plan-tease-grid { grid-template-columns: repeat(2,1fr); } }
@media(min-width:900px) { .plan-tease-grid { grid-template-columns: repeat(4,1fr); } }
.plan-tease {
  padding: 20px; border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); background: var(--bg-card);
  transition: var(--transition-slow);
}
@media(hover: hover) and (pointer: fine) {
  .plan-tease:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
}
.plan-tease.pop { border-color: var(--primary); background: linear-gradient(145deg,var(--bg-card),rgba(79,70,229,.04)); }
.plan-tease-name  { font-weight: 800; font-size: 1rem; margin-bottom: 4px; letter-spacing: -.01em; }
.plan-tease-price { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin: 4px 0; letter-spacing: -.03em; }
.plan-tease-price span { font-size: .84rem; font-weight: 400; color: var(--text-muted); }
.plan-tease-price-accent { color: var(--accent); }
.plan-tease-desc  { font-size: .8rem; color: var(--text-muted); }
.pricing-section  { padding-top: 0; }

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES — Clean, trustworthy
══════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 28px 20px;
  background: var(--bg);
  /* Subtle dot grid */
  background-image: radial-gradient(circle, var(--bg-3) 1px, transparent 1px);
  background-size: 24px 24px;
}

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-xl);
}
@media(max-width:480px) { .auth-card { padding: 28px 24px; border-radius: var(--radius-xl); } }

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header .logo { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: var(--radius-md); }
.auth-header h1 { font-size: 1.7rem; margin-bottom: 6px; letter-spacing: -.03em; }
.auth-header p   { font-size: .9rem; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-light); font-size: .82rem; margin: 4px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text); font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: var(--transition); font-family: 'DM Sans', sans-serif;
}
.google-btn:hover { background: var(--bg-2); border-color: var(--text-light); box-shadow: var(--shadow-sm); }

.auth-footer { text-align: center; margin-top: 18px; font-size: .875rem; color: var(--text-muted); }
.auth-footer a { font-weight: 700; color: var(--primary); }
.auth-error {
  background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.2);
  color: var(--danger); padding: 10px 14px; border-radius: var(--radius-md);
  font-size: .875rem; display: none;
}

/* Password field */
.pw-wrap { position: relative; }
.pw-input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 1rem; cursor: pointer;
  color: var(--text-muted); line-height: 1; padding: 0;
}
.pw-toggle:hover { color: var(--text); }

/* Strength bar */
.strength-bar { height: 4px; background: var(--bg-2); border-radius: var(--radius-full); overflow: hidden; margin-top: 5px; }
.strength-fill { height: 100%; border-radius: var(--radius-full); transition: all .3s; width: 0; }
.strength-label { font-size: .74rem; margin-top: 3px; }

/* Label row */
.label-row { display: flex; justify-content: space-between; align-items: center; }
.label-row .form-label { margin-bottom: 0; }
.forgot-link { font-size: .8rem; font-weight: 600; color: var(--primary); }
.forgot-link:hover { text-decoration: underline; }

.auth-fine-print { text-align: center; margin-top: 14px; }
.auth-fine-print p { font-size: .74rem; color: var(--text-light); }

/* Alert boxes */
.alert-success {
  display: none; background: rgba(5,150,105,.06); border: 1px solid rgba(5,150,105,.25);
  color: var(--success); padding: 12px 16px; border-radius: var(--radius-md);
  font-size: .9rem; text-align: center; margin-bottom: 16px;
}
.alert-success a { font-weight: 700; color: var(--success); }
.alert-success a:hover { text-decoration: underline; }

.no-token-wrap { display: none; text-align: center; }
.no-token-icon { font-size: 2rem; margin-bottom: 12px; }
.no-token-msg  { color: var(--danger); margin-bottom: 16px; }
.link-bold { font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 56px; }
.footer-inner {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
@media(min-width:640px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-copy { font-size: .84rem; color: var(--text-muted); text-align: left; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: .84rem; color: var(--text-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--primary); text-decoration: none; }
.footer p { font-size: .84rem; }

/* ══════════════════════════════════════════════════════════════
   MODELS GRID
══════════════════════════════════════════════════════════════ */
.models-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 16px;
  max-width: 760px; margin: 32px auto 0;
}
@media(min-width:640px) { .models-grid { grid-template-columns: repeat(3,1fr); gap: 20px; } }
@media(min-width:1024px) { .models-grid { grid-template-columns: repeat(6,1fr); gap: 16px; } }
.model-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 16px; text-align: center; transition: var(--transition);
}
@media(hover: hover) and (pointer: fine) {
  .model-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
}
.model-card.model-card-featured {
  border-color: var(--primary);
  background: linear-gradient(145deg,var(--bg-card),rgba(79,70,229,.05));
  box-shadow: 0 4px 20px rgba(79,70,229,.12);
}
.model-card-icon { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.model-card-name { font-weight: 800; font-size: .92rem; margin-bottom: 4px; color: var(--text); }
.model-card-desc { font-size: .74rem; color: var(--text-muted); line-height: 1.4; }

/* ══════════════════════════════════════════════════════════════
   LANG FLOAT
══════════════════════════════════════════════════════════════ */
.lang-float { position: fixed; bottom: 24px; left: 20px; z-index: 9999; display: inline-block; }
.lang-dropdown {
  position: absolute; bottom: calc(100% + 8px); left: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 6px; width: 200px; max-height: 260px; overflow-y: auto;
  display: none; flex-direction: column; gap: 2px;
  z-index: 9999;
}
.lang-dropdown.open { display: flex; }
.lang-float-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius-full);
  background: var(--bg-card); border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md); font-size: .82rem; font-weight: 600;
  cursor: pointer; color: var(--text); transition: var(--transition);
}
.lang-float-btn:hover { box-shadow: var(--shadow-lg); border-color: var(--primary); }
.lang-dropdown-menu {
  position: fixed; bottom: 70px; left: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 6px; width: 200px; max-height: 260px; overflow-y: auto;
  display: none; flex-direction: column; gap: 2px;
  z-index: 9999;
}
.lang-dropdown-menu.open { display: flex; }
.lang-opt {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500;
  cursor: pointer; border: none; background: transparent;
  color: var(--text); text-align: left; width: 100%; transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.lang-opt:hover { background: var(--bg-2); }
.lang-opt.active { color: var(--primary); background: rgba(79,70,229,.07); }
.lang-caret { font-size: .6rem; opacity: .6; }

/* ══════════════════════════════════════════════════════════════
   PAYMENT SUCCESS PAGE
══════════════════════════════════════════════════════════════ */
.success-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.success-card { text-align: center; max-width: 440px; }
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.success-page-title { margin-bottom: 12px; }
.success-page-sub   { margin-bottom: 8px; }
.success-page-note  { font-size: .875rem; color: var(--text-light); margin-bottom: 28px; }
.success-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ══════════════════════════════════════════════════════════════
   UTILITY
══════════════════════════════════════════════════════════════ */
.hidden        { display: none !important; }
.text-center   { text-align: center; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }


/* ══════════════════════════════════════════════════════════════
   DARK MODE — Full page coverage
══════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg:           #0f1117;
  --bg-2:         #1a1d27;
  --bg-3:         #22263a;
  --bg-card:      #1e2130;
  --border:       #2e3347;
  --text:         #e8eaf0;
  --text-muted:   #8b90a8;
  --text-light:   #5c6080;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:    0 8px 24px rgba(0,0,0,.5);
  --shadow-xl:    0 16px 48px rgba(0,0,0,.6);
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .nav { background: rgba(15,17,23,.92); border-bottom-color: var(--border); }
[data-theme="dark"] .card, [data-theme="dark"] .usage-card, [data-theme="dark"] .form-card, [data-theme="dark"] .output-box { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .form-input, [data-theme="dark"] .form-select, [data-theme="dark"] .form-textarea { background: var(--bg-2); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .form-input::placeholder, [data-theme="dark"] .form-textarea::placeholder { color: var(--text-light); }
[data-theme="dark"] .plan-card { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .plan-card.popular { border-color: var(--primary); }
[data-theme="dark"] .compare-table th { background: var(--bg-2); color: var(--text); }
[data-theme="dark"] .compare-table td { border-color: var(--border); color: var(--text); }
[data-theme="dark"] .compare-table tr:hover td { background: var(--bg-2); }
[data-theme="dark"] .faq-item { border-color: var(--border); }
[data-theme="dark"] .faq-q { color: var(--text); }
[data-theme="dark"] .faq-a { background: var(--bg-2); color: var(--text-muted); }
[data-theme="dark"] .billing-toggle { background: var(--bg-2); }
[data-theme="dark"] .bill-btn { color: var(--text-muted); }
[data-theme="dark"] .bill-btn.active { background: var(--bg-card); color: var(--text); }
[data-theme="dark"] .profile-menu-item { color: var(--text); }
[data-theme="dark"] .profile-menu-item:hover { background: rgba(255,255,255,0.07); }
[data-theme="dark"] .mobile-menu { background: var(--bg-card); border-color: var(--border); box-shadow: 0 8px 40px rgba(0,0,0,.4); }
[data-theme="dark"] .mobile-menu a { color: var(--text); }
[data-theme="dark"] .pay-modal { background: var(--bg-card); }
[data-theme="dark"] .pay-modal-overlay { background: rgba(0,0,0,.75); }
[data-theme="dark"] .pay-plan-summary { background: var(--bg-2); }
[data-theme="dark"] .pay-tab { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .pay-tab.active { background: var(--bg-2); }
[data-theme="dark"] .tier-select, [data-theme="dark"] .tier-wrap select { background: var(--bg-2); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .usage-chip { background: var(--bg-2); color: var(--text-muted); border-color: var(--border); }
[data-theme="dark"] .file-upload-btn { background: var(--bg-2); border-color: var(--border); color: var(--text-muted); }
[data-theme="dark"] .ad-banner { background: var(--bg-2); border-color: var(--border); }
[data-theme="dark"] .modal { background: var(--bg-card); }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.75); }
[data-theme="dark"] .tool-hero h1 { color: var(--text); }
[data-theme="dark"] .output-placeholder { color: var(--text-light); }
[data-theme="dark"] .footer { background: var(--bg); border-top-color: var(--border); }
[data-theme="dark"] .payment-row .pay-icon { filter: brightness(.85); }
[data-theme="dark"] select option { background: var(--bg-2); color: var(--text); }
[data-theme="dark"] .admin-tab { color: var(--text-muted); }
[data-theme="dark"] .admin-tab.active { background: var(--bg-card); color: var(--primary); }
[data-theme="dark"] .promo-table th { background: var(--bg-2); color: var(--text); }
[data-theme="dark"] .promo-table td { border-color: var(--border); }
[data-theme="dark"] .stat-card { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .pricing-section { background: var(--bg); }
[data-theme="dark"] .section { background: var(--bg); }
[data-theme="dark"] .hero { background: var(--grad-hero, linear-gradient(160deg,#1e1b4b 0%,#312e81 45%,#4c1d95 100%)); }

/* ══════════════════════════════════════════════════════════════
   RTL
══════════════════════════════════════════════════════════════ */
html[lang="ar"], html[lang="he"], html[lang="fa"], html[lang="ur"] { direction: rtl; }
[dir="rtl"] .nav-links  { flex-direction: row-reverse; }
[dir="rtl"] .hero-cta   { flex-direction: row-reverse; }
[dir="rtl"] .footer-inner { flex-direction: row-reverse; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
══════════════════════════════════════════════════════════════ */
@media(max-width:600px) {
  .pricing-grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .plan-card.popular { transform: none; box-shadow: none; }
  .plan-card { padding: 22px 18px; }
  .plan-price { font-size: 2.2rem; }
  .plan-btn { width: 100%; }
  .compare-wrap { -webkit-overflow-scrolling: touch; }
  .compare-table { font-size: .8rem; }
  .compare-table th, .compare-table td { padding: 9px 10px; }
  .billing-toggle { width: 100%; justify-content: center; }
  .plan-tease-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
  .hero-stat-num { font-size: 1.6rem; }
  .tools-grid-6 { grid-template-columns: 1fr; }
  .models-grid  { grid-template-columns: repeat(2,1fr); }
  .tool-card p  { min-height: auto; }
}
@media(min-width:601px) and (max-width:992px) {
  .pricing-grid-3 { grid-template-columns: repeat(2,1fr); }
  .plan-card.popular { transform: none; box-shadow: var(--shadow-md); }
  .plan-tease-grid { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:480px) {
  .hero-models { gap: 6px; }
  .model-chip  { font-size: .72rem; padding: 4px 10px; }
}

/* ══════════════════════════════════════════════════════════════
   PROFILE DROPDOWN
══════════════════════════════════════════════════════════════ */
.profile-wrap { position: relative; }

.profile-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad-primary);
  color: #fff; font-weight: 700; font-size: .85rem;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  flex-shrink: 0;
}
.profile-avatar:hover { transform: scale(1.08); box-shadow: var(--shadow-primary-lg); }

.profile-dropdown {
  display: none; position: fixed; z-index: 99999; right: 0; top: auto;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  padding: 12px; min-width: 248px;
  animation: modalIn .18s cubic-bezier(.34,1.56,.64,1);
}
[data-theme="dark"] .profile-dropdown {
  background: rgba(18,17,28,0.88);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}
.profile-dropdown.open { display: block; }

.profile-info {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px;
}
.profile-avatar-lg {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad-primary);
  color: #fff; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-name  { font-weight: 700; font-size: .9rem; color: var(--text); }
.profile-email { font-size: .76rem; color: var(--text-muted); margin-top: 1px; }

.profile-divider { height: 1px; background: var(--border); margin: 6px 0; }

.profile-section-label {
  font-size: .72rem; font-weight: 700; color: var(--text-light);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 8px 6px;
}

/* Color dots — gradient circles */
.theme-colors {
  display: flex; gap: 10px; padding: 4px 8px 10px; flex-wrap: wrap;
}
.color-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  flex-shrink: 0; outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.color-dot:hover {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 4px 14px rgba(0,0,0,0.25);
}
.color-dot.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 3px var(--primary), 0 0 14px var(--primary);
}

/* Menu items */
.profile-menu-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px;
  border-radius: var(--radius-md); border: none;
  background: transparent; color: var(--text);
  font-size: .875rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
  text-decoration: none !important;
}
.profile-menu-item:hover { background: var(--bg-2); }
.profile-logout { color: var(--danger) !important; }
.profile-logout:hover { background: rgba(220,38,38,.07) !important; }

/* ══════════════════════════════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════════════════════════════ */
.profile-page {
  min-height: calc(100vh - 64px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px 64px;
  background: var(--bg);
  background-image: radial-gradient(circle, var(--bg-3) 1px, transparent 1px);
  background-size: 24px 24px;
}

.profile-page-card {
  width: 100%; max-width: 560px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-2xl); padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
@media(max-width:480px) { .profile-page-card { padding: 24px 18px; } }

.profile-page-header { margin-bottom: 32px; }
.profile-page-header h1 { font-size: 1.6rem; margin-bottom: 6px; }
.profile-page-header p  { font-size: .9rem; }

.profile-section { margin-bottom: 24px; }
.profile-section-title {
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}

.profile-field-row {
  display: flex; gap: 10px; align-items: center;
}
.profile-field-row .form-input { flex: 1; }

.profile-verified-badge {
  font-size: .78rem; font-weight: 700; color: var(--success);
  background: rgba(5,150,105,.1); border-radius: var(--radius-full);
  padding: 4px 10px; white-space: nowrap;
}

.profile-msg { font-size: .82rem; margin-top: 6px; }
.profile-msg.success { color: var(--success); }
.profile-msg.error   { color: var(--danger);  }

/* ── Avatar section ──────────────────────────────────────────── */
.avatar-center { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.avatar-display { display: flex; align-items: center; gap: 14px; }

.avatar-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--grad-primary);
  color: #fff; font-weight: 800; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-primary); flex-shrink: 0;
  border: 3px solid var(--bg-card);
  outline: 2px solid var(--primary);
}

.avatar-change-btn {
  background: var(--bg-2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: var(--radius-md);
  padding: 7px 14px; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.avatar-change-btn:hover { background: var(--bg-3); }

.avatar-picker {
  display: none; width: 100%;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  flex-direction: column; gap: 12px;
}
.avatar-picker.open { display: flex; }
.avatar-picker-title { font-weight: 700; font-size: .875rem; }
.avatar-picker-or    { font-size: .78rem; color: var(--text-muted); text-align: center; }

.avatar-grid {
  display: grid; grid-template-columns: repeat(8,1fr); gap: 6px;
}
@media(max-width:480px) { .avatar-grid { grid-template-columns: repeat(6,1fr); } }

.avatar-grid-item {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1.5px solid var(--border);
  font-size: 1.3rem; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.avatar-grid-item:hover {
  background: var(--bg-card); border-color: var(--primary);
  transform: scale(1.12);
}

/* ══════════════════════════════════════════════════════════════
   PAYMENT MODAL
══════════════════════════════════════════════════════════════ */
.pay-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(28,25,23,.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 16px;
}
.pay-modal-overlay.open { display: flex; }

.pay-modal {
  background: var(--bg-card); border-radius: var(--radius-2xl);
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
  animation: modalIn .22s cubic-bezier(.34,1.56,.64,1);
}

.pay-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0; font-weight: 700; font-size: 1.05rem;
}
.pay-modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--bg-2); color: var(--text-muted);
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.pay-modal-close:hover { background: var(--bg-3); color: var(--text); }

.pay-modal-body { padding: 20px 24px 28px; }

/* Plan summary */
.pay-plan-summary {
  background: var(--bg-2); border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.pay-plan-name  { font-weight: 700; font-size: .95rem; }
.pay-plan-price { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.pay-plan-price.free { color: var(--success); }
.pay-plan-price-orig { font-size: .82rem; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }
.pay-plan-badge { font-size: .72rem; color: #fff; background: var(--success); border-radius: var(--radius-full); padding: 2px 8px; font-weight: 700; }

/* Promo code */
.promo-section { margin-bottom: 18px; }
.promo-row { display: flex; gap: 8px; }
.promo-row .form-input { flex: 1; font-family: 'DM Mono', monospace; letter-spacing: .05em; text-transform: uppercase; }
.promo-result {
  margin-top: 8px; padding: 8px 12px; border-radius: var(--radius-md);
  font-size: .84rem; font-weight: 600; display: none;
}
.promo-result.success { background: rgba(5,150,105,.08); color: var(--success); border: 1px solid rgba(5,150,105,.2); display: block; }
.promo-result.error   { background: rgba(220,38,38,.07);  color: var(--danger);  border: 1px solid rgba(220,38,38,.2);  display: block; }

/* Payment method tabs */
.pay-method-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.pay-tab {
  flex: 1; padding: 12px 8px; border-radius: var(--radius-md);
  border: 2px solid var(--border); background: var(--bg-card);
  cursor: pointer; transition: var(--transition); text-align: center;
}
.pay-tab:hover  { border-color: var(--primary); }
.pay-tab.active { border-color: var(--primary); background: rgba(79,70,229,.04); }
.pay-tab-label  { font-size: .8rem; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
.pay-tab-icons  { display: flex; align-items: center; justify-content: center; gap: 5px; }
.pay-tab-icons img { height: 18px; }

/* One-click pay */
.oneclickpay-panel { display: flex; flex-direction: column; gap: 10px; }
.gpay-btn {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: #000; color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .95rem; font-weight: 700; transition: var(--transition);
}
.gpay-btn:hover { background: #222; }
.ppay-btn {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: #ffc439; color: #003087; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .95rem; font-weight: 800; transition: var(--transition);
}
.ppay-btn:hover { background: #f0b90b; }

/* Credit card panel */
.creditcard-panel { display: none; flex-direction: column; gap: 12px; }
.creditcard-panel.active, .oneclickpay-panel.active { display: flex; }
.cc-row { display: flex; gap: 10px; }
.cc-row .form-input { flex: 1; }
.cc-field-wrap { position: relative; }
.cc-card-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 1.1rem; pointer-events: none; }
.cc-input-padded { padding-left: 38px; }

/* Pay button */
.pay-submit-btn {
  width: 100%; padding: 15px; border-radius: var(--radius-lg);
  background: var(--primary); color: #fff;
  border: none; cursor: pointer; font-size: 1rem; font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--shadow-primary); transition: var(--transition);
  margin-top: 4px;
}
.pay-submit-btn:hover { background: var(--primary-dark); box-shadow: var(--shadow-primary-lg); }
.pay-submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.pay-submit-btn.free { background: var(--success); box-shadow: 0 4px 14px rgba(5,150,105,.35); }

/* Order summary */
.pay-order-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .875rem; padding: 4px 0;
}
.pay-order-row.total { font-weight: 800; font-size: 1rem; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.pay-order-row .label { color: var(--text-muted); }
.pay-order-row.discount .value { color: var(--success); font-weight: 700; }
.pay-order-row.total .value { color: var(--primary); }

.pay-secure-note {
  text-align: center; font-size: .74rem; color: var(--text-light);
  margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 5px;
}

/* ── Profile plan badge ───────────────────────────────────────── */
.profile-plan-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.profile-plan-badge.plan-free    { background: var(--bg-3); color: var(--text-muted); }
.profile-plan-badge.plan-basic   { background: rgba(37,99,235,.12); color: #2563eb; }
.profile-plan-badge.plan-pro     { background: rgba(79,70,229,.12); color: var(--primary); }
.profile-plan-badge.plan-premium { background: rgba(124,58,237,.12); color: var(--accent); }

/* ── Current plan card highlight ──────────────────────────────── */
.plan-card.is-current-plan {
  border-color: var(--success) !important;
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(5,150,105,.04) 100%) !important;
}
.plan-card.is-current-plan::before {
  content: '✅ Your Plan';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--success); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 4px 14px;
  border-radius: var(--radius-full); white-space: nowrap;
  box-shadow: 0 2px 8px rgba(5,150,105,.3);
}

/* ══════════════════════════════════════════════════════════════
   FILE UPLOAD
══════════════════════════════════════════════════════════════ */
.file-upload-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.file-upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-md);
  background: var(--bg-2); border: 1.5px dashed var(--border);
  color: var(--text-muted); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.file-upload-btn:hover {
  background: var(--bg-card); border-color: var(--primary);
  color: var(--primary);
}
.file-upload-hint {
  font-size: .72rem; color: var(--text-light); font-weight: 400;
}
.file-upload-status {
  font-size: .8rem; font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   NAV TOOLS DROPDOWN
══════════════════════════════════════════════════════════════ */
.nav-dropdown-wrap {
  position: relative;
}
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  transition: color .18s;
  white-space: nowrap;
}
.nav-dropdown-trigger:hover { color: var(--primary); }
.nav-dd-caret {
  font-size: .6rem;
  opacity: .7;
  transition: transform .2s;
}
.nav-dd-open + .nav-dropdown-menu,
.nav-dropdown-menu.nav-dd-open { display: flex !important; }
.nav-dropdown-trigger:has(+ .nav-dropdown-menu.nav-dd-open) .nav-dd-caret,
.nav-dd-open ~ * .nav-dd-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.14);
  padding: 8px;
  min-width: 280px;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: navDdIn .18s cubic-bezier(.4,0,.2,1);
}
@keyframes navDdIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background .15s;
  cursor: pointer;
}
.nav-dd-item:hover { background: var(--bg-2); text-decoration: none !important; }
.nav-dd-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border-radius: 10px;
  flex-shrink: 0;
}
.nav-dd-name {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.nav-dd-desc {
  font-size: .72rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════
   TOOL MODEL TABS (Detector)
══════════════════════════════════════════════════════════════ */
.tool-tabs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.tool-tabs-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .18s;
}
.tool-tab:hover { border-color: var(--primary); color: var(--primary); }
.tool-tab-active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.tool-tab-badge {
  font-size: .65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 100px;
  letter-spacing: .04em;
}
.tool-tab-hot      { background: rgba(239,68,68,.15); color: #ef4444; }
.tool-tab-unlimited{ background: rgba(79,70,229,.15); color: var(--primary); }
.tool-tab-active .tool-tab-hot,
.tool-tab-active .tool-tab-unlimited { background: rgba(255,255,255,.25); color: #fff; }

/* ══════════════════════════════════════════════════════════════
   DISCIPLINE + LEVEL (Paraphraser / Rewriter)
══════════════════════════════════════════════════════════════ */
.tool-discipline-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 4px;
}
@media(min-width:768px) {
  .tool-discipline-row { flex-direction: row; align-items: flex-start; }
  .tool-discipline-wrap { width: 200px; flex-shrink: 0; }
}
.tool-level-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}
.tool-level-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .18s;
}
.tool-level-tab:hover { border-color: var(--primary); color: var(--primary); }
.tool-level-active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

/* ══════════════════════════════════════════════════════════════
   CHATPDF UPLOAD AREA
══════════════════════════════════════════════════════════════ */
.chatpdf-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg-2);
}
.chatpdf-upload-area:hover, .chatpdf-dragover {
  border-color: var(--primary);
  background: rgba(79,70,229,.04);
}
.chatpdf-upload-icon { font-size: 3rem; }
.chatpdf-upload-title { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; }
.chatpdf-upload-sub { font-size: .8rem; color: var(--text-muted); margin: 0; }

.chatpdf-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}
.chatpdf-file-icon { font-size: 1.4rem; }
.chatpdf-file-name { font-size: .875rem; font-weight: 600; color: var(--text); flex: 1; }

.chatpdf-samples-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media(min-width:640px) { .chatpdf-samples-grid { grid-template-columns: repeat(2,1fr); } }
@media(min-width:900px) { .chatpdf-samples-grid { grid-template-columns: repeat(3,1fr); } }

.chatpdf-sample {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all .18s;
}
.chatpdf-sample:hover { border-color: var(--primary); background: rgba(79,70,229,.04); }
.chatpdf-sample-icon { font-size: 1.6rem; flex-shrink: 0; }
.chatpdf-sample-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.chatpdf-sample-file  { font-size: .72rem; color: var(--text-muted); }

/* Utility additions */
.btn-danger-outline { color: var(--danger) !important; border-color: var(--danger) !important; }

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES — replaces inline styles
═══════════════════════════════════════════════════════════════ */
.u-text-muted { color: var(--text-muted); }
.u-text { color: var(--text); }
.u-text-primary { color: var(--primary); }
.u-text-primary-bold { color: var(--primary); font-weight: 700; }
.u-text-success { color: var(--success); }
.u-text-danger { color: var(--danger); }
.u-text-sm { font-size: .82rem; }
.u-text-xs-muted { font-size: .78rem; color: var(--text-muted); }
.u-text-xs-muted2 { color: var(--text-muted); font-size: .77rem; }
.u-text-xxs-muted { color: var(--text-muted); font-size: .72rem; }
.u-text-sm-muted { font-size: .85rem; color: var(--text-muted); }
.u-text-body { font-size: .875rem; }
.u-text-lg { font-size: 1.1rem; }
.u-text-base { font-size: 1rem; }
.u-text-center { text-align: center; }
.u-text-capitalize { font-weight: 700; font-size: .9rem; text-transform: capitalize; }
.u-bold { font-weight: 700; }
.u-text-heavy { font-weight: 800; color: var(--text); }
.u-italic-hint { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; font-style: italic; }
.u-label-sm { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.u-label-bold { font-size: .78rem; font-weight: 700; }
.u-label-dark { font-size: .75rem; font-weight: 700; color: #333; }
.u-label-upper { font-size: .78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.u-label-pad { padding: 6px 10px; font-size: .84rem; color: var(--text-muted); }
.u-body-muted { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }
.u-caption { font-size: .82rem; color: var(--text-muted); margin-top: 4px; }
.u-sublabel { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.u-success-label { font-size: .75rem; color: var(--success); font-weight: 600; margin-top: 2px; }
.u-subheading { font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.u-subheading-center { text-align: center; font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.u-heading-sm { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.u-heading-md { font-size: 1.4rem; margin-bottom: 6px; }
.u-page-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.u-page-heading { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.u-stat-num { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.u-stat-num-success { font-size: 2.5rem; font-weight: 800; color: var(--success); }
.u-stat-num-primary { font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.u-stat-num-blue { font-size: 1.8rem; font-weight: 800; color: #2563eb; }
.u-stat-num-accent { font-size: 1.8rem; font-weight: 800; color: var(--accent, #7c3aed); }
.u-stat-num-muted { font-size: 1.8rem; font-weight: 800; color: var(--text-muted); }
.u-stat-xl { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.u-badge-text { font-size: .78rem; font-weight: 700; color: #fff; }
.u-badge-tag { font-size: .8rem; font-weight: 700; color: var(--text-muted); background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; }
.u-badge-circle { background: var(--primary); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.u-preformatted { white-space: pre-wrap; font-size: .9rem; color: var(--text-secondary); }
.u-excerpt { font-size: .875rem; color: var(--text); line-height: 1.6; max-height: 80px; overflow: hidden; }

/* Spacing utilities */
.u-mb-4 { margin-bottom: 4px; } .u-mb-6 { margin-bottom: 6px; } .u-mb-8 { margin-bottom: 8px; }
.u-mb-10 { margin-bottom: 10px; } .u-mb-12 { margin-bottom: 12px; } .u-mb-14 { margin-bottom: 14px; }
.u-mb-16 { margin-bottom: 16px; } .u-mb-18 { margin-bottom: 18px; } .u-mb-20 { margin-bottom: 20px; }
.u-mb-24 { margin-bottom: 24px; } .u-mb-28 { margin-bottom: 28px; } .u-mb-36 { margin-bottom: 36px; }
.u-mb-48 { margin-bottom: 48px; }
.u-mt-8 { margin-top: 8px; } .u-mt-12 { margin-top: 12px; } .u-mt-14 { margin-top: 14px; }
.u-mt-16 { margin-top: 16px; } .u-mt-20 { margin-top: 20px; } .u-mt-24 { margin-top: 24px; }
.u-ml-auto { margin-left: auto; }
.u-my-tier { margin: 14px 0 10px; } .u-my-tier-sm { margin: 10px 0 4px; }
.u-pad-16-0 { padding: 16px 0; }

/* Display & layout */
.u-hidden { display: none !important; }
.u-flex-1 { flex: 1; }
.u-flex-gap-6 { display: flex; gap: 6px; }
.u-flex-gap-8 { display: flex; gap: 8px; }
.u-flex-gap-10 { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.u-flex-gap-14 { display: flex; gap: 14px; }
.u-flex-gap-6-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.u-flex-align-gap-8 { display: flex; align-items: center; gap: 8px; }
.u-flex-align-wrap-12 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.u-flex-between { display: flex; align-items: center; justify-content: space-between; }
.u-flex-between-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.u-flex-between-sm { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 5px; }
.u-flex-row-sm { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; }
.u-flex-col-8 { display: flex; flex-direction: column; gap: 8px; }
.u-flex-col-10 { display: flex; flex-direction: column; gap: 10px; }
.u-flex-col-24 { display: flex; flex-direction: column; gap: 24px; }
.u-flex-center-col { display: flex; justify-content: center; text-align: center; flex-direction: column; align-items: center; }
.u-justify-center { justify-content: center; }
.u-flex-between.u-mb-16 { margin-bottom: 16px; }
.u-flex-between.u-mb-10 { margin-bottom: 10px; }
.u-tag-row-hidden { display: none; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.u-grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.u-stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 28px; }
.u-w-auto { width: auto; } .u-w-full { width: 100%; }
.u-scroll-x { overflow-x: auto; }
.u-cursor-pointer { cursor: pointer; }
.u-mono-upper { text-transform: uppercase; font-family: 'DM Mono', monospace; letter-spacing: .05em; }
.u-mono-output { font-family: 'DM Mono', monospace; font-size: .875rem; line-height: 1.7; }
.u-disabled { opacity: .6; cursor: not-allowed; }

/* Cards */
.u-card-lg { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.u-card-center { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.u-card-center-sm { text-align: center; padding: 16px; background: var(--bg-2); border-radius: 10px; }
.u-card-center-md { text-align: center; padding: 20px; background: var(--bg-2); border-radius: 12px; }
.u-card-gradient { background: linear-gradient(135deg, rgba(79,70,229,.05), rgba(124,58,237,.05)); border: 1px solid rgba(79,70,229,.15); border-radius: 12px; padding: 20px; }
.u-admin-login-card { max-width: 380px; width: 100%; padding: 32px; }
.u-info-box { margin-top: 16px; padding: 12px 14px; background: var(--bg-2); border-radius: var(--radius-md); font-size: .84rem; color: var(--text-muted); }
.u-desc-box { font-size: .875rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; padding: 12px; background: var(--bg-2); border-radius: 8px; }
.u-page-wrap { max-width: 800px; margin: 0 auto; padding: 48px 20px; }
.u-page-wrap-sm { max-width: 600px; margin: 0 auto; padding: 48px 20px; }
.u-page-wrap-lg { max-width: 860px; margin: 0 auto; padding: 40px 20px; }

/* Alerts / state */
.u-error-box { display: none; margin-top: 8px; padding: 8px 12px; background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.2); border-radius: 8px; font-size: .8rem; }
.u-error-line { padding: 8px 12px; background: rgba(239,68,68,.05); border-left: 3px solid #ef4444; margin-bottom: 6px; border-radius: 4px; font-size: .84rem; }
.u-empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.u-empty-state-lg { text-align: center; padding: 48px; color: var(--text-muted); }
.u-error-state { text-align: center; padding: 40px; color: var(--danger); }
.u-msg-sm { margin-top: 8px; font-size: .84rem; }
.u-hint-text { text-align: center; font-size: .75rem; color: var(--text-muted); margin-top: 14px; }

/* Progress */
.u-progress-track { height: 7px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.u-progress-track-sm { height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.u-progress-bar { height: 100%; border-radius: 99px; background: var(--grad-primary); transition: width .5s ease; width: 0%; }
.u-progress-bar-animated { height: 100%; border-radius: 99px; background: var(--grad-primary); transition: width .5s ease, background .3s; }
.u-progress-bar-simple { height: 100%; border-radius: 99px; background: var(--grad-primary); transition: width .5s; }

/* Tags */
.u-tag-primary { background: rgba(79,70,229,.1); color: var(--primary); border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.u-tag-success { background: rgba(5,150,105,.1); color: var(--success); border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.u-tag-amber { background: rgba(217,119,6,.1); color: #d97706; border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.u-tag-red { background: rgba(220,38,38,.1); color: #dc2626; border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.u-tag-btn { border: 1px solid var(--border); background: var(--bg-2); border-radius: 6px; padding: 4px 10px; font-size: .75rem; cursor: pointer; }

/* Buttons */
.u-btn-success { color: #059669; border-color: #059669; background: rgba(5,150,105,.06); }
.u-btn-danger { color: #dc2626; border-color: #dc2626; }
.u-btn-rose { background: linear-gradient(135deg,#f43f5e,#e11d48); border-color: #f43f5e; }
.u-btn-green { background: var(--green, #22c55e); border-color: var(--green, #22c55e); }
.u-btn-sky { background: linear-gradient(135deg,#0ea5e9,#0284c7); border-color: #0ea5e9; }
.u-btn-sm-pad { font-size: .85rem; padding: 6px 14px; }

/* Payment cards */
.u-payment-row { flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px 0; align-items: center; }
.u-payment-badge { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.u-card-pill-white { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 8px 14px; display: flex; align-items: center; gap: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.u-card-pill-amex { background: #016FD0; border-radius: 10px; padding: 8px 14px; display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.u-card-pill-stripe { background: #635BFF; border-radius: 10px; padding: 8px 14px; display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 4px rgba(99,91,255,.35); }
.u-card-pill-applepay { background: #000; border-radius: 10px; padding: 8px 14px; display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.u-pill-white { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 8px 14px; display: flex; align-items: center; gap: 5px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* Referral */
.u-ref-link-box { flex: 1; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-family: 'DM Mono', monospace; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.u-ig-note { display: none; margin-top: 8px; padding: 8px 12px; background: rgba(188,24,136,.08); border: 1px solid rgba(188,24,136,.2); border-radius: 8px; font-size: .79rem; color: #bc1888; font-weight: 600; }

/* Modal */
.u-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 999; align-items: center; justify-content: center; padding: 16px; }
.u-modal-box { background: var(--bg-card); border-radius: 20px; padding: 32px; max-width: 420px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,.2); }

/* History */
.u-history-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }

/* Misc */
.u-emoji-lg { font-size: 2.5rem; margin-bottom: 10px; }
.u-emoji-xl { font-size: 3rem; margin-bottom: 12px; }
.u-input-search { width: 220px; }
.u-flex-between.u-mb-28 { margin-bottom: 28px; }
.u-mb-16.u-text-base { font-size: 1rem; }

/* ── Mobile: profile dropdown fix ────────────────────────────── */
@media (max-width: 768px) {
  .profile-dropdown {
    position: fixed !important;
    top: 64px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    max-width: calc(100vw - 16px) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
  }
  .nav { overflow: visible !important; z-index: 200 !important; }
  .nav-right { overflow: visible !important; }
  .profile-wrap { overflow: visible !important; position: relative !important; }
}

/* ── Edit mode actions ─────────────────────────────────────── */
.edit-mode-actions { display:none; margin-top:12px; gap:8px; flex-wrap:wrap; align-items:center; }
.edit-mode-actions.visible { display:flex; }

/* ══════════════════════════════════════════════════════════════
   THEME COLOR SYSTEM — CSS Variable overrides
══════════════════════════════════════════════════════════════ */

/* Primary buttons always use gradient */
.btn-primary, .lp-btn-primary {
  background: var(--gradient-main) !important;
  box-shadow: var(--shadow-primary) !important;
  transition: filter .18s ease, box-shadow .18s ease, transform .12s ease !important;
}
.btn-primary:hover, .lp-btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: var(--shadow-primary-lg) !important;
  transform: translateY(-1px);
}

/* Secondary buttons use primary color border */
.btn-outline {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
.btn-outline:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

/* Input/textarea focus */
input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px var(--glow-color) !important;
  outline: none !important;
}

/* Links */
a { color: var(--primary); }
a:hover { color: var(--primary-light); }

/* Progress bars */
.progress-fill, .usage-fill, .dash-progress-fill {
  background: var(--gradient-main) !important;
}

/* Badges */
.badge-primary {
  background: rgba(var(--primary), 0.1);
  color: var(--primary);
}

/* Active nav */
.nav a.active, nav a[aria-current="page"] {
  color: var(--primary) !important;
}

/* Active tabs */
.tab.active, .tab-active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
}

/* Card hover glow */
.card:hover, .tool-card:hover, .dash-tool-card:hover {
  box-shadow: 0 8px 32px var(--glow-color), var(--shadow-md) !important;
  border-color: var(--primary) !important;
}

/* Spinner */
.spinner-dark {
  border-color: var(--glow-color) !important;
  border-top-color: var(--primary) !important;
}

/* Checkbox/radio accent */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--primary);
}

/* Feature icons */
.feature-icon, .lp-feat-icon {
  background: var(--gradient-main);
  color: #fff;
}

/* Avatar */
.profile-avatar-lg {
  background: var(--gradient-main) !important;
}

/* Dark mode — stronger glow */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .lp-btn-primary {
  box-shadow: 0 4px 20px var(--glow-color-lg) !important;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
  box-shadow: 0 0 0 3px var(--glow-color-lg) !important;
}
[data-theme="dark"] .card:hover,
[data-theme="dark"] .dash-tool-card:hover {
  box-shadow: 0 8px 32px var(--glow-color-lg) !important;
}

/* ═══════════════════════════════════════════════════
   iPad Navbar Fix (768px - 1024px)
═══════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
  .nav {
    padding: 0 10px;
    gap: 4px;
    height: 56px;
  }

  .nav-brand {
    font-size: .9rem;
    gap: 6px;
  }

  .logo {
    width: 32px;
    height: 32px;
  }

  .nav-links {
    gap: 0;
    flex: 1;
    justify-content: center;
  }

  .nav-links a {
    font-size: .78rem;
    padding: 5px 8px;
  }

  .nav-dropdown-trigger {
    font-size: .78rem;
    padding: 5px 8px;
  }

  .nav-right {
    gap: 5px;
  }

  .tool-page {
    padding: 20px 12px 48px;
  }
}