/* ==========================================
   TROYMBA — Design System v2.0
   Mobile-first, modern, clean
   ========================================== */

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

/* ---- Design Tokens ---- */
:root {
  /* Colors */
  --c-bg: #F8FAFF;
  --c-white: #FFFFFF;
  --c-dark: #09090B;
  --c-text: #18181B;
  --c-text-muted: #71717A;
  --c-border: #E4E4E7;
  --c-border-light: #F4F4F5;

  /* Brand */
  --c-primary: #6366F1;
  --c-primary-dark: #4F46E5;
  --c-primary-light: #EEF2FF;
  --c-secondary: #8B5CF6;

  /* State */
  --c-success: #22C55E;
  --c-success-bg: #DCFCE7;
  --c-danger: #EF4444;
  --c-danger-bg: #FEE2E2;

  /* Hero dark */
  --c-hero-bg: #0A0A0F;
  --c-hero-surface: rgba(255,255,255,0.05);
  --c-hero-border: rgba(255,255,255,0.1);
  --c-hero-muted: rgba(255,255,255,0.6);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.12);
  --shadow-primary: 0 8px 24px rgba(99,102,241,0.35);

  /* Transitions */
  --t: 150ms ease;
  --t-md: 250ms ease;
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) { .container { padding-inline: 24px; } }
@media (min-width: 1024px) { .container { padding-inline: 32px; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  transition: all var(--t);
  white-space: nowrap;
  min-height: 44px;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
}
.btn-primary:hover, .btn-primary:active {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-outline:hover { background: var(--c-primary-light); }

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

.btn-on-dark {
  background: white;
  color: var(--c-primary);
  border-color: white;
}
.btn-on-dark:hover { box-shadow: 0 4px 16px rgba(255,255,255,0.3); transform: translateY(-1px); }

.btn-on-dark-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.25);
}
.btn-on-dark-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

.btn-lg { padding: 1rem 2rem; font-size: 1rem; border-radius: var(--r-lg); min-height: 52px; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; min-height: 36px; }
.btn-full { width: 100%; }

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  transition: background var(--t-md), border-color var(--t-md);
}

.header.dark {
  background: rgba(10,10,15,0.88);
  border-bottom-color: rgba(255,255,255,0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  z-index: 101;
}
.header.dark .logo { color: white; }

.logo-mark {
  width: 32px; height: 32px;
  background: var(--c-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  transition: all var(--t);
}
.nav-link:hover { color: var(--c-text); background: var(--c-border-light); }
.header.dark .nav-link { color: rgba(255,255,255,0.65); }
.header.dark .nav-link:hover { color: white; background: rgba(255,255,255,0.08); }

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}
@media (min-width: 768px) { .nav-actions { display: flex; } }

/* Hamburger */
.hamburger {
  width: 44px; height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--r-sm);
  z-index: 101;
}
@media (min-width: 768px) { .hamburger { display: none; } }

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: all var(--t-md);
}
.header.dark .hamburger span { background: white; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.98);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-md);
}
.mobile-nav.open { opacity: 1; pointer-events: all; }

.mobile-nav-link {
  display: block;
  width: 100%; max-width: 320px;
  padding: 1rem 1.5rem;
  border-radius: var(--r-lg);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all var(--t);
}
.mobile-nav-link:hover { background: rgba(255,255,255,0.08); color: white; }

.mobile-nav-sep {
  width: 100%; max-width: 320px;
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.5rem 0;
}

.mobile-nav-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%; max-width: 320px;
  margin-top: 0.5rem;
}

/* ---- Hero ---- */
.hero {
  background: var(--c-hero-bg);
  padding: 128px 0 72px;
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -5%, rgba(99,102,241,0.28) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 85% 60%, rgba(139,92,246,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 72%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.875rem;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.28);
  border-radius: var(--r-full);
  color: #A5B4FC;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6366F1;
  box-shadow: 0 0 8px rgba(99,102,241,0.9);
  animation: pulseDot 2.5s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 4px rgba(99,102,241,0.8); }
  50% { box-shadow: 0 0 14px rgba(99,102,241,1), 0 0 4px rgba(99,102,241,0.8); }
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.75rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: white;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #818CF8 0%, #C084FC 50%, #FB7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--c-hero-muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-inline: auto;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.875rem;
  margin-bottom: 3.5rem;
}
@media (min-width: 480px) {
  .hero-cta { flex-direction: row; justify-content: center; align-items: center; }
  .hero-cta .btn { min-width: 180px; }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 440px;
  margin-inline: auto;
}

