/* ==========================================================================
   G2 LOGISTICS — LOGIN PAGE
   Full-page animated gradient + geometric line art background
   with centred glassmorphism card. Brand orange #FF5733.
   ========================================================================== */

/* ==========================================================================
   DESIGN TOKENS — Light Mode
   ========================================================================== */
:root {
  /* Background */
  --page-bg-1: #1a1a2e;
  --page-bg-2: #16213e;
  --page-bg-3: #0f3460;

  /* Glass card */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --glass-blur: 28px;

  /* Text — on dark background always */
  --login-text: #FFFFFF;
  --login-text-secondary: rgba(255, 255, 255, 0.7);
  --login-text-muted: rgba(255, 255, 255, 0.45);
  --login-text-faint: rgba(255, 255, 255, 0.3);

  /* Borders & Inputs */
  --login-border: rgba(255, 255, 255, 0.12);
  --login-border-hover: rgba(255, 255, 255, 0.22);
  --login-input-bg: rgba(255, 255, 255, 0.06);
  --login-input-focus-bg: rgba(255, 255, 255, 0.1);

  /* Brand */
  --login-brand: #FF5733;
  --login-brand-dark: #e64d2e;
  --login-brand-glow: rgba(255, 87, 51, 0.2);
  --login-brand-gradient: linear-gradient(135deg, #FF5733 0%, #e64d2e 100%);
  --login-brand-shadow: 0 4px 20px rgba(255, 87, 51, 0.35);
  --login-brand-shadow-hover: 0 8px 32px rgba(255, 87, 51, 0.5);

  /* Semantic */
  --login-success-bg: rgba(16, 185, 129, 0.12);
  --login-success-border: rgba(16, 185, 129, 0.25);
  --login-success-text: #34D399;
  --login-error-bg: rgba(225, 29, 72, 0.12);
  --login-error-border: rgba(225, 29, 72, 0.25);
  --login-error-text: #FB7185;

  /* Modal */
  --login-modal-overlay: rgba(10, 10, 20, 0.7);
  --login-modal-bg: rgba(30, 30, 40, 0.85);
  --login-modal-border: rgba(255, 255, 255, 0.1);
  --login-modal-input-bg: rgba(255, 255, 255, 0.06);

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;

  /* Divider */
  --login-divider: rgba(255, 255, 255, 0.1);
}

/* Dark mode is same as default — the page IS always dark.
   We keep the selector so theme-toggle JS doesn't break anything. */
[data-theme="dark"] {
  /* No overrides needed — tokens above are already dark-first */
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--login-text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  background: var(--page-bg-1);
}

/* ==========================================================================
   FULL-PAGE LAYOUT — Centred Card
   ========================================================================== */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   HERO BACKGROUND — fills entire viewport
   ========================================================================== */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--page-bg-1);
}

/* Animated gradient mesh */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(255, 87, 51, 0.30) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(15, 52, 96, 0.8) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(255, 140, 66, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 10% 20%, rgba(22, 33, 62, 0.9) 0%, transparent 55%);
  animation: meshDrift 12s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(3%, -2%) scale(1.02); }
  66%  { transform: translate(-2%, 3%) scale(0.98); }
  100% { transform: translate(1%, -1%) scale(1.01); }
}

/* Secondary gradient layer */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 70% 70%, rgba(255, 87, 51, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 30% 30%, rgba(255, 150, 100, 0.08) 0%, transparent 35%);
  animation: meshDrift2 16s ease-in-out infinite alternate;
}

@keyframes meshDrift2 {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(-3%, 2%) rotate(2deg); }
  100% { transform: translate(2%, -3%) rotate(-1deg); }
}

/* ─── Geometric Line Art ─── */
.hero-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0.12;
}

.hero-lines svg {
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
}

.hero-lines .line-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawLine 4s ease-out forwards;
}

