﻿/* ============================================================
   main.css – World-Class Enterprise SaaS Design System v5.0
   Clean, Modern & Minimalist (Linear / Vercel / Stripe Style)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* -- Design Tokens ------------------------------------------- */
:root {
  --primary:        #15803d;
  --primary-dark:   #166534;
  --primary-light:  #dcfce7;
  --primary-glow:   rgba(21, 128, 61, 0.15);

  --success:        #10b981;
  --success-light:  #ecfdf5;
  --warning:        #f59e0b;
  --warning-light:  #fffbeb;
  --danger:         #ef4444;
  --danger-light:   #fef2f2;

  --bg-main:        #f8fafc;
  --bg-card:        #ffffff;
  --bg-subtle:      #f1f5f9;
  --nav-bg:         rgba(255, 255, 255, 0.88);

  --text-main:      #0f172a;
  --text-secondary: #334155;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;

  --border:         #e2e8f0;
  --border-light:   #f1f5f9;

  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  --shadow-xs:  0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm:  0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg:  0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl:  0 20px 40px -4px rgba(0, 0, 0, 0.12);

  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary:        #4ade80;
  --primary-dark:   #22c55e;
  --primary-light:  rgba(34, 197, 94, 0.16);
  --primary-glow:   rgba(74, 222, 128, 0.22);

  --success:        #34d399;
  --success-light:  rgba(16, 185, 129, 0.15);
  --warning:        #fbbf24;
  --warning-light:  rgba(245, 158, 11, 0.15);
  --danger:         #f87171;
  --danger-light:   rgba(239, 68, 68, 0.15);

  --bg-main:        #000000;
  --bg-card:        #0a0a0a;
  --bg-subtle:      #111111;
  --nav-bg:         rgba(0, 0, 0, 0.88);

  --text-main:      #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted:     #94a3b8;
  --text-light:     #475569;

  --border:         #1e293b;
  --border-light:   #162032;

  --shadow-xs:  0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm:  0 1px 3px 0 rgba(0, 0, 0, 0.45);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 10px 25px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl:  0 20px 40px -4px rgba(0, 0, 0, 0.7);
}

/* -- Reset & Base --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 50% 0%, rgba(21, 128, 61, 0.08) 0px, transparent 60%),
    radial-gradient(at 100% 100%, rgba(13, 148, 136, 0.06) 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
  background-image: none;
}

/* -- Mobile app shell ---------------------------------------- */
html, body {
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
}

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* -- Navbar --------------------------------------------------- */
.navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 1.75rem;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.nav-right { display: flex; align-items: center; gap: 0.65rem; }
.notification-button { position: relative; }
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
  font-weight: 800;
}
.lucide { width: 1em; height: 1em; stroke-width: 1.8; vertical-align: -0.14em; flex: 0 0 auto; }
.feature-icon .lucide, .stat-icon-wrapper .lucide, .auth-mark .lucide { width: 1.35em; height: 1.35em; }
.password-toggle .lucide { width: 1.05em; height: 1.05em; }

