:root {
  --primary-blue: #0450D9;
  --deep-blue: #003AB1;
  --primary-pink: #F41C83;
  --deep-pink: #D80473;
  --light-blue: #EAF2FF;
  --light-pink: #FEECF6;
  --bg-main: #F8FAFC;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --success: #16A34A;
  --warning: #F59E0B;
  --error: #DC2626;
  --brand-gradient: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
}

* { -webkit-tap-highlight-color: transparent; }

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.brand-gradient { background: var(--brand-gradient); }
.brand-gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-primary-blue { color: var(--primary-blue); }
.text-primary-pink { color: var(--primary-pink); }
.bg-light-blue { background: var(--light-blue); }
.bg-light-pink { background: var(--light-pink); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-gray  { background: #F1F5F9; color: #475569; }
.badge-blue  { background: var(--light-blue); color: var(--primary-blue); }
.badge-pink  { background: var(--light-pink); color: var(--primary-pink); }
.badge-green { background: #DCFCE7; color: var(--success); }
.badge-amber { background: #FEF3C7; color: #B45309; }
.badge-red   { background: #FEE2E2; color: var(--error); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid #EEF2F7;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(4,80,217,0.12);
  border-color: #DBEAFE;
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-radius: 12px; transition: transform .15s ease, box-shadow .15s ease, background .2s ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 8px 20px rgba(4,80,217,0.25); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(216,4,115,0.3); }
.btn-outline { border: 1.5px solid #E2E8F0; color: var(--text-primary); background: #fff; }
.btn-outline:hover { border-color: var(--primary-blue); color: var(--primary-blue); }
.btn-ghost { color: var(--text-secondary); }
.btn-ghost:hover { color: var(--primary-blue); }

/* ---------- Inputs ---------- */
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid #E2E8F0; border-radius: 12px; padding: 12px 14px;
  font-size: 16px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 4px rgba(4,80,217,0.12);
}
label.form-label { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; display: block; }
.help-text { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- Animations ---------- */
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes floatY2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes glow { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes popIn { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes countUpFade { from { opacity: 0; } to { opacity: 1; } }

.animate-fade-up { animation: fadeSlideUp .7s cubic-bezier(.16,1,.3,1) both; }
.animate-fade-in { animation: fadeIn .6s ease both; }
.animate-float { animation: floatY 5s ease-in-out infinite; }
.animate-float-slow { animation: floatY2 7s ease-in-out infinite; }
.animate-glow { animation: glow 3s ease-in-out infinite; }
.animate-pop { animation: popIn .4s cubic-bezier(.34,1.56,.64,1) both; }

.stagger > * { opacity: 0; animation: fadeSlideUp .6s cubic-bezier(.16,1,.3,1) forwards; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .19s; }
.stagger > *:nth-child(4) { animation-delay: .26s; }
.stagger > *:nth-child(5) { animation-delay: .33s; }
.stagger > *:nth-child(6) { animation-delay: .4s; }
.stagger > *:nth-child(n+7) { animation-delay: .46s; }

.skeleton { background: linear-gradient(90deg, #EEF2F7 25%, #F8FAFC 37%, #EEF2F7 63%); background-size: 400px 100%; animation: shimmer 1.4s ease infinite; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Progress Stepper ---------- */
.stepper { display: flex; align-items: center; }
.stepper .step-dot {
  width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: #F1F5F9; color: var(--text-secondary); border: 2px solid #F1F5F9;
  transition: all .3s ease; flex-shrink: 0;
}
.stepper .step-dot.active { background: var(--brand-gradient); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(4,80,217,.35); }
.stepper .step-dot.done { background: var(--success); color: #fff; border-color: transparent; }
.stepper .step-line { flex: 1; height: 3px; background: #F1F5F9; margin: 0 6px; border-radius: 2px; overflow: hidden; }
.stepper .step-line-fill { height: 100%; background: var(--brand-gradient); width: 0%; transition: width .4s ease; }

/* ---------- Timeline ---------- */
.timeline-item { position: relative; padding-left: 32px; padding-bottom: 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: 8px; top: 22px; bottom: 0; width: 2px; background: #E2E8F0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 999px; background: #E2E8F0; }
.timeline-item.done .timeline-dot { background: var(--success); }
.timeline-item.current .timeline-dot { background: var(--primary-pink); box-shadow: 0 0 0 5px rgba(244,28,131,0.18); }

/* ---------- FAQ Accordion ---------- */
.faq-item .faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-item .faq-chevron { transition: transform .3s ease; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* ---------- Toast ---------- */
#toast-container { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast { background: #0F172A; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: popIn .3s ease both; }

/* Scrollbar for admin tables */
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 8px; }

/* Bottom mobile nav */
.mobile-nav-item.active { color: var(--primary-blue); }
