/* SIDO Energy — Portal design system */

:root {
  --forest: #1b3022;
  --forest-mid: #2a4530;
  --forest-light: #3d5c45;
  --lime: #a4c639;
  --lime-light: #c5db72;
  --lime-dark: #7a9a28;
  --lime-soft: rgba(164, 198, 57, 0.14);
  --lime-glow: rgba(164, 198, 57, 0.28);
  --orange: #f58220;
  --orange-dark: #d96a10;
  --orange-soft: rgba(245, 130, 32, 0.12);
  --gold: #ffd700;
  --gold-soft: rgba(255, 215, 0, 0.18);
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.1);
  --ok: #6b9e1e;
  --ok-soft: rgba(107, 158, 30, 0.12);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.12);

  --bg: #f3f6f0;
  --bg-subtle: #e8efe3;
  --bg-elevated: #ffffff;
  --sidebar: #1b3022;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(164, 198, 57, 0.18);
  --card: #ffffff;
  --card-hover: #fafcf8;
  --text: #1b3022;
  --text-on-dark: #f8faf6;
  --muted: #5c6f62;
  --muted-on-dark: rgba(248, 250, 246, 0.65);
  --border: rgba(27, 48, 34, 0.1);
  --border-strong: rgba(27, 48, 34, 0.18);
  --border-on-dark: rgba(255, 255, 255, 0.1);

  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(27, 48, 34, 0.06);
  --shadow: 0 4px 20px rgba(27, 48, 34, 0.08);
  --shadow-lg: 0 12px 40px rgba(27, 48, 34, 0.12);
  --sidebar-width: 268px;
  --topbar-height: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lime-dark); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--orange); }

/* ── App shell ───────────────────────────────────────────── */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--forest) 0%, #152820 100%);
  border-right: 1px solid var(--border-on-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border-on-dark);
}

.sidebar-brand a {
  display: block;
  color: var(--text-on-dark);
}

.sidebar-brand a:hover { opacity: 0.92; text-decoration: none; }

.sido-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.sido-logo-sidebar {
  height: 68px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 6px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.sido-logo-auth {
  height: 88px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  box-shadow: var(--shadow-lg);
}

.sido-logo-mobile {
  height: 36px;
  background: #fff;
  border-radius: 8px;
  padding: 3px 8px;
  box-shadow: var(--shadow-sm);
}

.topbar-logo { display: flex; align-items: center; }

.sidebar-nav {
  flex: 1;
  padding: 20px 14px;
  overflow-y: auto;
}

.nav-section { margin-bottom: 24px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-on-dark);
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--muted-on-dark);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  margin-bottom: 3px;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--text-on-dark);
  text-decoration: none;
}

.nav-link.active {
  background: var(--sidebar-active);
  color: var(--lime-light);
  box-shadow: inset 3px 0 0 var(--lime);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.sidebar-contact {
  padding: 16px 20px;
  border-top: 1px solid var(--border-on-dark);
  font-size: 12px;
  color: var(--muted-on-dark);
  line-height: 1.6;
}

.sidebar-contact strong {
  display: block;
  color: var(--text-on-dark);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.sidebar-contact a {
  color: var(--lime-light);
  word-break: break-all;
}

.sidebar-contact a:hover { color: var(--gold); }

.sidebar-user {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border-on-dark);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-on-dark);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange) 0%, var(--lime) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245, 130, 32, 0.35);
}

.user-info { min-width: 0; flex: 1; }

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-on-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--muted-on-dark);
  text-transform: capitalize;
  margin-top: 1px;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  height: var(--topbar-height);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: -0.01em;
}

.topbar-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

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

.topbar-mobile {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-on-dark);
  background: var(--forest);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius);
  color: var(--text-on-dark);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.menu-btn:hover { background: rgba(255, 255, 255, 0.14); }

.content {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 1280px;
  width: 100%;
}

