@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
  --green:        #6a994e;
  --green-deep:   #386641;
  --green-light:  #a7c957;
  --ink:         #1A1209;
  --ink-soft:    #2D2410;
  --cream:       #FDF6E8;
  --cream-dark:  #F5EDD6;
  --teal:        #0D7377;
  --teal-light:  #14A5A9;
  --rose:        #E84855;
  --rose-light:  #FF6B6B;
  --purple:      #7B4FBF;
  --white:       #FFFFFF;
  --gray-100:    #F8F4EC;
  --gray-200:    #EDE5D0;
  --gray-400:    #A89870;
  --gray-600:    #6B5A3A;
  --shadow-sm:   0 2px 8px rgba(26,18,9,0.08);
  --shadow-md:   0 8px 32px rgba(26,18,9,0.12);
  --shadow-lg:   0 24px 64px rgba(26,18,9,0.18);
  --radius:      16px;
  --radius-sm:   8px;
  --radius-lg:   24px;
  --radius-xl:   40px;
}

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

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

body {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  direction: rtl;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── GEOMETRIC PATTERN BACKGROUND ── */
.geo-bg {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(245,166,35,0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(13,115,119,0.06) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23F5A623' stroke-width='0.4' opacity='0.18'%3E%3Cpolygon points='40,5 75,22 75,58 40,75 5,58 5,22'/%3E%3Cpolygon points='40,18 62,28 62,52 40,62 18,52 18,28'/%3E%3Cline x1='40' y1='5' x2='40' y2='75'/%3E%3Cline x1='5' y1='22' x2='75' y2='58'/%3E%3Cline x1='75' y1='22' x2='5' y2='58'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── NAVIGATION ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 5%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(253,246,232,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(245,166,35,0.2);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 42px;
  height: 42px;
  background: var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.nav-logo-mark::before {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  border: 3px solid var(--green);
  border-radius: 50%;
  transform: rotate(45deg);
}

.nav-logo-mark::after {
  content: 'ب';
  color: var(--green);
  font-family: 'Cairo', sans-serif;
  font-size: 18px;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.nav-logo-text {
  font-family: 'Cairo', sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.nav-logo-text span {
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-600);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; right: 0;
  width: 0; height: 2px;
  background: var(--green);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--ink);
  color: var(--green) !important;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,18,9,0.25);
  color: var(--green) !important;
}

.nav-cta::after { display: none !important; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding-top: 72px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  color: var(--green-deep);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--green-deep);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
  animation: fadeInDown 0.7s ease;
}

.hero-title .highlight {
  color: var(--green);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px; right: 0; left: 0;
  height: 8px;
  background: var(--green-light);
  border-radius: 4px;
  z-index: -1;
  transform: scaleX(0.9);
}

.hero-slogan {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 16px;
  animation: fadeInDown 0.75s ease;
  font-family: 'Cairo', sans-serif;
}

.hero-desc {
  font-size: 17px;
  color: var(--gray-600);
  margin-bottom: 40px;
  max-width: 460px;
  animation: fadeInDown 0.8s ease;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInDown 0.9s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--green);
  box-shadow: 0 4px 20px rgba(26,18,9,0.2);
}

.btn-primary:hover {
  background: var(--green);
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(245,166,35,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--gray-200);
}

.btn-outline:hover {
  border-color: var(--green);
  color: var(--green-deep);
  transform: translateY(-3px);
}

.btn-teal {
  background: var(--teal);
  color: white;
}