.hero-stat {
  padding: 0.875rem 0.5rem;
  background: var(--c-hero-surface);
  border: 1px solid var(--c-hero-border);
  border-radius: var(--r-lg);
  text-align: center;
}

.hero-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.hero-stat-label {
  font-size: 0.72rem;
  color: var(--c-hero-muted);
  line-height: 1.3;
}

/* ---- Section Shared ---- */
.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-primary);
  margin-bottom: 0.875rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 0.875rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 480px;
  margin-inline: auto;
}

/* ---- Pricing ---- */
.pricing-section {
  padding: 96px 0;
  background: var(--c-white);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 960px;
  margin-inline: auto;
}
@media (min-width: 768px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.pricing-card {
  background: var(--c-white);
  border: 2px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  transition: all var(--t-md);
}
.pricing-card:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(99,102,241,0.1);
}
.pricing-card.featured:hover { transform: translateY(-5px); }

.featured-tag {
  position: absolute;
  top: -14px;
  left: 50%; transform: translateX(-50%);
  background: var(--c-primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.plan-icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--c-primary-light);
  border: 1px solid rgba(99,102,241,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--c-primary);
}
.pricing-card.featured .plan-icon-wrap {
  background: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
}

.plan-info-name { font-size: 1.15rem; font-weight: 700; }
.plan-info-desc { font-size: 0.875rem; color: var(--c-text-muted); margin-top: 0.2rem; }

.plan-price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.2rem;
}
.plan-amount {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c-text);
}
.pricing-card.featured .plan-amount { color: var(--c-primary); }
.plan-cur {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--c-text-muted);
  line-height: 1.6;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}
.plan-feature {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
}
.plan-check {
  width: 20px; height: 20px;
  background: var(--c-success-bg);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-success);
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* ---- Features Section ---- */
.features-section {
  padding: 96px 0;
  background: var(--c-bg);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 560px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  transition: all var(--t-md);
}
.feature-card:hover { border-color: rgba(99,102,241,0.3); box-shadow: var(--shadow-md); }

.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}
.fi-indigo { background: #EEF2FF; color: #6366F1; }
.fi-violet { background: #F5F3FF; color: #7C3AED; }
.fi-green  { background: #F0FDF4; color: #16A34A; }
.fi-blue   { background: #EFF6FF; color: #2563EB; }
.fi-orange { background: #FFF7ED; color: #EA580C; }
.fi-pink   { background: #FDF2F8; color: #DB2777; }

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-desc { font-size: 0.875rem; color: var(--c-text-muted); line-height: 1.6; }

/* ---- CTA Banner ---- */
.cta-section {
  padding: 96px 0;
  background: var(--c-hero-bg);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(99,102,241,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  position: relative; z-index: 1;
}
.cta-section p {
  font-size: 1.05rem;
  color: var(--c-hero-muted);
  margin-bottom: 2.5rem;
  position: relative; z-index: 1;
}
.cta-btns {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: stretch;
  position: relative; z-index: 1;
  max-width: 400px;
  margin-inline: auto;
}
@media (min-width: 480px) {
  .cta-btns { flex-direction: row; justify-content: center; align-items: center; max-width: none; }
  .cta-btns .btn { min-width: 180px; }
}

/* ---- Footer ---- */
.footer {
  background: var(--c-dark);
  color: rgba(255,255,255,0.6);
  padding: 4rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
}
.footer-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.25rem; font-weight: 800;
  color: white; margin-bottom: 0.75rem;
}
.footer-brand-desc { font-size: 0.875rem; line-height: 1.65; color: rgba(255,255,255,0.45); }
.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.55); transition: color var(--t); }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.35); }

/* ---- Modals (bottom-sheet on mobile, centered on desktop) ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-md);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 2rem; }
}

.modal-box {
  background: white;
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
  position: relative;
  transform: translateY(60px);
  transition: transform var(--t-slow);
  max-height: 95svh;
  overflow-y: auto;
}
@media (min-width: 640px) {
  .modal-box {
    border-radius: var(--r-xl);
    padding: 2.5rem;
    transform: translateY(12px) scale(0.97);
  }
}
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }

.modal-handle {
  width: 40px; height: 4px;
  background: var(--c-border);
  border-radius: var(--r-full);
  margin: 0 auto 1.5rem;
}
@media (min-width: 640px) { .modal-handle { display: none; } }

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-muted);
  font-size: 0.875rem;
  transition: all var(--t);
}
.modal-close:hover { background: var(--c-border); color: var(--c-text); }

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.modal-sub { font-size: 0.875rem; color: var(--c-text-muted); margin-bottom: 1.75rem; }

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--c-bg);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 1.75rem;
}
.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border-radius: calc(var(--r-md) - 2px);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
}
.auth-tab.active { background: white; color: var(--c-text); box-shadow: var(--shadow-sm); }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 1rem; /* 16px — prevent iOS zoom */
  color: var(--c-text);
  background: white;
  transition: all var(--t);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-input::placeholder { color: var(--c-text-muted); opacity: 1; }
.form-input.is-error { border-color: var(--c-danger); }

.form-select {
  width: 100%;
  padding: 0.875rem 2.5rem 0.875rem 1rem;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 1rem;
  color: var(--c-text);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 1rem center;
  -webkit-appearance: none;
  appearance: none;
  transition: all var(--t);
}
.form-select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--c-text-muted);
}
.form-switch a { color: var(--c-primary); font-weight: 600; }