/* ── Auth shell ──────────────────────────────────────────── */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background:
    linear-gradient(160deg, var(--forest-mid) 0%, var(--forest) 45%, #0f1a14 100%);
  color: var(--text-on-dark);
  overflow: hidden;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(164, 198, 57, 0.2), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(245, 130, 32, 0.15), transparent);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 380px;
}

.auth-brand-inner .sido-logo-auth { margin-bottom: 20px; }

.auth-brand-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.auth-brand-tagline {
  font-size: 14px;
  color: var(--lime-light);
  font-weight: 600;
  margin: 0 0 6px;
}

.auth-brand-slogan {
  font-size: 13px;
  color: var(--muted-on-dark);
  font-style: italic;
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.auth-brand-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 13px;
  color: rgba(248, 250, 246, 0.85);
  border-bottom: 1px solid var(--border-on-dark);
}

.auth-brand-features li:last-child { border-bottom: none; }

.auth-brand-features li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(164, 198, 57, 0.5);
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
}

.auth-wrap {
  width: 100%;
  max-width: 480px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 24px;
  transition: color 0.15s;
}

.auth-back-link:hover { color: var(--orange); }

.auth-header-mobile {
  display: none;
  text-align: center;
  margin-bottom: 28px;
}

.school-slogan {
  margin: 10px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

/* ── Page header ─────────────────────────────────────────── */

.page-header { margin-bottom: 28px; }

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--forest);
}

.page-header p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  max-width: 640px;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  align-items: center;
}

/* ── Cards ───────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover { box-shadow: var(--shadow); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--forest);
}

.card-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

/* ── Stat cards ────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--lime-soft); color: var(--lime-dark); }
.stat-icon.green { background: var(--ok-soft); color: var(--ok); }
.stat-icon.purple { background: var(--orange-soft); color: var(--orange); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--forest);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}

/* ── Grid layouts ──────────────────────────────────────────── */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Typography ───────────────────────────────────────────── */

h1 { font-size: 24px; margin: 0 0 14px; font-weight: 800; color: var(--forest); }
h2 { font-size: 16px; margin: 0 0 12px; color: var(--forest); font-weight: 700; }

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ── Forms ─────────────────────────────────────────────────── */

label {
  display: block;
  margin: 16px 0 7px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
}

label:first-child { margin-top: 0; }

textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 88px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-glow);
}

input, select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-glow);
}

input::placeholder { color: rgba(92, 111, 98, 0.45); }

.form-card { max-width: 720px; }

/* ── File upload ───────────────────────────────────────────── */

.file-upload { position: relative; }

.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--lime-dark);
}

.file-upload:hover .file-upload-label,
.file-upload input:focus + .file-upload-label {
  border-color: var(--lime);
  background: var(--lime-soft);
}

.file-upload-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--forest);
}

.file-upload-hint { font-size: 12px; color: var(--muted); }

.file-selected { margin-top: 10px; }

/* ── Enroll page ───────────────────────────────────────────── */

.enroll-page { margin: 0; }

.enroll-hero {
  position: relative;
  background:
    linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 55%, #1e3a28 100%);
  border-radius: var(--radius-xl);
  padding: 28px 32px 24px;
  margin-bottom: 28px;
  color: var(--text-on-dark);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.enroll-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -8%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--lime-glow) 0%, transparent 70%);
  pointer-events: none;
}

.enroll-hero::after {
  content: "";
  position: absolute;
  bottom: -60%;
  left: 20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 130, 32, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.enroll-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-on-dark);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  transition: color 0.15s;
}

.enroll-back:hover { color: var(--lime-light); text-decoration: none; }

.enroll-hero-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.enroll-hero-main { flex: 1; min-width: 260px; }

.enroll-hero-title {
  margin: 12px 0 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #fff;
}

.enroll-hero-subtitle {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-on-dark);
  max-width: 520px;
}

.enroll-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.enroll-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 600;
  color: rgba(248, 250, 246, 0.85);
}

.enroll-hero-price-card {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  min-width: 180px;
  backdrop-filter: blur(8px);
}