/* -- Public Feature Cards ------------------------------------ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.5rem auto 2.5rem;
}

.feature-card {
  min-height: 245px;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-glow);
  border-radius: var(--radius-md);
}

.feature-card h3 {
  color: var(--text-main);
  line-height: 1.3;
}

.feature-card p {
  margin: 0;
  line-height: 1.65;
}

[data-theme="dark"] .feature-card {
  background: #0a0a0a;
  border-color: #242424;
}

[data-theme="dark"] .feature-card:hover {
  border-color: var(--primary);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}
.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

/* -- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: translateY(1px); }

.btn-primary, .btn-blue {
  background: linear-gradient(135deg, #16a34a 0%, #166534 100%);
  color: #ffffff !important;
  border-color: #15803d;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.3);
}
.btn-primary:hover, .btn-blue:hover {
  background: linear-gradient(135deg, #15803d 0%, #14532d 100%);
  box-shadow: 0 6px 18px rgba(21, 128, 61, 0.4);
  transform: translateY(-1px);
}

.btn-success, .btn-green {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #ffffff !important;
  border-color: #0f766e;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}
.btn-success:hover, .btn-green:hover {
  background: linear-gradient(135deg, #115e59 0%, #134e4a 100%);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.4);
  transform: translateY(-1px);
}

.btn-warning, .btn-yellow {
  background: linear-gradient(135deg, #ca8a04 0%, #854d0e 100%);
  color: #ffffff !important;
  border-color: #a16207;
  box-shadow: 0 4px 14px rgba(161, 98, 7, 0.28);
}
.btn-warning:hover, .btn-yellow:hover {
  background: linear-gradient(135deg, #a16207 0%, #713f12 100%);
  box-shadow: 0 6px 18px rgba(161, 98, 7, 0.38);
  transform: translateY(-1px);
}

.btn-danger, .btn-red {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff !important;
  border-color: #dc2626;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover, .btn-red:hover {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
  transform: translateY(-1px);
}

.btn-sm { padding: 0.38rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }

.btn-danger-outline {
  background: transparent;
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--danger);
}
.btn-danger-outline:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff !important;
}
.btn-google {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}
.btn-google:hover {
  background: var(--bg-subtle);
  border-color: var(--text-light);
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.25rem;
}
.password-toggle:hover { color: var(--primary-dark); }

.text-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.2rem 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.text-link:hover { color: var(--primary-dark); }
.text-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}
.text-link:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/* -- Auth Card ----------------------------------------------- */
.auth-card-container {
  max-width: 420px;
  width: 100%;
  margin: 3rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.auth-toggle-tabs {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  gap: 0.2rem;
}

.auth-toggle-btn {
  flex: 1;
  padding: 0.45rem 0.65rem;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: calc(var(--radius-sm) - 2px);
  transition: all var(--transition-fast);
  font-family: inherit;
}
.auth-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

/* -- Divider -------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.1rem 0;
  color: var(--text-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); }
.divider:not(:empty)::before { margin-right: 0.6em; }
.divider:not(:empty)::after  { margin-left: 0.6em; }

.small { font-size: 0.78rem; color: var(--text-muted); text-align: center; margin-top: 0.85rem; }

/* -- Share Link Box ------------------------------------------- */
.share-link-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 440px;
  width: 100%;
}
.share-link-input-group { display: flex; gap: 0.4rem; align-items: center; }
.copy-link-btn {
  background: #fff;
  color: #166534 !important;
  font-weight: 800;
  border: none;
  height: 36px;
}
.copy-link-btn:hover {
  background: #f0fdf4;
  color: #14532d !important;
}
.share-link-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  outline: none;
}

/* -- Hero Section --------------------------------------------- */
.hero-wrapper {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-main);
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.15;
}
.hero-title span {
  background: linear-gradient(135deg, #15803d 0%, #0f766e 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 2rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* -- App Container & Dashboard Layout ------------------------- */
.app-container { max-width: 1280px; width: 100%; margin: 1.5rem auto 3rem; padding: 0 1.5rem; flex: 1; }

.dashboard-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
}

.sidebar-navigation {
  width: 240px;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding-left: 0.4rem;
}

.sidebar-navigation .tab-navigation {
  display: flex;
  flex-direction: column !important;
  gap: 0.25rem;
  background: var(--bg-card);
  padding: 0.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 75px;
}

.sidebar-navigation .nav-tab-btn {
  width: 100%;
  justify-content: flex-start;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-family: inherit;
}

.sidebar-navigation .nav-tab-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.sidebar-navigation .nav-tab-btn.active {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dashboard-layout .content-panel {
  flex: 1;
  min-width: 0;
}

/* -- Content Panel -------------------------------------------- */
.content-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: -0.015em;
}

/* -- Academy Header Banner ------------------------------------ */
.academy-header-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.6rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.academy-info h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.academy-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 0.6rem;
}

