/* ═══════════════════════════════════════════════════════════════════════════
   E-Rikshaw Finance PDF Generator — Premium Dark Theme UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
  --bg-dark:       #0a0b14;
  --bg-card:       #111220;
  --bg-input:      #191a2e;
  --bg-section:    #13142480;

  --border:        rgba(255,255,255,0.07);
  --border-focus:  rgba(99,102,241,0.6);

  --text-primary:  #f0f0ff;
  --text-secondary:#9194b3;
  --text-muted:    #555878;

  --accent-purple: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-blue:   #3b82f6;
  --accent-teal:   #14b8a6;
  --accent-green:  #10b981;
  --accent-orange: #f59e0b;
  --accent-amber:  #fbbf24;
  --accent-red:    #ef4444;
  --accent-indigo: #6366f1;

  --gradient-main: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --gradient-card: linear-gradient(145deg, #111220 0%, #0d0e1a 100%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px rgba(99,102,241,0.3);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background ambient glow */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(ellipse at center, rgba(139,92,246,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,11,20,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 40px; height: 40px; flex-shrink: 0; }
.brand-icon svg { width: 100%; height: 100%; }
.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.brand-tagline { font-size: 0.7rem; color: var(--text-muted); display: block; }

.live-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  color: #10b981;
  font-size: 0.72rem; font-weight: 600;
}
.live-dot {
  width: 7px; height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.page-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  position: relative; z-index: 1;
}
.hero-content { text-align: center; margin-bottom: 40px; }

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}
.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Steps bar */
.steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.step.active { color: var(--accent-purple); }
.step.completed { color: var(--accent-green); }
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  background: rgba(255,255,255,0.05);
  border: 2px solid currentColor;
  transition: all var(--transition);
}
.step.active .step-num {
  background: var(--gradient-main);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-glow);
}
.step.completed .step-num {
  background: rgba(16,185,129,0.15);
  border-color: var(--accent-green);
}
.step span:last-child { font-size: 0.75rem; font-weight: 600; }
.step-line {
  width: 80px; height: 2px;
  background: linear-gradient(to right, var(--border), var(--border));
  position: relative; margin-bottom: 22px;
}
@media (max-width: 500px) { .step-line { width: 40px; } }

/* ─── Form Container ─────────────────────────────────────────────────────── */
.form-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative; z-index: 1;
}

