/* ===========================
   R7 Academia — Design System
   Mobile-First Premium Design
   =========================== */

:root {
  /* Color Palette */
  --primary: #0583f2;
  --primary-light: #3ba3f4;
  --primary-dark: #0468c2;
  --primary-glow: rgba(5, 131, 242, 0.2);

  --bg: #0F1117;
  --bg-card: #1A1D27;
  --bg-card-hover: #22252F;
  --bg-surface: #15171F;
  --bg-elevated: #1E2130;

  --text: #F1F2F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(5, 131, 242, 0.3);

  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--primary-glow);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --transition-spring: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px;
}

/* ===========================
   Header
   =========================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-logo {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.header-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ===========================
   Pages & Navigation
   =========================== */
.page {
  display: none;
  min-height: calc(100vh - 60px);
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content {
  padding: var(--space-lg) var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-lg);
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: var(--space-sm) 0;
  padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.nav-btn.active {
  color: var(--primary);
}

.nav-icon {
  width: 24px;
  height: 24px;
}

/* ===========================
   Day Tabs (Grade)
   =========================== */
.day-tabs-wrapper {
  margin: 0 calc(-1 * var(--space-md));
  padding: 0 var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.day-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.day-tabs {
  display: flex;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  width: max-content;
}

.day-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.day-tab:active {
  transform: scale(0.95);
}

.day-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ===========================
   Modality Filter
   =========================== */
.filter-row {
  margin: var(--space-md) 0;
}

.filter-select-wrapper {
  position: relative;
}

.filter-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-select-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

/* ===========================
   Class Cards
   =========================== */
.class-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.class-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: var(--space-lg);
  transition: all var(--transition);
  animation: cardIn 0.3s ease both;
}

.class-card:active {
  transform: scale(0.98);
  background: var(--bg-card-hover);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
}

.class-card-info {
  flex: 1;
}

.class-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.class-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(5, 131, 242, 0.08);
  color: var(--primary-light);
  font-size: 0.825rem;
  font-weight: 600;
}

.class-time::before {
  content: '🕐';
  font-size: 0.75rem;
}

.class-select-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  -webkit-tap-highlight-color: transparent;
}

.class-select-btn:active {
  background: var(--primary);
  color: white;
  transform: scale(0.95);
}

.class-select-btn.selected {
  background: var(--primary);
  color: white;
}

/* Loading Skeleton */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.skeleton-card {
  height: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

/* ===========================
   Simulator Sections
   =========================== */
.sim-section {
  margin-bottom: var(--space-xl);
}

.sim-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Plan Type Grid */
.plan-type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.plan-type-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

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

.plan-type-btn.active {
  border-color: var(--primary);
  background: rgba(5, 131, 242, 0.06);
  box-shadow: var(--shadow-glow);
}

.plan-type-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.plan-type-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.plan-type-btn.active .plan-type-label {
  color: var(--primary-light);
}

/* Full Plan Card */
.full-plan-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(5, 131, 242, 0.08), rgba(5, 131, 242, 0.02));
  border: 1.5px solid rgba(5, 131, 242, 0.15);
  margin-bottom: var(--space-lg);
  transition: all var(--transition);
}

.full-plan-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(5, 131, 242, 0.15), rgba(5, 131, 242, 0.05));
  box-shadow: var(--shadow-glow);
}

.full-plan-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  min-width: 200px;
}

.full-plan-icon {
  font-size: 1.5rem;
}

.full-plan-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.full-plan-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.full-plan-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  width: 100%;
  text-align: right;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-spring);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(24px);
  background: white;
}

/* Modalities Container */
.modalities-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.modality-group {
  animation: fadeIn 0.3s ease;
}

.modality-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.modality-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.modality-item:active {
  transform: scale(0.98);
}

.modality-item.selected {
  border-color: var(--success);
  background: var(--success-bg);
}