.hero-lines .line-path:nth-child(2) { animation-delay: 0.3s; stroke: rgba(255, 87, 51, 0.45); stroke-width: 1.5; }
.hero-lines .line-path:nth-child(3) { animation-delay: 0.6s; }
.hero-lines .line-path:nth-child(4) { animation-delay: 0.9s; stroke: rgba(255, 140, 66, 0.35); }
.hero-lines .line-path:nth-child(5) { animation-delay: 1.2s; }
.hero-lines .line-path:nth-child(6) { animation-delay: 1.5s; stroke: rgba(255, 87, 51, 0.3); stroke-width: 1.5; }
.hero-lines .line-path:nth-child(7) { animation-delay: 1.8s; }
.hero-lines .line-path:nth-child(8) { animation-delay: 2.1s; stroke: rgba(255, 140, 66, 0.25); }

@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* Floating geometric shapes */
.geo-shape {
  position: absolute;
  z-index: 1;
  opacity: 0;
  animation: floatIn 1.5s var(--ease) forwards;
}

.geo-shape--1 {
  top: 12%;
  right: 15%;
  width: 80px;
  height: 80px;
  border: 1.5px solid rgba(255, 87, 51, 0.2);
  transform: rotate(45deg);
  animation-delay: 0.8s;
  --rot: 45deg;
}

.geo-shape--2 {
  bottom: 18%;
  left: 12%;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  animation-delay: 1.2s;
  --rot: 0deg;
}

.geo-shape--3 {
  top: 60%;
  right: 8%;
  width: 40px;
  height: 40px;
  background: rgba(255, 87, 51, 0.06);
  border-radius: 50%;
  animation-delay: 1.6s;
  --rot: 0deg;
}

.geo-shape--4 {
  top: 25%;
  left: 8%;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: rotate(30deg);
  animation-delay: 2s;
  --rot: 30deg;
}

@keyframes floatIn {
  0%   { opacity: 0; transform: translateY(20px) rotate(var(--rot, 0deg)) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)) scale(1); }
}

/* Pulsing glow on shapes */
.geo-shape--1 { animation: floatIn 1.5s var(--ease) 0.8s forwards, shapePulse 6s ease-in-out 2.3s infinite; }
.geo-shape--3 { animation: floatIn 1.5s var(--ease) 1.6s forwards, shapePulse 8s ease-in-out 3.1s infinite; }

@keyframes shapePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ==========================================================================
   GLASSMORPHISM AUTH CARD
   ========================================================================== */
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--glass-shadow);
  animation: cardReveal 0.8s var(--ease) 0.3s both;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Brand accent glow bar at top */
.auth-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 3px;
  background: var(--login-brand-gradient);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 24px rgba(255, 87, 51, 0.4);
}

/* Inner highlight — glass reflection */
.auth-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  pointer-events: none;
}

/* ==========================================================================
   CARD HEADER — Logo + Theme Toggle
   ========================================================================== */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.card-logo {
  height: 36px;
  width: auto;
  /* Always show white version on dark bg */
  filter: brightness(0) invert(1);
  transition: transform var(--duration-normal) var(--ease);
}

.card-logo:hover { transform: scale(1.03); }

/* ─── Theme Toggle ─── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--login-border);
  border-radius: var(--radius-lg);
  background: var(--login-input-bg);
  color: var(--login-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease);
}

.theme-toggle:hover {
  border-color: var(--login-brand);
  color: var(--login-brand);
  background: var(--login-brand-glow);
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ─── Form Header ─── */
.form-header { margin-bottom: 2rem; }

.form-header h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--login-text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
}

.form-header p {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--login-text-muted);
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.row label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--login-text-secondary);
  letter-spacing: 0.02em;
}

/* ─── Glass-style Inputs ─── */
.control { position: relative; }

.control input {
  width: 100%;
  padding: 0.8rem 1rem;
  min-height: 50px;
  background: var(--login-input-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--login-border);
  border-radius: var(--radius-lg);
  color: var(--login-text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  transition: all var(--duration-fast) var(--ease);
}

.control input::placeholder { color: var(--login-text-faint); }

.control input:hover {
  border-color: var(--login-border-hover);
  background: var(--login-input-focus-bg);
}

.control input:focus {
  outline: none;
  border-color: var(--login-brand);
  background: var(--login-input-focus-bg);
  box-shadow: 0 0 0 3px var(--login-brand-glow), 0 0 24px rgba(255, 87, 51, 0.1);
}

.control.has-toggle input { padding-right: 3.25rem; }

/* ─── Password Toggle ─── */
.toggle-password {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: var(--login-text-faint);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease);
}

