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

:root {
  --cream: #f6f4ec;
  --surface: #ffffff;
  --surface-soft: #fbfaf6;
  --primary: #0f2f2f;
  --primary-2: #183f3b;
  --primary-3: #245a50;
  --accent: #2ecc71;
  --accent-soft: rgba(46, 204, 113, 0.12);
  --action: #0f2f2f;
  --action-hover: #123a37;
  --action-text: #ffffff;
  --teal: #2bb3a3;
  --gold: #c99a2e;
  --goldp: #fff5d8;
  --goldl: #ffe7a1;
  --red: #b42318;
  --red-soft: rgba(180, 35, 24, 0.08);
  --text: #17211f;
  --muted: #5f6f68;
  --muted-2: #8a9891;
  --border: rgba(15, 47, 47, 0.11);
  --border-strong: rgba(15, 47, 47, 0.18);
  --shadow: 0 12px 34px rgba(15, 47, 47, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 47, 47, 0.06);
  --radius: 12px;
  --radius-sm: 8px;

  --wh: var(--surface);
  --gd: var(--primary);
  --gm: var(--primary-2);
  --gl: var(--primary-3);
  --td: var(--text);
  --tm: var(--muted);
  --tl: var(--muted-2);
  --cd: var(--border);
  --shad: var(--shadow-soft);
  --shad-lg: var(--shadow);
  --glass: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] {
  --cream: #0d1513;
  --surface: #14211f;
  --surface-soft: #101b19;
  --primary: #ecfff6;
  --primary-2: #bdebd5;
  --primary-3: #7ed7aa;
  --text: #f4fbf7;
  --muted: #b7c6c0;
  --muted-2: #81928c;
  --border: rgba(236, 255, 246, 0.11);
  --border-strong: rgba(236, 255, 246, 0.18);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.24);
  --glass: rgba(20, 33, 31, 0.88);
  --action: #2ecc71;
  --action-hover: #78e6a8;
  --action-text: #062019;
  --wh: var(--surface);
  --gd: var(--primary);
  --gm: var(--primary-2);
  --gl: var(--primary-3);
  --td: var(--text);
  --tm: var(--muted);
  --tl: var(--muted-2);
  --cd: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--text);
  font-family: "Cairo", "Tajawal", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.has-sidebar {
  background:
    linear-gradient(180deg, rgba(46, 204, 113, 0.04), transparent 240px),
    #f7f8f4;
}

[data-theme="dark"] body,
[data-theme="dark"] body.has-sidebar {
  background: #0d1513;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.no-sel {
  user-select: none;
  -webkit-user-select: none;
}

/* Layout */
.main-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-viewport {
  flex: 1;
  min-width: 0;
}

.page {
  display: none;
}