/* Notice (inline) */
.notice {
  padding: 0.875rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: none;
}
.notice.show { display: block; }
.notice.success { background: var(--c-success-bg); color: #166534; border: 1px solid #BBF7D0; }
.notice.error   { background: var(--c-danger-bg);  color: #991B1B;  border: 1px solid #FCA5A5; }

/* ---- Payment modal extras ---- */
.pay-plan-box {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}
.pay-plan-name { font-weight: 700; font-size: 1.1rem; }
.pay-plan-details { font-size: 0.85rem; color: var(--c-text-muted); margin-top: 0.2rem; }
.pay-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--c-border);
}
.pay-total-label { font-size: 0.875rem; color: var(--c-text-muted); }
.pay-total-value { font-size: 1.5rem; font-weight: 800; color: var(--c-primary); }

.pay-security {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--c-text-muted);
  margin-top: 1rem;
}
.pay-security i { color: var(--c-success); }

.fk-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--c-text-muted);
}
.fk-badge i { color: var(--c-primary); font-size: 1.1rem; }

/* ---- Account Page ---- */
.account-page { min-height: 100svh; background: var(--c-bg); padding-top: 64px; }

.account-hero {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  padding: 3rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.account-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.account-hero-content { position: relative; z-index: 1; }
.account-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.account-hero h1 { font-size: 1.75rem; font-weight: 800; color: white; letter-spacing: -0.02em; }
.account-hero p { color: rgba(255,255,255,0.72); font-size: 0.9rem; margin-top: 0.25rem; }
.account-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.account-body {
  padding: 0 0 4rem;
  margin-top: -4rem;
  position: relative; z-index: 1;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .account-grid { grid-template-columns: 320px 1fr; align-items: start; }
}

.a-card {
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.a-card-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.a-card-title { font-size: 1rem; font-weight: 700; }
.a-card-body { padding: 1.5rem; }

.balance-box {
  background: linear-gradient(135deg, var(--c-primary-light) 0%, #F5F3FF 100%);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.balance-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-text-muted);
  margin-bottom: 0.5rem;
}
.balance-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--c-border-light);
  font-size: 0.9rem;
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label { color: var(--c-text-muted); }
.profile-row-value { font-weight: 600; }

/* Transactions */
.tx-table { width: 100%; }
.tx-head, .tx-row {
  display: grid;
  grid-template-columns: 90px 1fr 110px 100px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.75rem;
  font-size: 0.875rem;
}
.tx-head {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
}
.tx-row { border-radius: var(--r-md); transition: background var(--t); }
.tx-row:hover { background: var(--c-bg); }

.tx-amount.plus { color: var(--c-success); font-weight: 700; }
.tx-amount.minus { color: var(--c-danger); font-weight: 700; }

.tx-status {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
}
.tx-status.pending    { background: #FEF9C3; color: #854D0E; }
.tx-status.done       { background: var(--c-success-bg); color: #166534; }
.tx-status.failed     { background: #FEE2E2; color: #991B1B; }

.tx-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--c-text-muted);
  font-size: 0.9rem;
}
.tx-empty i { font-size: 2rem; opacity: 0.3; display: block; margin-bottom: 0.875rem; }

@media (max-width: 640px) {
  .tx-head { display: none; }
  .tx-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    padding: 0.875rem;
    background: var(--c-bg);
    border-radius: var(--r-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--c-border);
  }
  .tx-row .tx-date { grid-column: 1; font-size: 0.75rem; color: var(--c-text-muted); }
  .tx-row .tx-status { grid-column: 2; justify-self: end; }
  .tx-row .tx-title { grid-column: 1 / -1; font-weight: 600; }
  .tx-row .tx-amount { grid-column: 2; justify-self: end; font-size: 1rem; }
}

/* Spinner */
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================
   WIN MECHANIC — Plan Progress
   ========================================== */

.a-card-foot {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--c-border-light);
  padding-top: .75rem;
  margin-top: .25rem;
}

.win-mechanic-note {
  font-size: .78rem;
  color: var(--c-text-muted);
  line-height: 1.5;
  margin: 0;
}

.plan-progress-item { margin-bottom: 1.25rem; }
.plan-progress-item:last-child { margin-bottom: 0; }

.plan-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.plan-progress-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-text);
}