/* -- Stats Grid ----------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
}
.stat-card:hover { border-color: var(--text-light); }

.stat-icon-wrapper {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.stat-icon-indigo  { background: var(--primary-light); color: var(--primary); }
.stat-icon-emerald { background: var(--success-light); color: var(--success); }
.stat-icon-amber   { background: var(--warning-light); color: var(--warning); }
.stat-icon-cyan    { background: #ccfbf1; color: #0f766e; }

.stat-number { font-size: 1.5rem; font-weight: 700; color: var(--text-main); line-height: 1.1; letter-spacing: -0.02em; }
.stat-label  { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); margin-top: 0.15rem; }

/* -- Form Box ------------------------------------------------- */
.action-form-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.form-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.3rem; }
.form-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.form-input, .form-select, .form-textarea {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* -- Tables --------------------------------------------------- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.lms-table { width: 100%; border-collapse: collapse; text-align: left; background: var(--bg-card); }

.lms-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.lms-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-main);
}
.lms-table tbody tr:hover td { background: var(--bg-subtle); }

/* -- Badges --------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-present  { background: var(--success-light); color: #047857; }
.badge-absent   { background: var(--danger-light);  color: #b91c1c; }
.badge-late     { background: var(--warning-light); color: #92400e; }
.badge-paid     { background: #dcfce7; color: #166534; }
.badge-pending  { background: var(--warning-light); color: #92400e; }
.badge-tag      { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); }

/* -- Modals --------------------------------------------------- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  max-width: 440px;
  margin: 40px auto;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.onboarding-dialog {
  width: min(620px, 100%);
  max-width: 620px;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 2.5rem 3rem;
}

.modal-title { font-size: 1.35rem; font-weight: 700; color: var(--text-main); text-align: center; margin-bottom: 0.35rem; }

/* -- Footer --------------------------------------------------- */
footer {
  text-align: center;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* -- Responsive (Comprehensive Mobile Layout Optimization) ----- */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout {
    flex-direction: column;
    gap: 0.85rem;
  }
  .sidebar-navigation {
    width: 100%;
    position: static;
  }
  .sidebar-title {
    display: none;
  }
  .sidebar-navigation .tab-navigation {
    flex-direction: row !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    scrollbar-width: none;
  }
  .sidebar-navigation .tab-navigation::-webkit-scrollbar {
    display: none;
  }
  .sidebar-navigation .nav-tab-btn {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 1rem 0.75rem 2.5rem;
  }
  .academy-header-card {
    padding: 1.25rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .academy-info h1 {
    font-size: 1.35rem;
  }
  .share-link-box {
    max-width: 100%;
  }
  .status-banner {
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .navbar {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  .form-input,
  .form-select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .btn,
  .btn-sm,
  button {
    min-height: 42px;
  }

  .hero-wrapper {
    padding: 2.5rem 1rem 2rem;
  }

  .feature-card {
    min-height: 0;
    padding: 1.25rem;
  }

  .hero-title  { font-size: 1.85rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }

  .navbar {
    padding: 0 0.75rem;
    min-height: 56px;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
  }
  .nav-brand {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.95rem;
    gap: 0.45rem;
  }
  .nav-brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    flex: 0 0 28px;
  }
  .nav-right {
    flex: 0 0 auto;
    gap: 0.35rem;
  }
  .nav-right .btn-sm {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    gap: 0;
    font-size: 0;
  }
  .nav-right .btn-sm .lucide {
    width: 18px;
    height: 18px;
    font-size: 18px;
  }
  .nav-right #logoutBtn,
  .nav-right #adminLogoutBtn,
  .nav-right #studentLogoutBtn {
    width: auto;
    min-width: 0;
    padding: 0 0.65rem;
    font-size: 0.75rem;
  }
  .nav-right a[href="index.html"]:not(.nav-brand) {
    width: auto;
    min-width: 0;
    padding: 0 0.65rem;
    font-size: 0.75rem;
  }
  #userEmailBadge {
    display: none !important;
  }
  .content-panel {
    padding: 1rem 0.75rem;
    border-radius: var(--radius-md);
    min-width: 0;
    overflow: hidden;
  }

  .panel-header {
    align-items: flex-start;
  }
  .panel-title {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .panel-header > .btn,
  .panel-header > .btn-group {
    width: 100%;
  }
  .action-form-box {
    min-width: 0;
    overflow: hidden;
  }
  .action-form-box .btn {
    max-width: 100%;
    white-space: normal;
  }
  .table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  .table-container .lms-table {
    min-width: 560px;
  }
  .tab-navigation {
    max-width: 100%;
  }
  .nav-tab-btn {
    flex-shrink: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .stat-card {
    padding: 0.75rem 0.85rem;
    gap: 0.6rem;
  }
  .stat-number {
    font-size: 1.25rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }
  .stat-icon-wrapper {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  .form-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .action-form-box {
    padding: 1rem 0.75rem;
  }

  .auth-card-container {
    margin: 1rem auto;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
  }

  .modal-dialog {
    margin: 20px auto;
    padding: 1.25rem 1rem;
    max-width: 95%;
  }

  .onboarding-dialog {
    width: 95%;
    max-width: 620px;
    max-height: calc(100vh - 2.5rem);
    padding: 1.75rem 1.25rem;
  }

  .table-container {
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
  }
  .lms-table {
    min-width: 480px;
  }
  .lms-table th, .lms-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
  .nav-brand span {
    display: none;
  }
}

/* ── Sleek Modern Status Banner ──────────────────────────────── */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.status-banner:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.status-banner-trial {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-banner-expired {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-banner-suspended {
  background: #fff7ed;
  color: #92400e;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.status-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-banner-trial .status-banner-badge {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-banner-expired .status-banner-badge {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-banner-suspended .status-banner-badge {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.status-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.status-banner-trial .status-banner-cta {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.status-banner-trial:hover .status-banner-cta {
  background: #f59e0b;
  color: #fff;
}

.status-banner-expired .status-banner-cta {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.status-banner-expired:hover .status-banner-cta {
  background: #ef4444;
  color: #fff;
}

.status-banner-suspended .status-banner-cta {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}
.status-banner-suspended:hover .status-banner-cta {
  background: #ea580c;
  color: #fff;
}

/* Dark Theme Overrides for Status Banner */
[data-theme="dark"] .status-banner-trial {
  background: rgba(245, 158, 11, 0.12);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}
[data-theme="dark"] .status-banner-trial .status-banner-badge {
  background: rgba(245, 158, 11, 0.22);
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.4);
}
[data-theme="dark"] .status-banner-trial .status-banner-cta {
  background: rgba(245, 158, 11, 0.2);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.4);
}
[data-theme="dark"] .status-banner-trial:hover .status-banner-cta {
  background: #f59e0b;
  color: #000;
}

[data-theme="dark"] .status-banner-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.12);
}
[data-theme="dark"] .status-banner-expired .status-banner-badge {
  background: rgba(239, 68, 68, 0.22);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
}
[data-theme="dark"] .status-banner-expired .status-banner-cta {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}
[data-theme="dark"] .status-banner-expired:hover .status-banner-cta {
  background: #ef4444;
  color: #fff;
}

[data-theme="dark"] .status-banner-suspended {
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.35);
}
[data-theme="dark"] .status-banner-suspended .status-banner-badge {
  background: rgba(249, 115, 22, 0.22);
  color: #fed7aa;
  border-color: rgba(249, 115, 22, 0.4);
}
[data-theme="dark"] .status-banner-suspended .status-banner-cta {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.4);
}
[data-theme="dark"] .status-banner-suspended:hover .status-banner-cta {
  background: #ea580c;
  color: #fff;
}