.page.active {
  display: block !important;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 282px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0f2f2f;
  color: #eafff3;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 22px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo .brand-logo-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #eafff3;
  border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-logo .brand-text {
  color: #ffffff !important;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 18px 14px;
}

.sidebar-footer {
  padding: 16px 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(234, 255, 243, 0.72);
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background: rgba(46, 204, 113, 0.18);
  color: #ffffff;
  box-shadow: inset -3px 0 0 var(--accent);
}

.nav-link:active,
.btn:active,
.tool-card:active {
  transform: translateY(1px);
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  font-size: 20px;
  font-weight: 900;
}

.brand-text {
  color: var(--primary);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

/* Shared Components */
.saas-header {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 42px;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 248, 244, 0.9);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .saas-header {
  background: rgba(13, 21, 19, 0.9);
}

.saas-title-group h1 {
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

.saas-title-group p {
  max-width: 720px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.saas-container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 36px 42px 56px;
}

.header-actions,
.flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card,
.modal,
.exam-card,
.chart-card,
.contact-card,
.tool-card,
.stat-item,
.stat-card,
.settings-nav,
.saas-table-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card {
  padding: 28px;
  margin-bottom: 24px;
}

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

.section-heading.compact {
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 0;
  border-bottom: 0;
}

.card-header h3,
.section-heading h3 {
  color: var(--primary);
  font-size: 19px;
  font-weight: 900;
}

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--primary-3);
  font-size: 12px;
  font-weight: 900;
}

.divider {
  height: 1px;
  margin: 16px 0;
  background: var(--border);
}

.empty-state {
  padding: 52px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.empty-state span,
.empty-state p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* Forms */
.inp-wrap {
  margin-bottom: 22px;
}

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

.inp {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea.inp {
  resize: vertical;
}

.inp:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.14);
}

.inp::placeholder {
  color: var(--muted-2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-green {
  background: var(--action);
  color: var(--action-text);
  box-shadow: 0 10px 24px rgba(15, 47, 47, 0.16);
}

.btn-green:hover {
  background: var(--action-hover);
  box-shadow: 0 14px 28px rgba(15, 47, 47, 0.2);
}

.btn-outline {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--primary);
}

.btn-outline:hover {
  border-color: rgba(46, 204, 113, 0.55);
  background: var(--accent-soft);
}

.btn-gold {
  background: var(--gold);
  color: #ffffff;
}

.btn-red {
  background: var(--red);
  color: #ffffff;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 13px;
}

.btn-lg {
  min-height: 52px;
  padding: 13px 28px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

.btn[disabled],
.btn.is-loading {
  cursor: wait;
  opacity: 0.7;
}

.btn-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.text-link-btn,
.subtle-link {
  border: 0;
  background: transparent;
  color: var(--primary-3);
  font-weight: 900;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.badge-green {
  border: 1px solid rgba(46, 204, 113, 0.28);
  background: var(--accent-soft);
  color: #168348;
}

.badge-red {
  border: 1px solid rgba(180, 35, 24, 0.18);
  background: var(--red-soft);
  color: var(--red);
}

.badge-gold {
  border: 1px solid rgba(201, 154, 46, 0.24);
  background: rgba(201, 154, 46, 0.12);
  color: #8a5f0a;
}

/* Landing */
.landing-nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  width: 100vw;
  max-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 64px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.landing-nav .nav-links a {
  position: relative;
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: color 0.18s ease;
}

.landing-nav .nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.45);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.landing-nav .nav-links a:hover,
.landing-nav .nav-links a.is-active {
  color: var(--primary);
}

.landing-nav .nav-links a:hover::after,
.landing-nav .nav-links a.is-active::after {
  transform: scaleX(1);
}

.landing-wrapper {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 116px 32px 72px;
}

.premium-hero {
  background:
    linear-gradient(115deg, rgba(15, 47, 47, 0.08), rgba(46, 204, 113, 0.08) 42%, transparent 42%),
    linear-gradient(180deg, #fbfaf6 0%, #eef5ee 100%);
}

.premium-hero::before {
  content: "";
  position: absolute;
  inset: 96px 0 auto 0;
  height: 58%;
  background-image:
    linear-gradient(rgba(15, 47, 47, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 47, 47, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  opacity: 0.5;
  pointer-events: none;
}

[data-theme="dark"] .premium-hero {
  background:
    linear-gradient(115deg, rgba(46, 204, 113, 0.08), rgba(43, 179, 163, 0.08) 42%, transparent 42%),
    #0d1513;
}

.landing-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.75fr);
  align-items: center;
  gap: 56px;
}

.landing-grid > * {
  min-width: 0;
}

.hero-content {
  width: 100%;
  max-width: 720px;
}

.landing-grid-lean {
  gap: 40px;
}

.hero-content-lean {
  max-width: 640px;
}

.home-page-shell {
  align-items: flex-start;
  padding-top: 146px;
}

.home-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.58;
  pointer-events: none;
}

.home-orb-1 {
  top: 16%;
  right: 10%;
  width: 240px;
  height: 240px;
  background: rgba(46, 204, 113, 0.16);
}

.home-orb-2 {
  bottom: 10%;
  left: 8%;
  width: 280px;
  height: 280px;
  background: rgba(201, 154, 46, 0.12);
}

.home-face-shell {
  position: relative;
  z-index: 3;
  max-width: 1240px;
}

.home-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.home-stage-copy,
.home-stage-panel {
  min-width: 0;
}

.home-stage-copy {
  padding: 26px 0 8px;
}

.home-stage-title {
  max-width: 780px;
  margin-bottom: 22px;
  color: var(--primary);
  font-size: 72px;
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.home-stage-title span,
.home-stage-title em {
  display: block;
}

.home-stage-title span {
  color: var(--primary-3);
}

.home-stage-title em {
  color: var(--gold);
  font-style: normal;
}

.home-stage-lead {
  max-width: 670px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.95;
}

.home-stage-actions {
  margin-bottom: 22px;
}

.home-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-proof-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.home-stage-panel {
  display: grid;
  gap: 16px;
}

.home-panel-card,
.home-stat-card,
.home-editorial-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.home-panel-card {
  min-height: 240px;
  padding: 28px;
}

.home-panel-card-primary {
  background:
    linear-gradient(145deg, rgba(15, 47, 47, 0.96), rgba(24, 63, 59, 0.92)),
    rgba(255, 255, 255, 0.88);
  color: #f4fbf7;
}

.home-panel-card-primary h2,
.home-panel-card-primary p {
  color: inherit;
}

.home-panel-kicker,
.home-editorial-label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.home-panel-kicker {
  color: rgba(244, 251, 247, 0.72);
}

.home-panel-card h2 {
  margin-bottom: 12px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.2;
}

.home-panel-card p {
  font-size: 15px;
  line-height: 1.95;
}

.home-panel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-stat-card {
  min-height: 148px;
  padding: 22px 18px;
  text-align: center;
}

.home-stat-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
}

.home-stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.8;
}

.home-editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-editorial-card {
  min-height: 210px;
  padding: 26px;
}

.home-editorial-wide {
  grid-column: span 3;
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(255, 255, 255, 0.88) 48%),
    rgba(255, 255, 255, 0.88);
}

.home-editorial-label {
  color: var(--primary-3);
}

.home-editorial-card h3 {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 29px;
  font-weight: 900;
  line-height: 1.25;
}

.home-editorial-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
}