.enroll-hero-price-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-on-dark);
  margin-bottom: 4px;
}

.enroll-hero-price {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1.1;
}

.enroll-hero-price-note {
  font-size: 11px;
  color: var(--muted-on-dark);
  margin-top: 4px;
}

.enroll-hero-price-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.enroll-hero-price-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--lime-light);
  line-height: 1;
}

.enroll-hero-price-stat-label {
  font-size: 11px;
  color: var(--muted-on-dark);
  margin-top: 2px;
}

.enroll-steps {
  display: flex;
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  position: relative;
  z-index: 1;
}

.enroll-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  text-align: center;
}

.enroll-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.enroll-step-active:not(:last-child)::after {
  background: linear-gradient(90deg, var(--lime), rgba(164, 198, 57, 0.3));
}

.enroll-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: var(--muted-on-dark);
  position: relative;
  z-index: 1;
}

.enroll-step-active .enroll-step-num {
  background: var(--lime);
  border-color: var(--lime-light);
  color: var(--forest);
}

.enroll-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-on-dark);
  max-width: 90px;
  line-height: 1.3;
}

.enroll-step-active .enroll-step-label { color: rgba(248, 250, 246, 0.9); }

.enroll-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.enroll-section { padding: 22px 24px; }

.enroll-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.enroll-section-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lime-soft);
  color: var(--lime-dark);
  flex-shrink: 0;
}

.enroll-section-icon-audience {
  background: var(--orange-soft);
  color: var(--orange);
}

.enroll-section-icon-topics {
  background: var(--gold-soft);
  color: #92680a;
}

.enroll-section-icon-outcomes {
  background: var(--ok-soft);
  color: var(--ok);
}

.enroll-section-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--forest);
  letter-spacing: -0.02em;
}

.enroll-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.enroll-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.enroll-checklist li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

.enroll-checklist li:last-child { border-bottom: none; }

.enroll-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--lime-soft);
  border: 1.5px solid rgba(164, 198, 57, 0.35);
}

.enroll-checklist li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--lime-dark);
  border-bottom: 2px solid var(--lime-dark);
  transform: rotate(-45deg);
}

.enroll-checkout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.enroll-checkout-card {
  position: sticky;
  top: calc(var(--topbar-height) + 24px);
  padding: 0;
  overflow: hidden;
}

.enroll-checkout-header {
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, var(--lime-soft) 0%, rgba(255, 215, 0, 0.08) 100%);
  border-bottom: 1px solid var(--border);
}

.enroll-checkout-header h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--forest);
}

.enroll-checkout-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.enroll-order-summary {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.enroll-order-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 10px;
}

.enroll-order-row-muted { color: var(--muted); }

.enroll-order-label {
  flex: 1;
  line-height: 1.4;
  font-weight: 600;
  color: var(--forest);
}

.enroll-order-row-muted .enroll-order-label { font-weight: 500; }

.enroll-order-value {
  font-weight: 700;
  color: var(--forest);
  white-space: nowrap;
}

.enroll-order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px dashed var(--border-strong);
  font-size: 15px;
  font-weight: 800;
  color: var(--forest);
}

.enroll-order-total span:last-child {
  font-size: 20px;
  color: var(--orange);
  letter-spacing: -0.02em;
}

.enroll-form {
  padding: 20px 24px 24px;
}

.enroll-form-label {
  display: block;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.enroll-file-upload .file-upload-label {
  padding: 28px 16px;
  border-radius: var(--radius);
}

.enroll-file-upload.is-dragover .file-upload-label {
  border-color: var(--lime);
  background: var(--lime-soft);
  transform: scale(1.01);
}

.enroll-file-upload.has-file .file-upload-label { display: none; }

.enroll-upload-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lime-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lime-dark);
  margin-bottom: 4px;
}

.enroll-file-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--lime-soft);
  border: 1px solid rgba(164, 198, 57, 0.35);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
}