/* ─── Form Section ───────────────────────────────────────────────────────── */
.form-section {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-section:hover {
  border-color: rgba(99,102,241,0.2);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.05), var(--shadow-md);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.section-icon svg { width: 22px; height: 22px; }

/* Section icon color variants */
.section-icon.purple  { background: rgba(99,102,241,0.15);  color: #818cf8; }
.section-icon.blue    { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.section-icon.teal    { background: rgba(20,184,166,0.15);  color: #2dd4bf; }
.section-icon.orange  { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.section-icon.green   { background: rgba(16,185,129,0.15);  color: #34d399; }
.section-icon.indigo  { background: rgba(99,102,241,0.15);  color: #a5b4fc; }
.section-icon.amber   { background: rgba(251,191,36,0.15);  color: #fcd34d; }

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.section-desc { font-size: 0.8rem; color: var(--text-muted); }
.section-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: #fbbf24;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-top: 4px;
}
.note-icon { font-size: 1rem; }

/* ─── Form Grid ──────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ─── Field Group ────────────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.req { color: var(--accent-red); margin-left: 2px; }

/* Input base styles */
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}
textarea { resize: vertical; min-height: 70px; }
select { cursor: pointer; }

input::placeholder,
textarea::placeholder { color: var(--text-muted); }

input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-focus);
  background: rgba(25,26,46,0.9);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12), inset 0 1px 2px rgba(0,0,0,0.2);
}

/* Input with prefix (+91) */
.input-prefix {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-input);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-prefix:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.prefix {
  padding: 11px 12px;
  background: rgba(99,102,241,0.1);
  color: var(--accent-purple);
  font-size: 0.85rem;
  font-weight: 600;
  border-right: 1.5px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.input-prefix input {
  border: none; border-radius: 0;
  background: transparent;
  flex: 1;
  padding: 11px 14px;
}
.input-prefix input:focus { box-shadow: none; }

/* Currency input */
.input-currency {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-input);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-currency:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.currency-symbol {
  padding: 11px 12px;
  background: rgba(16,185,129,0.08);
  color: var(--accent-green);
  font-size: 1rem; font-weight: 700;
  border-right: 1.5px solid var(--border);
  flex-shrink: 0;
}
.input-currency input {
  border: none; border-radius: 0;
  background: transparent;
  flex: 1; padding: 11px 14px;
}
.input-currency input:focus { box-shadow: none; }

/* Select wrapper */
.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '▾';
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-size: 0.85rem;
}
.select-wrapper select { padding-right: 36px; }

/* Field errors */
.field-error {
  font-size: 0.75rem;
  color: var(--accent-red);
  display: none;
  align-items: center;
  gap: 4px;
  animation: fadeInDown 0.15s ease;
}
.field-error.visible { display: flex; }
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Customer Age auto-display field ────────────────────────────── */
.age-display {
  background: rgba(255,255,255,0.04) !important;
  color: var(--text-secondary) !important;
  cursor: default !important;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.age-display:focus { outline: none !important; box-shadow: none !important; border-color: rgba(255,255,255,0.1) !important; }

/* Age eligible — green tint */
.age-display.eligible {
  color: #4ade80 !important;
  border-color: rgba(74,222,128,0.4) !important;
}

/* Age ineligible — red border */
.age-display.ineligible {
  color: var(--accent-red) !important;
  border-color: var(--accent-red) !important;
  animation: pulseRed 1.5s ease infinite;
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50%       { box-shadow: 0 0 0 4px rgba(239,68,68,0.25); }
}

/* Age warning banner */
.age-warning {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.5);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
  animation: fadeInDown 0.2s ease;
}

/* Invalid field highlight */
.field-group.has-error input,
.field-group.has-error select,
.field-group.has-error textarea,
.field-group.has-error .input-prefix,
.field-group.has-error .input-currency {
  border-color: rgba(239,68,68,0.5);
}

/* ─── Radio Cards ────────────────────────────────────────────────────────── */
.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radio-card { cursor: pointer; }
.radio-card input[type="radio"] { display: none; }

.radio-label {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  user-select: none;
}
.radio-label:hover { border-color: rgba(99,102,241,0.3); color: var(--text-primary); }
.radio-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: transparent;
  border: 2px solid currentColor;
  transition: all var(--transition);
  flex-shrink: 0;
}
.radio-card input:checked + .radio-label {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.5);
  color: #a5b4fc;
}
.radio-card input:checked + .radio-label .radio-dot {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  box-shadow: 0 0 6px rgba(99,102,241,0.5);
}

/* ─── Toggle Cards (Battery Type) ───────────────────────────────────────── */
.toggle-group { display: flex; gap: 12px; }
.toggle-card { cursor: pointer; flex: 1; }
.toggle-card input[type="radio"] { display: none; }

.toggle-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 16px 20px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition);
}
.toggle-inner:hover { border-color: rgba(99,102,241,0.3); }
.toggle-icon { font-size: 1.5rem; }
.toggle-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.toggle-desc { font-size: 0.72rem; color: var(--text-muted); }