.plan-progress-prize {
  font-size: .875rem;
  font-weight: 700;
  color: #D97706;
  background: #FEF3C7;
  padding: .15rem .5rem;
  border-radius: var(--r-full);
}

/* Three dots */
.plan-progress-track {
  display: flex;
  gap: .375rem;
  align-items: center;
}

.pdot {
  flex: 1;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--c-border);
  transition: background .3s;
}

.pdot-filled { background: var(--c-primary); }

/* Third dot = winner slot */
.pdot-win { background: var(--c-border); }
.pdot-win.pdot-filled { background: #F59E0B; }

/* Pulse on "next" slot */
.pdot-next { animation: pdot-pulse 1.4s ease-in-out infinite; }
@keyframes pdot-pulse {
  0%, 100% { opacity: .4; }
  50%       { opacity: 1; }
}

/* When the next = winner slot */
.pdot-win.pdot-next {
  background: #FDE68A;
  animation: pdot-win-pulse 1.2s ease-in-out infinite;
}
@keyframes pdot-win-pulse {
  0%, 100% { background: #FDE68A; }
  50%       { background: #F59E0B; }
}

.plan-progress-hint {
  font-size: .78rem;
  color: var(--c-text-muted);
  margin-top: .4rem;
}

.pdot-hint-win {
  color: #B45309;
  font-weight: 600;
}

/* ==========================================
   WIN MECHANIC — Transaction badges
   ========================================== */

.win-badge {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .1rem .45rem;
  border-radius: var(--r-full);
  vertical-align: middle;
  margin-left: .4rem;
}

.tx-row-cashback {
  background: #FFFBEB;
}

.tx-row-cashback .tx-amount.plus {
  color: #D97706;
  font-weight: 700;
}

.tx-badge {
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .55rem;
  border-radius: var(--r-full);
}

/* ==========================================
   WIN MECHANIC — Login page promo card
   ========================================== */

.win-promo-card {
  border: 1.5px solid #FDE68A;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

.win-promo-icon {
  width: 48px;
  height: 48px;
  background: #F59E0B;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: .75rem;
}

.win-promo-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .5rem;
}

.win-promo-desc {
  font-size: .875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.win-promo-example {
  display: flex;
  gap: .625rem;
}

.win-promo-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .75rem .5rem;
  border-radius: var(--r-md);
  font-size: .78rem;
  font-weight: 500;
  text-align: center;
}

.win-promo-slot.bought {
  background: var(--c-white);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
}

.win-promo-slot.bought i { color: var(--c-text-muted); }

.win-promo-slot.winner {
  background: #F59E0B;
  color: #fff;
  border: 1px solid #D97706;
}

.win-promo-slot.winner i { color: #fff; }

/* Balance hint */
.balance-hint {
  font-size: .8rem;
  color: var(--c-success);
  margin-top: .25rem;
  min-height: 1.1em;
}