.toggle-password:hover { color: var(--login-text-secondary); }
.toggle-password svg { width: 20px; height: 20px; }
.toggle-password .eye-closed { display: none; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.75rem;
}

.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1.5rem;
  min-height: 50px;
  background: var(--login-brand-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  box-shadow: var(--login-brand-shadow);
}

/* Glass sheen on button */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--login-brand-shadow-hover);
}

.btn-primary:focus {
  outline: none;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--login-brand);
  outline-offset: 2px;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 87, 51, 0.25);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
}

@keyframes login-spin { to { transform: rotate(360deg); } }

.btn-link {
  padding: 0.5rem;
  background: transparent;
  color: var(--login-text-muted);
  border: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease);
}

.btn-link:hover { color: var(--login-brand); }

/* ==========================================================================
   NOTIFICATION MESSAGES
   ========================================================================== */
.note-ok,
.note-err {
  display: none;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 1rem;
  animation: note-reveal var(--duration-normal) var(--ease);
  backdrop-filter: blur(8px);
}

.note-ok[style*="display: block"],
.note-err[style*="display: block"],
.note-ok[style*="display: flex"],
.note-err[style*="display: flex"] {
  display: flex !important;
}

@keyframes note-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.note-ok {
  background: var(--login-success-bg);
  border: 1px solid var(--login-success-border);
  color: var(--login-success-text);
}

.note-err {
  background: var(--login-error-bg);
  border: 1px solid var(--login-error-border);
  color: var(--login-error-text);
}

.note-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }

/* ==========================================================================
   CONTACT CTA
   ========================================================================== */
.contact-cta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--login-divider);
  text-align: center;
}

.contact-cta h3 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--login-text);
  margin-bottom: 0.25rem;
}

.contact-cta p {
  font-size: 0.8125rem;
  color: var(--login-text-muted);
  margin-bottom: 0.75rem;
}

.contact-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--login-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--login-border);
  transition: all var(--duration-fast) var(--ease);
}

.contact-cta a:hover {
  border-color: var(--login-brand);
  color: var(--login-brand);
  background: var(--login-brand-glow);
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.login-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--login-modal-overlay);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  padding: 2rem 0;
}

.login-modal-card {
  background: var(--login-modal-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--login-modal-border);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.login-modal-card.wide { max-width: 600px; }

/* ==========================================================================
   MULTI-STEP WIZARD
   ========================================================================== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.step-dot {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.step-dot .dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--login-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--login-text-muted);
  transition: all var(--duration-normal) var(--ease);
}

.step-dot .dot-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--login-text-muted);
  transition: color var(--duration-normal) var(--ease);
}

.step-dot.active .dot {
  background: var(--login-brand);
  border-color: var(--login-brand);
  color: white;
  box-shadow: 0 0 16px rgba(255, 87, 51, 0.4);
}

.step-dot.active .dot-label { color: var(--login-text); font-weight: 600; }

.step-dot.completed .dot {
  background: var(--login-success-text);
  border-color: var(--login-success-text);
  color: white;
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--login-border);
  transition: background var(--duration-normal) var(--ease);
}

.step-connector.done { background: var(--login-success-text); }

.step-panel { display: none; }
.step-panel.active {
  display: block;
  animation: stepSlideIn 0.4s var(--ease) both;
}
.step-panel.exiting {
  animation: stepSlideOut 0.25s var(--ease) both;
}

@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes stepSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}
.step-panel.entering-back {
  animation: stepSlideInBack 0.4s var(--ease) both;
}
@keyframes stepSlideInBack {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Pricing Plan Cards ─── */
.pricing-plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pricing-plan-card {
  position: relative;
  padding: 1.25rem;
  border: 2px solid var(--login-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  background: var(--login-modal-input-bg);
}

.pricing-plan-card:hover { border-color: var(--login-border-hover); }

.pricing-plan-card.selected {
  border-color: var(--login-brand);
  background: var(--login-brand-glow);
  box-shadow: 0 0 24px rgba(255, 87, 51, 0.15);
}

.pricing-plan-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

.plan-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.plan-badge.recommended { background: rgba(255, 87, 51, 0.2); color: var(--login-brand); }
.plan-badge.standard { background: var(--login-border); color: var(--login-text-muted); }

.plan-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--login-text); margin-bottom: 0.25rem; }
.plan-rate { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--login-text); margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.plan-rate .rate-unit { font-size: 0.8125rem; font-weight: 500; color: var(--login-text-muted); }
.plan-desc { font-size: 0.75rem; color: var(--login-text-muted); line-height: 1.5; }
.plan-features { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.375rem; }
.plan-feature { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--login-text-secondary); }
.plan-feature svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--login-success-text); }