.toggle-card input:checked + .toggle-inner {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.5);
  box-shadow: var(--shadow-glow);
}
.toggle-card input:checked + .toggle-inner .toggle-name { color: #a5b4fc; }

/* ─── Battery Section Special Styling ───────────────────────────────────── */
.battery-section {
  background: linear-gradient(145deg, #111220 0%, #0e0f1c 100%);
  border-color: rgba(251,191,36,0.12);
  position: relative; overflow: hidden;
}
.battery-section::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(ellipse at top-right, rgba(251,191,36,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Two-column sections ───────────────────────────────────────────────── */
.two-col-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ─── Action Buttons ─────────────────────────────────────────────────────── */
.form-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 12px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
}
.btn:disabled {
  opacity: 0.65; cursor: not-allowed; pointer-events: none;
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  min-width: 180px;
  justify-content: center;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(99,102,241,0.55);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: white;
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.3s;
}
.btn:active::after { opacity: 0.05; }

.btn-reset {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-reset:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.btn-icon { font-size: 1.1rem; }
.btn-spinner { display: flex; align-items: center; justify-content: center; }
.btn-spinner svg { width: 18px; height: 18px; }
.spin { animation: spin 1s linear infinite; display: none; }
.loading .spin { display: block; }

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

.btn-download {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border: 1.5px solid rgba(99,102,241,0.3);
}
.btn-download:hover { background: rgba(99,102,241,0.25); }

.btn-print {
  background: rgba(59,130,246,0.12);
  color: #93c5fd;
  border: 1.5px solid rgba(59,130,246,0.25);
}
.btn-print:hover { background: rgba(59,130,246,0.22); }

.btn-outline {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

/* ─── Success Overlay ────────────────────────────────────────────────────── */
.success-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}
.success-overlay.visible { opacity: 1; pointer-events: all; }

.success-card {
  background: var(--bg-card);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), var(--shadow-glow);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.success-overlay.visible .success-card {
  transform: scale(1) translateY(0);
}

.success-icon-wrap {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 24px;
}
.success-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(99,102,241,0.1);
  animation: ringPulse 2s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.5; }
}
.checkmark { position: relative; width: 80px; height: 80px; }
.checkmark svg { width: 80px; height: 80px; }

.success-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  margin-bottom: 8px;
}
.success-msg { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 28px; }

.success-actions {
  display: flex; flex-direction: column; gap: 10px;
}

/* ─── Toast Notification ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  z-index: 999;
  opacity: 0;
  font-size: 0.88rem;
  min-width: 240px;
  max-width: 90vw;
  text-align: left;
}
.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.app-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .two-col-sections { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-hero { padding: 32px 16px 24px; }
  .form-container { padding: 0 16px 60px; }
  .form-section { padding: 24px 20px; }
  
  .col-4, .col-6, .col-8 { grid-column: span 12; }
  
  .toggle-group { flex-direction: column; }
  
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary { min-width: unset; }
  
  .success-card { padding: 32px 24px; }
  .success-actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .radio-group { flex-wrap: wrap; }
  .steps-bar { gap: 4px; }
  .step-line { width: 24px; }
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.5); }

/* ─── Utility Animations ─────────────────────────────────────────────────── */
.fade-in {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section entrance animation */
.form-section {
  animation: fadeIn 0.5s ease both;
}
.form-section:nth-child(2) { animation-delay: 0.05s; }
.form-section:nth-child(3) { animation-delay: 0.1s; }
.form-section:nth-child(4) { animation-delay: 0.15s; }
.form-section:nth-child(5) { animation-delay: 0.2s; }

/* Input focus micro-lift */
input:focus, textarea:focus, select:focus {
  transform: translateY(-1px);
}

/* Number input arrows style */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* ─── Footer Credit (Pending) ────────────────────────────────────────────── */
.app-footer { text-align: center; padding: 28px 24px 20px; }

.footer-credit {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.heart { animation: heartbeat 1.4s ease-in-out infinite; display: inline-block; }
@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  14%     { transform: scale(1.3); }
  28%     { transform: scale(1); }
  42%     { transform: scale(1.2); }
  56%     { transform: scale(1); }
}
.footer-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: #e1306c;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-link:hover { opacity: 0.8; }
.insta-icon {
  width: 15px; height: 15px; flex-shrink: 0;
  stroke: #e1306c;
  -webkit-text-fill-color: unset;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOCUMENT UPLOAD MODULE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Upload Section Wrapper ─────────────────────────────────────────────── */
.upload-section { border-color: rgba(20,184,166,0.15); }
.upload-section::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 250px; height: 250px;
  background: radial-gradient(ellipse at top-right, rgba(20,184,166,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Upload Sub-Group (Customer / Guarantor / Co-Borrower) ─────────────── */
.upload-group {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.upload-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.upload-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.upload-group-title::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}
.upload-group-badge {
  font-size: 0.65rem; font-weight: 600; padding: 2px 8px;
  border-radius: 99px; text-transform: uppercase; letter-spacing: 0.04em;
  flex-shrink: 0;
}
.badge-required { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.badge-optional { background: rgba(148,163,184,0.1); color: var(--text-muted); border: 1px solid var(--border); }

/* ─── Upload Sub-Section (Aadhaar / PAN) ────────────────────────────────── */
.doc-subsection { margin-bottom: 20px; }
.doc-subsection:last-child { margin-bottom: 0; }
.doc-subsection-title {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.doc-subsection-title svg { width: 14px; height: 14px; opacity: 0.7; }

/* ─── Upload Grid ────────────────────────────────────────────────────────── */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

/* ─── Upload Field ───────────────────────────────────────────────────────── */
.upload-field { display: flex; flex-direction: column; gap: 6px; }
.upload-label {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 5px;
  letter-spacing: 0.02em;
}

/* ─── Drop Zone ──────────────────────────────────────────────────────────── */
.drop-zone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  min-height: 120px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  overflow: hidden;
}
.drop-zone:hover {
  border-color: rgba(99,102,241,0.4);
  background: rgba(25,26,46,0.9);
}
.drop-zone.drag-over {
  border-color: var(--accent-purple);
  background: rgba(99,102,241,0.08);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.drop-zone.has-file {
  border-style: solid;
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.04);
}
.drop-zone.has-error {
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.04);
}

/* Hidden file input */
.drop-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
  transform: none;
  border: none; background: none; padding: 0;
  font-size: 0; /* hides native button text if any */
}
.drop-zone input[type="file"]:focus { box-shadow: none; }

/* Upload idle state */
.dz-idle { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dz-idle-icon {
  width: 36px; height: 36px;
  background: rgba(99,102,241,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-purple);
}
.dz-idle-icon svg { width: 18px; height: 18px; }
.dz-idle-text { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }
.dz-idle-sub  { font-size: 0.68rem; color: var(--text-muted); }

/* ─── Preview State ──────────────────────────────────────────────────────── */
.dz-preview {
  display: none;
  flex-direction: column; align-items: center;
  gap: 8px; width: 100%;
}
.drop-zone.has-file .dz-idle    { display: none; }
.drop-zone.has-file .dz-preview { display: flex; }

/* Image preview */
.dz-img-preview {
  width: 100%; max-height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: none;
}
.drop-zone.has-file.is-image .dz-img-preview { display: block; }

/* PDF preview */
.dz-pdf-icon {
  display: none;
  flex-direction: column; align-items: center; gap: 4px;
}
.drop-zone.has-file.is-pdf .dz-pdf-icon { display: flex; }
.dz-pdf-icon svg { width: 32px; height: 32px; color: #f87171; }

.dz-filename {
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-primary);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dz-filesize { font-size: 0.65rem; color: var(--text-muted); }

/* Action buttons inside preview */
.dz-actions {
  display: flex; gap: 6px;
  position: relative; z-index: 2;
}
.dz-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--transition);
  font-family: inherit;
}
.dz-btn-replace {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.25);
}
.dz-btn-replace:hover { background: rgba(99,102,241,0.25); }
.dz-btn-remove {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.dz-btn-remove:hover { background: rgba(239,68,68,0.2); }

/* ─── Upload Error Message ───────────────────────────────────────────────── */
.upload-error {
  font-size: 0.72rem; color: var(--accent-red);
  display: none; align-items: center; gap: 4px;
  animation: fadeInDown 0.15s ease;
}
.upload-error.visible { display: flex; }

/* ─── Responsive Upload ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .upload-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .upload-grid { grid-template-columns: 1fr; }
}