.enroll-file-selected svg { flex-shrink: 0; color: var(--lime-dark); }

.enroll-file-selected span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enroll-file-clear {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(27, 48, 34, 0.08);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.enroll-file-clear:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.enroll-upload-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.enroll-what-next {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.enroll-what-next h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.enroll-what-next ul {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.enroll-what-next li { margin-bottom: 4px; }
.enroll-what-next li:last-child { margin-bottom: 0; }

.enroll-submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 13px 20px;
  font-size: 15px;
}

.enroll-cancel-btn {
  width: 100%;
  margin-top: 8px;
  text-align: center;
}

.enroll-help-card {
  padding: 18px 20px;
  background: var(--bg);
  border-style: dashed;
}

.enroll-help-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
}

.enroll-help-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--forest);
}

.enroll-help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.enroll-help-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
}

.enroll-help-list a:hover { color: var(--orange-dark); text-decoration: none; }

.enroll-course-summary {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ── Enrollment review ─────────────────────────────────────── */

.decline-reason {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: #be123c;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid rgba(225, 29, 72, 0.15);
}

.review-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: flex-start;
  flex-wrap: wrap;
}

.decline-details { position: relative; }

.decline-details summary {
  list-style: none;
  cursor: pointer;
}

.decline-details summary::-webkit-details-marker { display: none; }

.decline-form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: 300px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.decline-form label { margin-top: 0; }
.decline-form .btn { margin-top: 12px; width: 100%; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
  color: var(--forest);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 130, 32, 0.25);
}

.btn:hover {
  filter: brightness(1.05);
  color: var(--forest);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(245, 130, 32, 0.35);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0) scale(0.98); }

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(225, 29, 72, 0.2);
  box-shadow: none;
}

.btn-danger:hover {
  background: rgba(225, 29, 72, 0.18);
  color: #be123c;
  box-shadow: none;
  transform: none;
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--muted);
  border-color: var(--border-strong);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--forest);
  box-shadow: none;
  transform: none;
}

.btn-success {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(107, 158, 30, 0.3);
  box-shadow: none;
}

.btn-success:hover {
  background: rgba(107, 158, 30, 0.22);
  color: #4d7a15;
  box-shadow: none;
  transform: none;
}

.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

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

/* ── Badges & pills ──────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-blue { background: var(--lime-soft); color: var(--lime-dark); }
.badge-green { background: var(--ok-soft); color: var(--ok); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-yellow { background: var(--warn-soft); color: var(--warn); }
.badge-gray { background: var(--bg-subtle); color: var(--muted); }

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* ── Flash messages ────────────────────────────────────────── */

.flash {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash.success {
  border-color: rgba(107, 158, 30, 0.3);
  background: var(--ok-soft);
  color: #4d7a15;
}

.flash.error {
  border-color: rgba(225, 29, 72, 0.25);
  background: var(--danger-soft);
  color: #be123c;
}

.flash.info {
  border-color: rgba(164, 198, 57, 0.35);
  background: var(--lime-soft);
  color: var(--lime-dark);
}

/* ── Tables ────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 13px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
}

.table tbody tr { transition: background 0.12s; }

.table tbody tr:hover { background: var(--bg); }

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

.code,
.table .code {
  font-weight: 700;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 13px;
  color: var(--orange-dark);
  background: var(--orange-soft);
  padding: 2px 8px;
  border-radius: 6px;
}

.right { text-align: right; }

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── Progress bar ──────────────────────────────────────────── */

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.progress-bar {
  flex: 1;
  height: 7px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), var(--orange));
  transition: width 0.3s ease;
}

.progress-fill.full { background: linear-gradient(90deg, var(--warn), var(--danger)); }

.progress-text {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 48px;
  font-weight: 600;
}

/* ── Enrollment list ───────────────────────────────────────── */

.enrollment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.enrollment-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.enrollment-item:last-child { border-bottom: none; }