/* ─── Terms & Payment ─── */
.terms-box {
  background: var(--login-modal-input-bg);
  border: 1px solid var(--login-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: var(--login-text);
  line-height: 1.6;
}

.terms-box p { margin-bottom: 0.625rem; }
.terms-box p:last-child { margin-bottom: 0; }
.terms-box strong { color: var(--login-text); font-weight: 600; }
.terms-box .terms-warning { color: var(--login-error-text); font-weight: 600; }

.payment-method-cards { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }

.payment-method-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--login-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}

.payment-method-card:hover { border-color: var(--login-border-hover); }
.payment-method-card.selected { border-color: var(--login-brand); }
.payment-method-card input[type="radio"] { margin-top: 3px; accent-color: var(--login-brand); }
.payment-method-title { font-weight: 600; font-size: 0.875rem; color: var(--login-text); }
.payment-method-desc { font-size: 0.75rem; color: var(--login-text-muted); margin-top: 2px; }

.terms-accept-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--login-modal-input-bg);
  border: 1px solid var(--login-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: var(--login-text);
  line-height: 1.5;
}

.terms-accept-label input[type="checkbox"] { margin-top: 3px; accent-color: var(--login-brand); }

.step-nav { display: flex; gap: 0.75rem; }
.step-nav .modal-btn-primary { flex: 1; }

.step-nav .btn-back {
  padding: 0.875rem 1.25rem;
  min-height: 48px;
  background: transparent;
  color: var(--login-text-secondary);
  border: 2px solid var(--login-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}

.step-nav .btn-back:hover { border-color: var(--login-text-muted); color: var(--login-text); }

/* ─── Modal Shared ─── */
.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.modal-icon.brand { background: var(--login-brand-glow); }
.modal-icon.success { background: var(--login-success-bg); }
.modal-icon svg { width: 28px; height: 28px; }

.login-modal-card h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--login-text);
  margin-bottom: 0.5rem;
  text-align: center;
}

.login-modal-card .modal-subtitle {
  color: var(--login-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
  margin-bottom: 1.75rem;
}

.modal-form-group { margin-bottom: 1.25rem; }

.modal-form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--login-text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  min-height: 48px;
  background: var(--login-modal-input-bg);
  border: 1.5px solid var(--login-border);
  border-radius: var(--radius-lg);
  color: var(--login-text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: all var(--duration-fast) var(--ease);
}

.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
  outline: none;
  border-color: var(--login-brand);
  box-shadow: 0 0 0 3px var(--login-brand-glow);
}

.modal-form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
  cursor: pointer;
}

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