.login-page-shell {
  align-items: center;
}

.login-landing-grid {
  gap: 56px;
}

.login-hero-content {
  max-width: 640px;
}

.login-hero-title {
  max-width: 680px;
}

.login-hero-desc {
  max-width: 560px;
  margin-bottom: 22px;
}

.login-benefit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.login-benefit-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.login-form-panel {
  max-width: 520px;
}

.login-form-card {
  padding: 36px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
}

.hero-content-lean .hero-desc {
  margin-bottom: 24px;
}

.hero-content-lean .hero-actions {
  margin-bottom: 0;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-3);
  font-size: 13px;
  font-weight: 900;
}

.hero-tag span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  max-width: 780px;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: 56px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.text-gradient {
  color: var(--primary-3);
}

.hero-desc {
  max-width: 640px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.h-stat {
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(15, 47, 47, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.h-stat strong {
  display: block;
  margin: 4px 0;
  color: var(--primary);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
}

.h-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.h-stat .metric-label {
  color: var(--primary-3);
  font-size: 12px;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.trust-badge span {
  color: #168348;
}

.landing-form-column {
  width: 100%;
}

.glass-card {
  width: 100%;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: 0 24px 60px rgba(15, 47, 47, 0.14);
  backdrop-filter: blur(18px);
}

.access-title {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 28px;
  font-weight: 900;
}

.access-subtitle {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 26px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 47, 47, 0.05);
}

.segment {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segment.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.student-step-panel {
  animation: fadeUp 0.22s ease both;
}

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

.landing-footer {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  z-index: 4;
  text-align: center;
}

.subtle-link {
  color: var(--muted);
  font-size: 13px;
  opacity: 0.72;
}

.subtle-link:hover {
  opacity: 1;
  color: var(--primary);
}

.blob {
  display: none;
}

/* Dashboards */
.teacher-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.tool-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  min-height: 122px;
  padding: 20px;
  color: var(--text);
  text-align: right;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 204, 113, 0.45);
  box-shadow: var(--shadow);
}

.tool-icon,
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--primary-3);
  font-size: 12px;
  font-weight: 900;
}