.btn-teal:hover {
  background: var(--teal-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(13,115,119,0.3);
}

/* Hero visual */
.hero-visual {
  position: relative;
  animation: fadeInUp 0.9s ease;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 440px;
  margin: 0 auto;
}

.code-window {
  background: var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
  position: relative;
}

.code-window-bar {
  background: rgba(255,255,255,0.06);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red   { background: #FF5F57; }
.code-dot.yellow { background: #FFBD2E; }
.code-dot.green  { background: #28CA42; }

.code-body {
  padding: 20px 24px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  direction: ltr;
  text-align: left;
  line-height: 1.8;
}

.code-line { display: block; }
.code-kw  { color: #C792EA; }
.code-fn  { color: #82AAFF; }
.code-str { color: #C3E88D; }
.code-num { color: #F78C6C; }
.code-cmt { color: #546E7A; font-style: italic; }

.hero-float-card {
  position: absolute;
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}

.hero-float-card.card-1 {
  bottom: -20px;
  right: -20px;
  animation-delay: 0s;
  color: var(--teal);
}

.hero-float-card.card-2 {
  top: 10px;
  right: -30px;
  animation-delay: 1.5s;
  color: var(--purple);
  font-size: 13px;
}

.float-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.float-icon.teal-bg { background: rgba(13,115,119,0.1); }
.float-icon.purple-bg { background: rgba(123,79,191,0.1); }
.float-icon.gold-bg  { background: rgba(245,166,35,0.15); }

/* ── SECTIONS SHARED ── */
section { padding: 100px 5%; }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 17px;
  color: var(--gray-600);
  max-width: 560px;
  line-height: 1.8;
}

/* ── STATS STRIP ── */
.stats-strip {
  background: var(--ink);
  padding: 40px 5%;
  overflow: hidden;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-item {
  background: var(--ink);
  padding: 36px 32px;
  text-align: center;
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: rgba(255,255,255,0.1);
}

.stat-item:first-child::after { display: none; }

.stat-number {
  font-family: 'Cairo', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

/* ── FEATURES ── */
.features { background: var(--cream); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--gray-200);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  border-radius: 0 0 0 120px;
  opacity: 0.06;
}

.feature-card.gold::before  { background: var(--green); }
.feature-card.teal::before  { background: var(--teal); }
.feature-card.rose::before  { background: var(--rose); }
.feature-card.purple::before { background: var(--purple); }
.feature-card.ink::before   { background: var(--ink); }
.feature-card.green::before { background: #2ECC71; }

.feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-icon.gold   { background: rgba(245,166,35,0.12);  }
.feature-icon.teal   { background: rgba(13,115,119,0.1);   }
.feature-icon.rose   { background: rgba(232,72,85,0.1);    }
.feature-icon.purple { background: rgba(123,79,191,0.1);   }
.feature-icon.ink    { background: rgba(26,18,9,0.06);     }
.feature-icon.green  { background: rgba(46,204,113,0.1);   }

.feature-title {
  font-family: 'Cairo', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.feature-text {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.8;
}

/* ── TRACKS / CURRICULUM ── */
.tracks { background: var(--cream-dark); }

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.track-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  gap: 24px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.track-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(245,166,35,0.08);
  transform: translateX(-4px);
}

.track-age-badge {
  flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.track-age-badge .age-num {
  font-family: 'Cairo', sans-serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.track-age-badge .age-label {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
}

.track-info { flex: 1; }

.track-name {
  font-family: 'Cairo', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.track-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 12px;
}

.track-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

/* ── HOW IT WORKS ── */
.how { background: var(--cream); }

.steps-row {
  display: flex;
  gap: 0;
  margin-top: 60px;
  position: relative;
}

.steps-row::before {
  content: '';
  position: absolute;
  top: 36px;
  right: 18%;
  left: 18%;
  height: 2px;
  background: repeating-linear-gradient(
    to left,
    var(--green) 0, var(--green) 8px,
    transparent 8px, transparent 16px
  );
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 16px;
  position: relative;
}

.step-num {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--green);
  font-family: 'Cairo', sans-serif;
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.step:hover .step-num {
  transform: scale(1.1) rotate(5deg);
}

.step-title {
  font-family: 'Cairo', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.step-text {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ── TESTIMONIALS ── */
.testimonials { background: var(--ink); }

.testimonials .section-title { color: white; }
.testimonials .section-label { color: var(--green); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: background 0.3s;
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.08);
}

.testi-stars {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--green);
}

.testi-text {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin-bottom: 24px;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testi-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.testi-name {
  font-weight: 700;
  color: white;
  font-size: 15px;
}

.testi-role {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ── REGISTRATION CTA ── */
.reg-cta {
  background: var(--green);
  position: relative;
  overflow: hidden;
}

.reg-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%231A1209' stroke-width='0.5' opacity='0.1'%3E%3Cpolygon points='30,3 57,16 57,44 30,57 3,44 3,16'/%3E%3C/g%3E%3C/svg%3E");
}

.reg-cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.reg-cta .section-label { color: var(--ink); opacity: 0.7; }
.reg-cta .section-title { color: var(--ink); }

.reg-cta .section-desc {
  color: var(--ink);
  opacity: 0.75;
  margin: 0 auto 36px;
}

.reg-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--green);
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 24px;
}

/* ── FOOTER ── */
footer {
  background: var(--ink-soft);
  color: rgba(255,255,255,0.5);
  padding: 60px 5% 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 16px;
  max-width: 280px;
}

.footer-col-title {
  color: white;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--green); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.footer-bottom a { color: var(--green); }

/* ── AUTH PAGE ── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-visual {
  background: var(--ink);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cg fill='none' stroke='%23F5A623' stroke-width='0.5' opacity='0.15'%3E%3Cpolygon points='50,5 95,27 95,73 50,95 5,73 5,27'/%3E%3Cpolygon points='50,20 80,35 80,65 50,80 20,65 20,35'/%3E%3Cpolygon points='50,35 65,42 65,58 50,65 35,58 35,42'/%3E%3C/g%3E%3C/svg%3E");
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.auth-visual-logo {
  font-family: 'Cairo', sans-serif;
  font-size: 52px;
  font-weight: 900;
  color: var(--green);
  margin-bottom: 16px;
}

.auth-visual-slogan {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 12px;
  font-family: 'Cairo', sans-serif;
}

.auth-visual-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
}

.auth-visual-deco {
  margin: 36px auto;
  width: 80px;
  height: 3px;
  background: linear-gradient(to left, var(--green), transparent);
  border-radius: 4px;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 5%;
  background: var(--cream);
  overflow-y: auto;
}

.auth-form-box {
  width: 100%;
  max-width: 460px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-200);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 32px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: calc(var(--radius) - 4px);
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  background: transparent;
}

.auth-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.auth-title {
  font-family: 'Cairo', sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.7;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: 'Tajawal', sans-serif;
  color: var(--ink);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  direction: rtl;
}

.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(245,166,35,0.1);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-control.error {
  border-color: var(--rose);
}

.form-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 6px;
}

.form-error {
  font-size: 12px;
  color: var(--rose);
  margin-top: 6px;
  display: none;
}

.form-error.show { display: block; }

.role-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.role-option {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-option:hover {
  border-color: var(--green-light);
}

.role-option.selected {
  border-color: var(--green);
  background: rgba(245,166,35,0.05);
}

.role-option input { display: none; }

.role-icon { font-size: 24px; margin-bottom: 6px; }

.role-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.btn-auth {
  width: 100%;
  padding: 16px;
  background: var(--ink);
  color: var(--green);
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 800;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 8px;
}

.btn-auth:hover {
  background: var(--green);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,166,35,0.35);
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-divider {
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--gray-200);
}

.auth-divider::before { right: 0; }
.auth-divider::after  { left: 0; }

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--gray-600);
  margin-top: 16px;
}

.auth-switch a {
  color: var(--green-deep);
  font-weight: 700;
  cursor: pointer;
}

.auth-switch a:hover { text-decoration: underline; }

/* Alert */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  display: none;
}

.alert.show { display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(46,204,113,0.1); color: #1A6B3C; border: 1px solid rgba(46,204,113,0.3); }
.alert-error   { background: rgba(232,72,85,0.1);  color: #8B1A22; border: 1px solid rgba(232,72,85,0.3); }
.alert-warning { background: rgba(245,166,35,0.12); color: var(--green-deep); border: 1px solid rgba(245,166,35,0.3); }
.alert-info    { background: rgba(13,115,119,0.08); color: var(--teal); border: 1px solid rgba(13,115,119,0.2); }

/* ── DASHBOARD ── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--ink);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: 'Cairo', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--green);
}

.sidebar-user {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(245,166,35,0.15);
  border: 2px solid rgba(245,166,35,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }
.sidebar-user-name { color: white; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,0.4); font-size: 12px; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 16px 12px 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 2px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: right;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}

.sidebar-item.active {
  background: rgba(245,166,35,0.12);
  color: var(--green);
}

.sidebar-item .item-icon { font-size: 16px; flex-shrink: 0; }
.sidebar-item .item-badge {
  margin-right: auto;
  margin-left: 0;
  background: var(--rose);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 100px;
}

.sidebar-bottom {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* Dashboard main */
.dash-main {
  background: var(--gray-100);
  overflow-y: auto;
  min-height: 100vh;
}

.dash-topbar {
  background: white;
  padding: 20px 32px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-topbar-title {
  font-family: 'Cairo', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-content {
  padding: 32px;
}

/* Dashboard cards */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.dash-stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dash-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.dash-stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.dash-stat-value {
  font-family: 'Cairo', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}

.dash-stat-label {
  font-size: 13px;
  color: var(--gray-600);
}

.dash-stat-trend {
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.dash-stat-trend.up   { color: #2ECC71; }
.dash-stat-trend.down { color: var(--rose); }

/* Panel */
.dash-panel {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 24px;
}

.dash-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-panel-title {
  font-family: 'Cairo', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.dash-panel-body { padding: 24px; }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 12px 16px;
  text-align: right;
  font-weight: 700;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--ink);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--gray-100); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge.active   { background: rgba(46,204,113,0.1);  color: #1A6B3C; }
.status-badge.pending  { background: rgba(245,166,35,0.12); color: var(--green-deep); }
.status-badge.inactive { background: rgba(232,72,85,0.1);   color: #8B1A22; }
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Progress */
.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(to left, var(--green), var(--green-deep));
  transition: width 1s ease;
}

/* Toggle / Switch */
.toggle-switch {
  position: relative;
  width: 48px; height: 26px;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-200);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  top: 3px; right: 3px;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

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

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

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,18,9,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  transform: translateY(20px);
  transition: transform 0.3s;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-family: 'Cairo', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.modal-close {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: var(--gray-200); }

/* ── LOADING SPINNER ── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.btn-loading {
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

/* ── UTILS ── */
.text-gold   { color: var(--green); }
.text-teal   { color: var(--teal); }
.text-muted  { color: var(--gray-600); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }

/* ── ANIMATIONS ── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

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

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.fade-in { animation: fadeInUp 0.5s ease forwards; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .nav-links { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .tracks-grid { grid-template-columns: 1fr; }
  .steps-row { flex-direction: column; gap: 32px; }
  .steps-row::before { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-content { padding: 20px 16px; }
}