.modal-section-title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--login-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.modal-btn-primary {
  width: 100%;
  padding: 0.875rem;
  min-height: 48px;
  background: var(--login-brand-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  box-shadow: var(--login-brand-shadow);
  position: relative;
  overflow: hidden;
}

.modal-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

.modal-btn-primary:focus { outline: none; }
.modal-btn-primary:focus-visible { outline: 2px solid var(--login-brand); outline-offset: 2px; }
.modal-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--login-brand-shadow-hover); }
.modal-btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 2px 8px rgba(255, 87, 51, 0.2); }
.modal-btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.modal-error {
  display: none;
  background: var(--login-error-bg);
  border: 1px solid var(--login-error-border);
  color: var(--login-error-text);
  padding: 0.875rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* ─── Password Strength ─── */
.password-strength { margin-top: 0.75rem; }
.strength-bars { display: flex; gap: 4px; margin-bottom: 0.5rem; }

.strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--login-border);
  transition: background var(--duration-fast) var(--ease);
}

.strength-bar.active.weak   { background: #F43F5E; }
.strength-bar.active.medium { background: #F59E0B; }
.strength-bar.active.strong { background: #10B981; }

.strength-text { font-size: 0.75rem; font-weight: 500; color: var(--login-text-muted); }
.strength-text.weak   { color: #F43F5E; }
.strength-text.medium { color: #F59E0B; }
.strength-text.strong { color: #10B981; }

.password-requirements { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.375rem 1rem; }

.req-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--login-text-faint);
  transition: color var(--duration-fast) var(--ease);
}

.req-item.met { color: var(--login-success-text); }
.req-item svg { width: 14px; height: 14px; flex-shrink: 0; }

.modal-success { text-align: center; padding: 1rem; }
.modal-success h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--login-text); margin-bottom: 0.5rem; }
.modal-success p { color: var(--login-text-muted); font-size: 1rem; }

/* ==========================================================================
   GRAND FINALE — Welcome celebration
   ========================================================================== */
.welcome-finale {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0d0d1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: finaleIn 0.6s var(--ease) both;
}

@keyframes finaleIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.welcome-finale.fading-out {
  animation: finaleOut 1s var(--ease) both;
}

@keyframes finaleOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.finale-logo {
  width: 120px;
  height: auto;
  opacity: 0;
  transform: scale(0.6);
  animation: logoReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
  filter: drop-shadow(0 0 40px rgba(255, 87, 51, 0.5));
}

@keyframes logoReveal {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

.finale-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 87, 51, 0.25) 0%, transparent 70%);
  animation: glowPulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.finale-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-top: 1.5rem;
  opacity: 0;
  animation: titleFadeUp 0.6s var(--ease) 0.8s both;
  letter-spacing: -0.02em;
}

.finale-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.5rem;
  opacity: 0;
  animation: titleFadeUp 0.6s var(--ease) 1.1s both;
}

@keyframes titleFadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

.finale-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF5733, transparent);
  margin-top: 1.25rem;
  opacity: 0;
  animation: titleFadeUp 0.5s var(--ease) 1s both;
}

/* Confetti particles */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 100000;
  pointer-events: none;
}

@keyframes confettiFall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Checkmark animation for step completion */
.step-check-anim {
  animation: checkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes checkPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes login-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .container { padding: 1.25rem; }

  .auth-card {
    padding: 1.75rem;
    border-radius: var(--radius-xl);
  }

  .form-header h2 { font-size: 1.375rem; }

  .control input {
    padding: 0.75rem;
    font-size: 16px; /* prevent iOS zoom */
  }

  .btn-primary { min-height: 48px; }
  .contact-cta { margin-top: 1.25rem; padding-top: 1rem; }
  .geo-shape { display: none; }

  .modal-grid-2 { grid-template-columns: 1fr; }
  .pricing-plan-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0.75rem; padding-top: 1.5rem; }
  .auth-card { padding: 1.5rem; }
  .card-logo { height: 28px; }
  .form-header { margin-bottom: 1.5rem; }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus, a:focus { outline: none; }

*:focus-visible {
  outline: 2px solid var(--login-brand);
  outline-offset: 2px;
}

::selection {
  background: rgba(255, 87, 51, 0.3);
  color: #fff;
}

@media print {
  .hero-bg { display: none; }
  .auth-card { background: white; color: black; box-shadow: none; border: none; backdrop-filter: none; }
}