.tool-card strong {
  align-self: end;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.tool-card small {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-item,
.stat-card {
  min-height: 138px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.stat-item::after,
.stat-card::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--accent);
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-item .icon {
  display: none;
}

.stat-item .num,
.stat-card .stat-num {
  display: block;
  margin-top: 14px;
  color: var(--primary);
  font-size: 38px;
  font-weight: 900;
  line-height: 1.1;
}

.stat-item .lbl,
.stat-card .stat-lbl {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.dashboard-charts {
  margin-bottom: 28px;
}

.dashboard-charts:not(:empty),
#ar-charts:not(:empty) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.chart-card {
  padding: 22px;
}

.chart-title {
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 16px;
  font-weight: 900;
}

.chart-empty {
  padding: 22px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.chart-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chart-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.chart-label,
.chart-value {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.chart-value {
  color: var(--primary-3);
  white-space: nowrap;
}

.chart-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 47, 47, 0.08);
}

.chart-fill {
  height: 100%;
  border-radius: inherit;
}

.chart-meta {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.exam-card {
  padding: 20px;
  margin-bottom: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.dashboard-section-card {
  margin-top: 0;
}

/* Student Dashboard */
.saas-top-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 950;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 248, 244, 0.92);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .saas-top-nav {
  background: rgba(13, 21, 19, 0.92);
}

.saas-top-nav-content {
  max-width: 1260px;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 42px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.saas-top-nav .brand-text {
  font-size: 21px;
}

.nav-link-btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.nav-link-btn.active,
.nav-link-btn:hover {
  border-color: var(--border);
  background: var(--surface);
  color: var(--primary);
}

.student-nav-actions {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.student-dashboard {
  padding-top: 104px;
}

.student-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(43, 179, 163, 0.06)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.student-welcome h1 {
  color: var(--primary);
  font-size: 28px;
  font-weight: 900;
}

.student-welcome p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.student-stat-grid {
  max-width: 980px;
  margin-inline: auto;
}

.student-stat-card {
  text-align: right;
}

.student-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.dashboard-section {
  min-width: 0;
}

.profile-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-row strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  overflow-wrap: anywhere;
}

.student-history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.student-history-title {
  color: var(--primary);
  font-size: 16px;
  font-weight: 900;
}

.student-history-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.student-history-score {
  min-width: 96px;
  text-align: left;
}

.student-history-score strong {
  display: block;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.student-history-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

/* Tables */
.saas-table-container {
  overflow-x: auto;
}

.saas-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  text-align: right;
}

.saas-table th {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.saas-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  vertical-align: middle;
}

.saas-table tr:last-child td {
  border-bottom: 0;
}

.saas-table tbody tr:hover {
  background: rgba(46, 204, 113, 0.035);
}

/* Settings and support */
.settings-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.settings-nav {
  padding: 10px;
}

.settings-nav-item {
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.settings-nav-item.active {
  background: var(--accent-soft);
  color: var(--primary);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.features-page {
  background:
    radial-gradient(circle at 15% 18%, rgba(46, 204, 113, 0.18), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(43, 179, 163, 0.14), transparent 24%),
    linear-gradient(180deg, #fcfcf8 0%, #eef4ee 100%);
}

.features-shell {
  position: relative;
  z-index: 3;
  max-width: 1220px;
}

.features-aura {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
}

.features-aura-1 {
  top: 18%;
  right: 8%;
  width: 220px;
  height: 220px;
  background: rgba(46, 204, 113, 0.18);
}

.features-aura-2 {
  bottom: 14%;
  left: 10%;
  width: 260px;
  height: 260px;
  background: rgba(201, 154, 46, 0.16);
}

.features-hero {
  max-width: 900px;
  margin: 0 auto 28px;
  text-align: center;
}

.features-hero .hero-title,
.features-hero .hero-desc {
  margin-right: auto;
  margin-left: auto;
}

.features-badge-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.feature-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.feature-card,
.feature-quote,
.feature-step,
.faq-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.feature-card {
  min-height: 220px;
  padding: 24px;
}

.feature-card-wide {
  grid-column: 1 / -1;
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(46, 204, 113, 0.14), rgba(255, 255, 255, 0.92) 52%),
    rgba(255, 255, 255, 0.84);
}

.feature-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--primary-3);
  font-size: 12px;
  font-weight: 900;
}

.feature-card h3,
.faq-card h3 {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
}

.feature-card p,
.feature-quote,
.feature-step p,
.faq-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.features-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.feature-quote {
  padding: 28px;
  color: var(--primary);
  font-size: 17px;
  font-weight: 800;
}

.feature-quote strong {
  color: var(--primary-3);
}

.feature-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-step {
  padding: 20px 18px;
  text-align: center;
}

.feature-step span {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.features-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.faq-card {
  padding: 24px;
}

.features-actions {
  justify-content: center;
  margin-top: 28px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.contact-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 28px;
}

.icon-whatsapp {
  background: rgba(37, 211, 102, 0.12);
  color: #25d366;
}

.icon-email {
  background: rgba(234, 67, 53, 0.1);
  color: #ea4335;
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.theme-toggle:hover {
  border-color: rgba(46, 204, 113, 0.5);
}

[data-theme="dark"] .sun-icon,
:root:not([data-theme="dark"]) .moon-icon {
  display: inline-flex;
}

[data-theme="dark"] .moon-icon,
:root:not([data-theme="dark"]) .sun-icon {
  display: none;
}

/* Modals and messages */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 19, 17, 0.48);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
}

.modal h2 {
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.err,
.suc {
  padding: 13px 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
}

.err {
  border: 1px solid rgba(180, 35, 24, 0.18);
  background: var(--red-soft);
  color: var(--red);
}

.suc {
  border: 1px solid rgba(46, 204, 113, 0.22);
  background: var(--accent-soft);
  color: #168348;
}

.muted-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* Exam and results */
.exam-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 950;
  padding: 18px 42px;
  background: #0f2f2f;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.exam-header-title {
  font-size: 20px;
  font-weight: 900;
}

.exam-header-student {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.floating-timer {
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.timer-val {
  font-size: 22px;
  font-weight: 900;
}

.timer-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.timer-bar {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.timer-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.header-bar {
  background: #0f2f2f;
  box-shadow: var(--shadow);
}

.score-circle {
  width: 132px;
  height: 132px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #0f2f2f;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.score-good {
  background: linear-gradient(135deg, #0f2f2f, #168348);
}

.question-attachment {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
}

.question-attachment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.question-attachment-title {
  color: var(--primary);
  font-weight: 900;
}

.question-attachment-meta {
  color: var(--muted);
  font-size: 12px;
}

.question-attachment-body {
  padding: 14px;
}

.question-attachment-image {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

.attachment-download {
  color: var(--primary-3);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.attachment-icon {
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.bank-import-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.bank-import-item:last-child {
  border-bottom: 0 !important;
}

.file-picker-btn {
  position: relative;
}

/* Admin login */
.admin-login-wrapper {
  background: #020b0b !important;
  color: #ffffff;
}

.admin-glass-card {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(9, 19, 17, 0.86) !important;
}

.admin-access-title,
.admin-hero-title {
  color: #ffffff !important;
}

.admin-access-subtitle,
.admin-hero-desc,
.admin-label {
  color: #b7c6c0 !important;
}

.admin-inp {
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}

.admin-stat-card {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.admin-btn-cancel {
  background: transparent !important;
  color: #eafff3 !important;
}

/* Responsive */
@media (max-width: 1180px) {
  .landing-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-content {
    max-width: none;
    text-align: center;
  }

  .hero-desc,
  .hero-actions,
  .trust-badges,
  .home-proof-strip,
  .login-benefit-list {
    justify-content: center;
    margin-right: auto;
    margin-left: auto;
  }

  .landing-form-column {
    max-width: 640px;
    margin: 0 auto;
  }

  .home-stage {
    grid-template-columns: 1fr;
  }

  .home-stage-copy,
  .home-stage-panel {
    text-align: center;
  }

  .dashboard-charts:not(:empty),
  #ar-charts:not(:empty) {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card-wide,
  .features-strip,
  .features-faq {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .admin-sidebar {
    width: 236px;
  }

  .saas-header,
  .saas-container,
  .saas-top-nav-content {
    padding-right: 24px;
    padding-left: 24px;
  }

  .teacher-tools,
  .stat-grid,
  .hero-stats,
  .grid3,
  .student-dashboard-grid,
  .settings-grid,
  .features-grid,
  .features-faq,
  .features-strip,
  .feature-steps,
  .home-editorial-grid,
  .home-panel-stats {
    grid-template-columns: 1fr;
  }

  .home-editorial-wide {
    grid-column: auto;
  }

  .profile-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .main-wrapper {
    display: block;
  }

  .admin-sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-nav {
    display: block;
    padding: 18px 20px;
    min-height: 74px;
  }

  .landing-nav .nav-brand {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 40;
  }

  .landing-nav .brand-text {
    display: none;
  }

  .landing-nav .nav-links {
    display: none;
  }

  .landing-wrapper {
    padding: 100px 18px 58px;
  }

  .hero-title {
    font-size: 31px;
  }

  .home-stage-title {
    font-size: 42px;
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
  }

  .hero-desc {
    font-size: 16px;
    max-width: 100%;
  }

  .home-stage-lead {
    font-size: 17px;
  }

  .glass-card,
  .card,
  .modal {
    padding: 22px;
  }

  .grid2,
  .support-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .saas-header,
  .student-welcome,
  .flex-between {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .student-nav-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-right: 0;
  }

  .saas-top-nav {
    position: relative;
  }

  .saas-top-nav-content {
    min-height: auto;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .student-dashboard {
    padding-top: 24px;
  }

  .nav-links {
    gap: 10px;
    flex-wrap: wrap;
  }

  .student-history-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-history-score {
    width: 100%;
    text-align: right;
  }

  .exam-header {
    position: relative;
    padding: 16px;
  }
}

@media (max-width: 520px) {
  .hero-title {
    max-width: 320px;
    margin-right: auto;
    margin-left: auto;
    font-size: 24px;
  }

  .home-stage-title {
    max-width: 300px;
    font-size: 30px;
  }

  .hero-desc {
    max-width: 320px;
  }

  .hero-actions .btn,
  .landing-form-column .btn {
    width: 100%;
  }

  .segmented-control,
  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .saas-table {
    min-width: 680px;
  }
}