.modality-item-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.modality-checkbox {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.modality-item.selected .modality-checkbox {
  border-color: var(--success);
  background: var(--success);
}

.modality-item.selected .modality-checkbox::after {
  content: '✓';
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.modality-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.modality-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.modality-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-light);
  white-space: nowrap;
}

/* Disabled modalities when Full Plan is active */
.modalities-container.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Frequency Selectors */
.frequency-item {
  margin-bottom: var(--space-lg);
  animation: fadeIn 0.3s ease;
}

.frequency-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.frequency-grid {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.freq-btn {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.freq-btn:active {
  transform: scale(0.95);
}

.freq-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ===========================
   Result Section
   =========================== */
.result-section {
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
}

.result-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.result-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  font-size: 0.875rem;
}

.result-line-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.result-line-value {
  font-weight: 700;
  color: var(--text);
}

.result-line.combo {
  color: var(--text-muted);
  font-size: 0.825rem;
}

.result-line.combo .result-line-value {
  color: var(--text-secondary);
}

.result-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  margin-top: var(--space-sm);
  border-top: 2px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}

.result-total-value {
  font-size: 1.75rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pricePulse 0.4s ease;
}

@keyframes pricePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.result-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
}

/* CTA Button */
.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  border: none;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  margin-top: var(--space-lg);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.cta-button:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
}

.cta-icon {
  font-size: 1.2rem;
}

/* ===========================
   Responsive (Tablet+)
   =========================== */
@media (min-width: 480px) {
  .plan-type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .page-content {
    padding: var(--space-xl) var(--space-lg);
  }

  .page-title {
    font-size: 2rem;
  }

  .class-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}

/* ===========================
   Selection Counter Badge
   =========================== */
.selection-badge {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  font-size: 0.825rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  z-index: 150;
  pointer-events: none;
  transition: transform var(--transition-spring);
}

.selection-badge.visible {
  transform: translateX(-50%) translateY(0);
}

/* ===========================
   Lead Form (Cadastro)
   =========================== */
.form-intro {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.lead-form-group {
  margin-bottom: var(--space-md);
  position: relative;
}

.lead-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.lead-label-note {
  font-size: 0.7rem !important;
  color: var(--text-muted) !important;
  font-weight: 400 !important;
  margin-bottom: 8px !important;
}

.lead-form-group input[type="text"],
.lead-form-group input[type="email"],
.lead-form-group input[type="tel"],
.lead-form-group input[type="date"],
.lead-form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  transition: all var(--transition);
  outline: none;
}

.lead-form-group input::placeholder {
  color: var(--text-muted);
}

.lead-form-group input:focus,
.lead-form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.lead-form-group input.invalid,
.lead-form-group select.invalid {
  border-color: var(--danger);
}

.lead-form-group select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.lead-form-group select option {
  background: var(--bg-card);
  color: var(--text);
}

.lead-error-msg {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 4px;
  display: none;
}

.lead-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-sm);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.lead-submit-btn:hover {
  box-shadow: 0 6px 24px var(--primary-glow);
  transform: translateY(-1px);
}

.lead-submit-btn:active {
  transform: scale(0.97);
}

.lead-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.lead-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

.lead-global-error {
  color: var(--danger);
  font-size: 0.8rem;
  text-align: center;
  margin-top: var(--space-md);
}

/* Form Success Message */
.form-success {
  text-align: center;
  padding: var(--space-xl) 0;
  animation: fadeIn 0.4s ease;
}

.form-success-icon {
  width: 60px;
  height: 60px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto var(--space-lg) auto;
}

.form-success h2 {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.form-success p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hidden {
  display: none !important;
}

/* ===========================
   Modal Overlay
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-container {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-xl);
  position: relative;
  animation: modalSlideUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 1;
}

.modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.modal-header {
  margin-bottom: var(--space-lg);
  padding-right: 40px;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Lead form responsive */
@media (max-width: 480px) {
  .lead-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal-container {
    padding: var(--space-lg);
    max-height: 85vh;
  }
}