.enrollment-code {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--lime-soft), var(--gold-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  color: var(--lime-dark);
  flex-shrink: 0;
  font-family: ui-monospace, monospace;
  border: 1px solid rgba(164, 198, 57, 0.25);
}

.enrollment-details { flex: 1; min-width: 0; }

.enrollment-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--forest);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.enrollment-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Course cards ──────────────────────────────────────────── */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.course-card:hover {
  border-color: rgba(164, 198, 57, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.course-card.enrolled {
  border-color: rgba(164, 198, 57, 0.45);
  background: linear-gradient(180deg, #fff 0%, rgba(164, 198, 57, 0.06) 100%);
}

.course-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.course-card-code {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--lime-dark);
  background: var(--lime-soft);
  padding: 4px 10px;
  border-radius: 6px;
}

.course-card-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.course-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.45;
  color: var(--forest);
}

.course-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.course-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Empty state ───────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
  color: var(--lime);
}

.empty-state p {
  margin: 0 0 18px;
  font-size: 14px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Welcome banner ────────────────────────────────────────── */

.welcome-banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lime), var(--gold), var(--orange));
}

.school-banner {
  background:
    linear-gradient(135deg, rgba(164, 198, 57, 0.08) 0%, rgba(255, 255, 255, 1) 50%, rgba(245, 130, 32, 0.05) 100%);
}

.welcome-banner h1 {
  font-size: 26px;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.welcome-banner p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  max-width: 520px;
}

.welcome-stats {
  display: flex;
  gap: 28px;
}

.welcome-stat { text-align: center; }

.welcome-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.03em;
  line-height: 1;
}

.welcome-stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.school-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-dark);
  background: var(--lime-soft);
  border: 1px solid rgba(164, 198, 57, 0.3);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 12px;
}

/* ── Info list ─────────────────────────────────────────────── */

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.info-list li:last-child { border-bottom: none; }

.info-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  margin-top: 8px;
  flex-shrink: 0;
}

/* ── Auth cards ────────────────────────────────────────────── */

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 26px;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-card > p.muted {
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.5;
}

.auth-side {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.auth-side h2 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  font-weight: 700;
}

.credential-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.credential-box code {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--orange-dark);
}

.contact-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.contact-block h3 {
  margin: 0 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--text);
}

.contact-list a { color: var(--orange); font-weight: 600; }

.course-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0 0;
}

.course-detail-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.course-detail-panel h3 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lime-dark);
}

.course-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-detail-list li {
  position: relative;
  padding: 7px 0 7px 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

.course-detail-list li:last-child { border-bottom: none; }

.course-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

.enroll-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.enroll-summary-card {
  position: sticky;
  top: calc(var(--topbar-height) + 24px);
}

.duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #92680a;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
}

/* ── Overlay (mobile sidebar) ──────────────────────────────── */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 20, 0.55);
  backdrop-filter: blur(4px);
  z-index: 90;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-header-mobile { display: block; }
}

@media (max-width: 840px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .app-main { margin-left: 0; }
  .topbar { display: none; }
  .topbar-mobile { display: flex; }
  .content { padding: 20px 16px 36px; }
  .stats-grid,
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .welcome-banner { padding: 24px 20px; border-radius: var(--radius-lg); }
  .welcome-stats { width: 100%; justify-content: center; }
  .course-grid { grid-template-columns: 1fr; }
  .course-detail-grid,
  .enroll-layout { grid-template-columns: 1fr; }
  .enroll-summary-card,
  .enroll-checkout-card { position: static; }
  .enroll-hero { padding: 22px 20px 20px; border-radius: var(--radius-lg); }
  .enroll-hero-body { flex-direction: column; }
  .enroll-hero-price-card { width: 100%; }
  .enroll-hero-title { font-size: 22px; }
  .enroll-step-label { font-size: 10px; max-width: 72px; }
  .auth-form-panel { padding: 24px 16px; }
  .auth-card { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 24px; }
  .welcome-stat-value { font-size: 26px; }
}
