/* ==========================================================================
   gmp Academy — student portal stylesheet (clean rewrite)
   Structure: 1 tokens · 2 base · 3 shell (sidebar/header/main) · 4 components
              5 utilities · 6 responsive · 7 motion/a11y
   Rules: no !important, no selectors that depend on inline-style text,
          one source of truth per value. Theme = html[data-theme], sidebar
          state = html[data-sidebar], both set by an inline <head> script.
   ========================================================================== */

/* 1. TOKENS ------------------------------------------------------------- */
:root {
  /* brand (names kept: the HTML references these in inline styles) */
  --primary-blue: #0b70bf;
  --primary-green: #48a600;
  --action-green: #58cc02;
  --primary-yellow: #ffcc00;
  --primary-orange: #ff9500;
  --primary-purple: #8b5cf6;
  --success-green: #15803d;
  --warning-yellow: #fbbf24;
  --danger-red: #dc2626;
  --error-red: var(--danger-red);
  --info-blue: #0ea5e9;

  /* surfaces + text (light) */
  --surface-page: linear-gradient(135deg, #e7edf4 0%, #d7e1ec 100%);
  --surface-card: #ffffff;
  --surface-raised: #f6f9fc;
  --border-raised: #c5d0dd;
  --background-light: #f1f5f9;      /* inner panels used inline */
  --bg-secondary: #ffffff;           /* was undefined in the old CSS */
  --surface-input: #ffffff;
  --border-color: #cbd5e1;
  --border-strong: #9aaabd;
  --text-primary: #172235;
  --text-secondary: #435268;
  --text-muted: #5f6f84;

  /* chrome */
  --chrome-bg: #1b2838;
  --chrome-text: #e2e8f0;
  --chrome-text-dim: #b8c4d4;
  --chrome-hover: rgba(255, 255, 255, .09);

  /* spacing / radius / elevation */
  --spacing-xs: .25rem; --spacing-sm: .5rem; --spacing-md: 1rem;
  --spacing-lg: 1.5rem; --spacing-xl: 2rem;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .08);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, .14);

  --gradient-hero: linear-gradient(135deg, #176ac4 0%, #237b38 100%);
  --gradient-title: linear-gradient(90deg, #1267aa 0%, #247b31 100%);
  --surface-title-strip: #e2e8f0;
  --gradient-title-bg: linear-gradient(135deg, #4792FA 0%, #53C53C 100%);
  --gradient-continue: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);

  /* layout (single source of truth for the shell) */
  --sidebar-w: 250px;
  --header-h: 60px;
  --ease: .28s cubic-bezier(.4, 0, .2, 1);
  --focus: 0 0 0 3px rgba(24, 144, 255, .55);

  color-scheme: light;
}
html[data-theme="dark"], .student-dashboard .student-dashboard-top {
  --primary-blue: #1890ff;
  --primary-green: #58cc02;
  --success-green: #16a34a;
  --gradient-hero: linear-gradient(135deg, #1d6fd8 0%, #2f9e44 100%);
  --gradient-title: linear-gradient(90deg, #4792FA 0%, #53C53C 100%);
  --surface-title-strip: var(--surface-card);
  --surface-page: linear-gradient(135deg, #2B3546 0%, #222937 100%);
  --surface-card: #1e2b40;
  --surface-raised: #344256;
  --border-raised: #4a5870;
  --background-light: #2b3a52;
  --bg-secondary: #1e293b;
  --surface-input: #162033;
  --border-color: #34445e;
  --border-strong: #4b5d7a;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 22px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
html[data-sidebar="collapsed"] { --sidebar-w: 72px; }

/* 2. BASE --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.5;
  background: var(--surface-page); color: var(--text-primary);
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: 1.85rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.2rem; } h4 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary-blue); }
img { max-width: 100%; }
small { font-size: .8125rem; }
button { font: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 400; background: #fff; color: #000; padding: .5rem 1rem; }
.skip-link:focus { left: 8px; }

/* 3. SHELL -------------------------------------------------------------- */
#header {
  position: fixed; top: 0; right: 0; left: var(--sidebar-w); height: var(--header-h);
  z-index: 140; display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem; background: var(--chrome-bg); color: var(--chrome-text);
  transition: left var(--ease);
}
#header .d-flex { gap: .75rem; }
#menuToggle, .theme-toggle {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-md); background: transparent; color: var(--chrome-text);
  font-size: 1.05rem; cursor: pointer;
}
#menuToggle:hover, .theme-toggle:hover { background: var(--chrome-hover); }
#header :focus-visible { box-shadow: 0 0 0 3px rgba(255, 204, 0, .75); }

.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.breadcrumb-item a { color: var(--chrome-text-dim); text-decoration: none; }
.breadcrumb-item a:hover { color: #fff; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; margin-right: .5rem; color: var(--chrome-text-dim); }
.breadcrumb-item.active { color: #fff; font-weight: 600; }

.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; user-select: none;
}
.gm-dropdown {
  position: fixed; right: 1rem; top: var(--header-h); min-width: 190px;
  max-width: calc(100vw - 2rem); max-height: calc(100vh - var(--header-h) - .5rem);
  overflow-y: auto; padding: .35rem;
  background: var(--surface-card); border: 1px solid var(--border-color); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); display: none; z-index: 500;
}
.user-menu.open .gm-dropdown { display: block; }
.gm-dropdown a { display: block; padding: .55rem .75rem; border-radius: var(--radius-sm); color: var(--text-primary); text-decoration: none; }
.gm-dropdown a:hover { background: var(--background-light); }

.wrapper { display: block; min-height: 100vh; }

#sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 110;
  display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto;
  background: var(--chrome-bg); color: var(--chrome-text);
  transition: width var(--ease), transform var(--ease);
}
.logo { display: flex; align-items: center; gap: .75rem; height: var(--header-h); padding: 0 1rem; flex: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.logo-img { width: 64px; height: 54px; border-radius: 6px; padding: 2px; background: transparent; object-fit: contain; flex: none; }
.logo-text { font-weight: 400; font-size: .9rem; color: #fff; white-space: nowrap; }
.sidebar-header { display: none; }
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; padding: .55rem .5rem; }
.nav-item {
  display: flex; align-items: center; gap: .85rem; padding: .52rem .85rem; border-radius: var(--radius-md);
  color: var(--chrome-text-dim); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-item i { width: 22px; text-align: center; font-size: 1rem; flex: none; }
.nav-item:hover { background: var(--chrome-hover); color: #fff; }
.nav-item.active { background: var(--primary-yellow); color: #1b2838; font-weight: 600; }
.nav-item.active:hover { background: var(--primary-yellow); color: #1b2838; }
#sidebar :focus-visible { box-shadow: 0 0 0 3px rgba(255, 204, 0, .75); }

/* collapsed: labels hidden, icons centered, native title="" gives the tooltip */
html[data-sidebar="collapsed"] .logo { justify-content: center; padding: 0; }
html[data-sidebar="collapsed"] .logo-text,
html[data-sidebar="collapsed"] .nav-label { display: none; }
html[data-sidebar="collapsed"] .nav-item {
  justify-content: center; padding-left: 0; padding-right: 0; font-size: 0;
}
html[data-sidebar="collapsed"] .nav-item > i { font-size: 1rem; }
html[data-sidebar="collapsed"] .nav-item .nav-arrow { display: none; }
html[data-sidebar="collapsed"] #sidebar .submenu { display: none; }
html[data-sidebar="collapsed"] #sidebar .submenu:not([hidden]) {
  position: static; display: flex; flex-direction: column; align-items: center; gap: .15rem;
  width: 100%; padding: .2rem 0 .35rem;
}
html[data-sidebar="collapsed"] #sidebar .submenu .sub-item {
  justify-content: center; width: 36px; height: 32px; min-height: 32px; padding: 0;
  font-size: 0; border-radius: var(--radius-sm);
}
html[data-sidebar="collapsed"] #sidebar .submenu .sub-item i { width: auto; font-size: .82rem; }


.main-content {
  margin-left: var(--sidebar-w); padding-top: calc(var(--header-h) + 1rem); min-height: 100vh; min-width: 0;
  transition: margin-left var(--ease);
}
.container { width: 100%; max-width: 1200px; margin: 0 auto; }
.container.full-width { max-width: none; }

/* 4. COMPONENTS --------------------------------------------------------- */
.card {
  background: var(--surface-card); color: var(--text-primary);
  border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); margin-bottom: 1.25rem;
}
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.card-body { padding: 1.25rem; }
.card-compact { padding: .75rem 1rem; background: var(--surface-raised); border-radius: var(--radius-lg); }
.shadow-hover { transition: box-shadow .2s; }
.shadow-hover:hover { box-shadow: var(--shadow-md); }

/* Gradient hero cards use the same blue-to-green treatment in both themes. */
.card.bg-gradient-hero { background: var(--gradient-title-bg); border-color: transparent; color: #fff; }
.card.bg-gradient-hero h1, .card.bg-gradient-hero h2, .card.bg-gradient-hero h3,
.card.bg-gradient-hero h4, .card.bg-gradient-hero p { color: #fff; }
.card.bg-gradient-hero .btn-modern { color: #fff; }
.hero-inner { position: relative; z-index: 2; padding: 2rem; color: #fff; }

.text-gradient { color: var(--primary-blue); background: var(--gradient-title); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) { .text-gradient { background: none; -webkit-text-fill-color: currentColor; } }

/* buttons */
.btn-modern, .nav-btn, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.1rem; border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--background-light); color: var(--text-primary);
  font-weight: 600; font-size: .9rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: filter .15s, box-shadow .15s;
}
.btn-modern:hover, .nav-btn:hover { filter: brightness(1.07); box-shadow: var(--shadow-sm); }
.btn-sm { padding: .35rem .7rem; font-size: .8125rem; }
.btn-modern-primary { background: var(--primary-blue); color: #fff; }
.btn-modern-secondary { background: var(--gradient-continue); color: #1f2937; }
.btn-modern-success { background: var(--success-green); color: #fff; }
.btn-modern-info { background: var(--info-blue); color: #fff; }
.btn-modern-danger { background: var(--danger-red); color: #fff; }
.nav-btn.active { background: var(--primary-yellow); color: #1b2838; }
.modern-nav-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* metrics */
.modern-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.modern-metric-card { position: relative; overflow: hidden; background: var(--surface-raised); border: 1px solid var(--border-raised); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); }
.modern-metric-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--primary-blue), var(--primary-green), var(--primary-yellow)); }
.metric-header { margin-bottom: .75rem; }
.metric-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: var(--primary-blue); color: #fff; font-size: 1.05rem; }
.metric-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.metric-label { color: var(--text-secondary); font-size: .875rem; margin-top: .15rem; }

/* grids + horizontal cards */
.cards-grid { display: grid; gap: 1rem; margin-bottom: 1.25rem; grid-template-columns: minmax(0, 1fr); }
.cards-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.cards-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cards-grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.course-cards-horizontal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.card-horizontal { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--surface-raised); border: 1px solid var(--border-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-icon { flex: none; width: 48px; height: 48px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: var(--primary-blue); color: #fff; font-size: 1.15rem; }
.card-content { flex: 1; min-width: 0; }
.card-title { margin: 0 0 .2rem; font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.card-description { margin: 0; font-size: .875rem; color: var(--text-secondary); }
.card-actions { flex: none; display: flex; align-items: center; gap: .5rem; }
.stats-grid { margin-bottom: 0; }

/* course cards */
.course-card-modern { display: flex; background: var(--surface-raised); border: 1px solid var(--border-raised); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.course-image { flex: 0 0 120px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-blue), var(--primary-green)); color: #fff; font-size: 2.2rem; }
.course-content { flex: 1; min-width: 0; padding: 1.25rem; }
.course-header h4 { margin: 0 0 .15rem; font-size: 1.5rem; }
.course-card-modern .btn-modern-secondary { background: linear-gradient(135deg, #ffb21c, #ef4444); color: #fff; }
html[data-theme="dark"] .course-card-modern { background: #2b2b2b; border-color: #424242; }
.course-meta { font-size: .8125rem; color: var(--text-muted); margin-bottom: .75rem; }
.progress-section { margin-top: .5rem; }
.module-progress-grid > .card-compact { display: flex; align-items: center; gap: 1rem; min-width: 0; box-shadow: var(--shadow-sm); }
.module-progress-content { flex: 1; min-width: 0; text-align: center; }
.activity-list { display: grid; gap: var(--spacing-md); }
.activity-item { padding: var(--spacing-md); background: var(--surface-raised); border: 1px solid var(--border-raised); border-radius: var(--radius-lg); }
.profile-progress-summary { padding: 1.5rem; background: var(--surface-raised); border: 1px solid var(--border-raised); border-radius: var(--radius-lg); }

/* progress */
.progress-bar-modern, .progress { height: 8px; border-radius: 999px; background: var(--border-color); overflow: hidden; margin: .4rem 0; }
.progress-fill, .progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-blue), var(--primary-green)); }

/* badges */
.status-badge, .badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }

/* forms */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.form-control { width: 100%; padding: .6rem .8rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-input); color: var(--text-primary); font: inherit; }
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { outline: none; border-color: var(--primary-blue); box-shadow: var(--focus); }
.form-text { display: block; margin-top: .25rem; font-size: .8125rem; color: var(--text-muted); }
.row { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; }
.page-pad { padding: 2rem; }

/* toggle switch (markup: label.switch > input + span.slider) */
.switch { position: relative; display: inline-block; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.slider { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .2s; }
.slider::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + .slider { background: var(--success-green); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { box-shadow: var(--focus); }

/* 5. UTILITIES (the ones the markup actually uses) ---------------------- */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: 1rem; } .gap-4 { gap: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-3 { margin-bottom: 1rem; }

/* 6. RESPONSIVE --------------------------------------------------------- */
.sidebar-backdrop { display: none; }
@media (max-width: 768px) {
  :root, html[data-sidebar="collapsed"] { --sidebar-w: 0px; }
  #sidebar { width: 250px; transform: translateX(-100%); }
  html[data-sidebar-open] #sidebar { transform: none; box-shadow: var(--shadow-md); }
  html[data-sidebar="collapsed"] .logo { justify-content: flex-start; padding: 0 1rem; }
  html[data-sidebar="collapsed"] .logo-text, html[data-sidebar="collapsed"] .nav-label { display: inline; }
  html[data-sidebar="collapsed"] .nav-item { justify-content: flex-start; padding: .7rem .85rem; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 105; background: rgba(15, 23, 42, .55); }
  html[data-sidebar-open] .sidebar-backdrop { display: block; }
  .page-pad { padding: 1rem; }
  .row-2, .row-split { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .main-content .d-flex { flex-wrap: wrap; }
  .card-horizontal { flex-wrap: wrap; }
  .course-card-modern { flex-direction: column; }
  .course-image { flex-basis: 90px; }
  .breadcrumb-item:first-child { display: none; }
  .breadcrumb-item + .breadcrumb-item::before { display: none; }
}

/* 7. MOTION / A11Y ------------------------------------------------------ */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.animate-fade-in-up, .animate-slide-in-right, .animate-slide-in-left, .animate-slide-in-down { animation: rise .32s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none; transition: none; scroll-behavior: auto; }
}


/* Dashboard layout aligned with the reference card structure. */
@media (min-width: 769px) {
  .container.page-pad > .card.bg-gradient-hero .hero-inner { padding: 1.5rem 2rem; }
  .container.page-pad > .card.bg-gradient-hero .hero-inner > .d-flex { gap: 1.5rem; }
  .container.page-pad > .card.bg-gradient-hero .hero-inner > .d-flex > .d-flex:first-child { flex: 1; min-width: 0; }
  .container.page-pad > .card.bg-gradient-hero .hero-inner > .d-flex > .d-flex:first-child > div:last-child { min-width: 0; flex: 1; }
  .container.page-pad > .card.bg-gradient-hero .hero-inner > .d-flex > .d-flex:last-child { flex: none; }

  .container.page-pad > .modern-metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
  .modern-metric-card { min-height: 165px; padding: 1.5rem 1rem; text-align: center; }
  .metric-header { display: flex; justify-content: center; margin-bottom: 1rem; }
  .metric-value { color: var(--primary-blue); background: var(--gradient-hero); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: 2rem; }

  .container.page-pad > .card .card-body > .cards-grid-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .container.page-pad > .cards-grid-1 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .container.page-pad > .cards-grid-1 > .card-horizontal { min-width: 0; padding: 1rem; }
  .container.page-pad > .card:last-child .card-header { text-align: center; }
}

@media (min-width: 769px) and (max-width: 1050px) {
  .container.page-pad > .modern-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .container.page-pad > .modern-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container.page-pad > .card .card-body > .cards-grid-1,
  .container.page-pad > .cards-grid-1 { grid-template-columns: 1fr; }
  .modern-metric-card { text-align: center; }
  .metric-header { display: flex; justify-content: center; }
  .container.page-pad > .card:last-child .card-header { text-align: center; }
}


/* Admin student management uses the shared portal card language. */
.admin-students-page .main-content .card .card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  margin-bottom: 0;
}
.admin-students-page .admin-nav-tabs-container { align-items: center; gap: .25rem; }
.admin-students-page .admin-nav-tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .45rem;
  padding: .75rem .9rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.admin-students-page .admin-nav-tab:hover { background: var(--surface-raised); color: var(--text-primary); }
.admin-students-page .admin-nav-tab.active { background: var(--primary-blue); color: #fff; }
.admin-students-page .admin-more-btn { border: 0; background: var(--surface-raised); color: var(--text-primary); cursor: pointer; }
.admin-students-page .scroll-fade-left,
.admin-students-page .scroll-fade-right { display: none; }
.admin-students-page .admin-student-actions { margin-bottom: 1.25rem; }
@media (max-width: 768px) {
  .admin-students-page .admin-student-actions { grid-template-columns: 1fr; }
  .admin-students-page .admin-nav-tab { padding: .65rem .75rem; }
}


/* Keep information-dense class and module cards readable in multi-column grids. */
.info-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: .75rem 1rem;
}
.info-card > .card-icon { grid-column: 1; grid-row: 1; margin-top: .15rem; }
.info-card > .card-content { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; }
.info-card .card-content > .card-actions { display: flex; justify-content: flex-end; margin-top: .75rem; min-width: 0; }
.info-card .card-actions .btn-modern { white-space: nowrap; }
.info-card-heading { flex-wrap: wrap; align-items: flex-start; gap: .45rem .75rem; }
.info-card-heading .card-title { flex: 1 1 130px; min-width: 0; }
.info-card-heading .status-badge { flex: 0 0 auto; }
.info-card-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.info-card-meta > div { min-width: 0; }
.info-card-meta span { overflow-wrap: anywhere; }


/* Download resources need room for their title, metadata, and action. */
.downloads-resource-grid .card-horizontal {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: .75rem 1rem;
}
.downloads-resource-grid .card-icon { grid-column: 1; grid-row: 1; }
.downloads-resource-grid .card-content { grid-column: 2; grid-row: 1; width: 100%; }
.downloads-resource-grid .card-content > .d-flex { flex-wrap: wrap; gap: .5rem 1rem !important; }
.downloads-resource-grid .card-actions { grid-column: 2; grid-row: 2; justify-content: flex-start; margin-top: .15rem; }
@media (max-width: 480px) {
  .downloads-resource-grid .card-horizontal { grid-template-columns: 40px minmax(0, 1fr); gap: .75rem; padding: .9rem; }
  .downloads-resource-grid .card-icon { width: 40px; height: 40px; }
}

/* Keep nested admin navigation aligned with the primary sidebar links. */
#sidebar .submenu {
  list-style: none;
  margin: 0;
  padding: .1rem .25rem .4rem 1.1rem;
}
#sidebar .submenu[hidden] { display: none; }
#sidebar .submenu li { list-style: none; margin: 0; padding: 0; }
#sidebar .submenu .sub-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .7rem;
  border-radius: var(--radius-md);
  color: var(--chrome-text-dim);
  font-size: .86rem;
  line-height: 1.25;
  text-decoration: none;
  transition: background .15s, color .15s;
}
#sidebar .submenu .sub-item i { flex: none; width: 18px; text-align: center; }
#sidebar .submenu .sub-item:hover,
#sidebar .submenu .sub-item.active { background: var(--chrome-hover); color: #fff; }


/* Progress activity cards flow in two or three columns as space allows. */
.progress-activity-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); align-items: stretch; }
.progress-activity-grid .activity-item { display: grid !important; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: .5rem .75rem !important; min-width: 0; padding: .9rem; }
.progress-activity-grid .activity-item > div:first-child { grid-column: 1; grid-row: 1 / span 2; }
.progress-activity-grid .activity-item > div:nth-child(2) { grid-column: 2; grid-row: 1; min-width: 0; }
.progress-activity-grid .activity-item > div:last-child { grid-column: 2; grid-row: 2; display: flex; align-items: baseline; gap: .4rem; flex: none; text-align: left !important; }
.progress-activity-grid .activity-item > div:last-child > div { font-size: .95rem !important; }

/* Certificate cards keep their icon at left and group status/actions beneath progress. */
.certificate-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); }
.certificate-info-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: .75rem 1rem; }
.certificate-info-card > .card-icon { grid-column: 1; grid-row: 1; margin-top: .2rem; }
.certificate-info-card > .card-content { grid-column: 2; min-width: 0; width: 100%; }
.certificate-card-title { margin: -.25rem 0 .75rem; padding: .65rem .75rem; border-radius: var(--radius-md); background: var(--surface-title-strip); line-height: 1.3; }
.certificate-card-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem !important; margin-top: .65rem; color: var(--text-secondary); font-size: .875rem; }
.certificate-card-meta i { margin-right: .3rem; }
.certificate-progress { height: 6px; margin: .75rem 0 .6rem; }
.certificate-card-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; }
.certificate-info-card .btn-modern { white-space: nowrap; }
.certificate-in-progress { opacity: .82; }
.certificate-locked { opacity: .68; }
html[data-theme="light"] .certificate-in-progress { opacity: 1; }
html[data-theme="light"] .certificate-locked { opacity: 1; background: var(--surface-raised); }
.card.portal-title-banner { background: var(--gradient-title-bg); }

/* Keep account fields compact while letting the rest of the settings page use full width. */
.account-settings-card { max-width: 780px; }
.account-settings-card form { max-width: 440px; }
.account-settings-card .form-group { margin-bottom: .8rem; }
.account-settings-card .form-control { min-height: 42px; }
@media (max-width: 560px) {
  .certificate-card-grid { grid-template-columns: 1fr; }
  .certificate-info-card { grid-template-columns: 40px minmax(0, 1fr); gap: .65rem .75rem; padding: .9rem; }
  .certificate-info-card > .card-icon { width: 40px; height: 40px; }
  .certificate-card-footer { align-items: flex-start; }
  .account-settings-card { max-width: none; }
  .account-settings-card form { max-width: none; }
}


/* At narrow desktop widths, keep the admin student actions inside their header. */
.admin-students-page .admin-student-page-heading { padding: 1.15rem 1.25rem; }
.admin-students-page .admin-student-page-heading > .card { padding: 0; }
.admin-students-page .admin-student-page-heading .d-flex { min-width: 0; }
.admin-students-page .admin-student-page-heading .d-flex > div:first-child { min-width: 0; flex: 1 1 260px; }
.admin-students-page .admin-student-page-heading .d-flex > div:last-child { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1050px) {
  .admin-students-page .admin-student-page-heading > .card > .d-flex { align-items: flex-start; flex-wrap: wrap; }
  .admin-students-page .admin-student-page-heading .d-flex > div:last-child { flex: 1 1 100%; justify-content: flex-start; }
}


/* Preserve locked-state meaning without washing the card out in light mode. */
.course-module-locked { opacity: .6; }
html[data-theme="light"] .course-module-locked { opacity: 1; background: var(--surface-raised); }


/* The profile mini-stat tints need enough separation from their parent panel in light mode. */
.profile-stat-tile { text-align: center; padding: .5rem; border-radius: var(--radius-md); font-size: .75rem; }
.profile-stat-streak { background: rgba(255, 107, 53, .1); }
.profile-stat-study { background: rgba(0, 123, 255, .1); }
html[data-theme="light"] .profile-stat-streak { background: #fff1e8; border: 1px solid #fdba74; }
html[data-theme="light"] .profile-stat-study { background: #e5f1ff; border: 1px solid #93c5fd; }
html[data-theme="light"] .profile-stat-streak > div:first-child { color: #b54708; }

/* Admin data tables should use the available card width on wide screens. */
.admin-page .card-body table, #mainContent .card-body table { width: 100%; }

#mainContent .card-body table th,
#mainContent .card-body table td { text-align: center; vertical-align: middle; }
#mainContent .card-body table tbody td:first-child { text-align: left; }
#mainContent .card-body table tbody td:first-child small { display: block; text-align: left; }
#mainContent .card-body table { width: 100%; table-layout: auto; }

/* The welcome banner and stats keep the same palette in both themes. */
.student-dashboard .student-dashboard-top { --primary-orange: #ff9500; }
.student-dashboard .student-dashboard-top .modern-metric-card { color: var(--text-primary); }
.student-dashboard .student-gradient-banner .dashboard-resume-link { background: #0b5792; }
.student-dashboard .student-gradient-banner .dashboard-courses-link {
    background: #eef5ff;
    color: #17365b;
}

/* Student dashboard learning journey */
.student-journey { margin-bottom: 1.5rem; }
.student-journey > .card-body { padding: clamp(.75rem, 3vw, 1.25rem); }
.student-learning-path {
    --trail-line: var(--border-strong);
    --trail-accent: var(--primary-blue);
    display: grid;
    gap: .75rem;
    max-width: 60rem;
    margin-inline: auto;
    container-type: inline-size;
}
.student-path-banner {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 12rem;
    padding: clamp(1rem, 3vw, 1.75rem);
    border-radius: var(--radius-lg);
    background: linear-gradient(115deg, #17473c, #208258);
    color: #fff;
}
.student-path-intro { position: relative; z-index: 1; width: 100%; min-width: 0; }
.student-path-eyebrow { color: #bcefe3; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.student-path-banner h2 { margin: .35rem 0 .4rem; color: inherit; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.16; }
.student-path-banner p { margin: 0; color: #e2f6f3; }
.student-path-progress { display: grid; gap: .35rem; margin-top: .85rem; }
.student-path-progress label { font-size: .875rem; font-weight: 600; }
.student-path-progress progress {
    appearance: none;
    display: block;
    width: 100%;
    height: .6rem;
    overflow: hidden;
    border: 1px solid #a8c2df;
    border-radius: 999px;
    background: #132b48;
}
.student-path-progress progress::-webkit-progress-bar { background: #132b48; }
.student-path-progress progress::-webkit-progress-value { background: #d4f9e6; }
.student-path-progress progress::-moz-progress-bar { background: #d4f9e6; }
.student-path-stats { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.student-path-stats > * { padding: .35rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.student-path-stats strong { background: #102f43; }
.student-path-scene { position: absolute; inset: auto 0 0 auto; width: min(70%, 320px); opacity: .26; pointer-events: none; }
.student-path-scene svg { display: block; width: 100%; height: auto; }
.student-path-scene img { position: absolute; inset: auto 5% 3% auto; width: 38%; height: auto; }

.student-path-stage {
    --stage-icon-bg: #d7f5e9;
    --stage-icon-fg: #16634e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
}
.student-path-stage:nth-of-type(3n + 2) { --stage-icon-bg: #e8ddfd; --stage-icon-fg: #58399c; }
.student-path-stage:nth-of-type(3n + 3) { --stage-icon-bg: #fbe8bf; --stage-icon-fg: #88460b; }
.student-path-stage-current { border-color: var(--trail-accent); }
.student-path-stage summary {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 4.75rem;
    padding: .55rem .8rem;
    border-radius: inherit;
    cursor: pointer;
    list-style: none;
}
.student-path-stage summary::-webkit-details-marker { display: none; }
.student-path-stage summary:hover { background: var(--surface-input); }
.student-path-stage[open] summary { border-bottom: 1px solid var(--border-color); border-end-start-radius: 0; border-end-end-radius: 0; }
.student-path-stage-icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-md);
    background: var(--stage-icon-bg);
    color: var(--stage-icon-fg);
}
.student-path-stage-label { flex: 1; min-width: 0; }
.student-path-stage-label strong, .student-path-stage-label small { display: block; }
.student-path-stage-label small { color: var(--text-secondary); }
.student-path-stage-done { color: var(--text-primary); font-size: .8rem; }
.student-path-mascot { display: none; flex: none; object-fit: contain; }
.student-path-chevron { flex: none; color: var(--text-secondary); }
.student-path-stage[open] .student-path-chevron { transform: rotate(180deg); }

.student-path-list {
    position: relative;
    display: grid;
    gap: .45rem;
    margin: 0;
    padding: .65rem .65rem .65rem 1.5rem;
    list-style: none;
}
.student-path-list::before {
    position: absolute;
    inset-block: .65rem;
    inset-inline-start: .75rem;
    border-inline-start: 2px dashed var(--trail-line);
    content: '';
}
.student-path-step { position: relative; display: flex; min-width: 0; }
.student-path-step::before {
    position: absolute;
    inset: 50% auto auto -.75rem;
    width: .75rem;
    border-top: 2px solid var(--trail-line);
    content: '';
}
.student-path-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    min-width: 0;
    padding: .5rem .65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    color: var(--text-primary);
    text-decoration: none;
}
.student-path-link:hover, .student-path-link:focus-visible { border-color: var(--trail-accent); color: var(--text-primary); }
.student-path-topic { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.student-path-topic strong, .student-path-topic small { display: block; }
.student-path-topic small { color: var(--text-secondary); }
.student-path-number {
    display: grid;
    place-items: center;
    flex: 0 0 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--text-primary);
    font-weight: 700;
}
.student-path-step-icon { flex: none; color: var(--text-secondary); }
.student-path-complete .student-path-number { background: #49db92; color: #092719; }
.student-path-link[aria-current="step"] {
    border-color: var(--trail-accent);
    box-shadow: inset 3px 0 var(--trail-accent);
    scroll-margin-top: calc(var(--header-h) + 1rem);
}
.student-path-link[aria-current="step"] .student-path-number { background: #1d57a5; color: #fff; }
.student-path-marker {
    display: inline-block;
    margin-bottom: .15rem;
    padding: .1rem .4rem;
    border-radius: 999px;
    background: #fde68a;
    color: #452c06;
    font-size: .72rem;
    font-weight: 700;
}
.student-path-finish { display: flex; justify-content: center; align-items: center; gap: .5rem; padding-block: .25rem; }
.student-path-finish > i { color: #d29912; }
.student-path-finish a { color: var(--text-primary); text-underline-offset: .2em; font-weight: 700; }

@container (min-width: 16rem) {
    .student-path-mascot { display: block; width: 2.5rem; height: 2.5rem; }
}
@container (max-width: 24rem) {
    .student-path-stage-done { display: none; }
}
@container (min-width: 24rem) {
    .student-path-mascot { width: 3.625rem; height: 3.625rem; }
}
@container (min-width: 38rem) {
    .student-path-banner { padding-inline-end: 18rem; }
    .student-path-scene { width: 18rem; opacity: 1; }
    .student-path-list { padding-inline: 1rem; }
    .student-path-list::before { inset-inline-start: 50%; }
    .student-path-step:nth-child(even) { justify-content: flex-end; }
    .student-path-step::before { inset-inline-start: calc(50% - 1rem); width: 1rem; }
    .student-path-step:nth-child(even)::before { inset-inline-start: 50%; }
    .student-path-link { width: calc(50% - 1rem); }
}

/* Higher-contrast palette for the student dashboard in light mode. */
html[data-theme="light"] .student-dashboard {
    --gradient-title: linear-gradient(90deg, #174876, #185638);
    --primary-blue: #155293;
    --primary-green: #1c6842;
    --success-green: #17653b;
    --primary-orange: #a3440b;
    --surface-raised: #e9f0f8;
    --border-color: #a5b6c8;
    --border-raised: #8b9fb6;
    --border-strong: #607e9d;
    --text-primary: #13243a;
    --text-secondary: #334963;
    --shadow-sm: 0 2px 4px rgba(19, 36, 58, .11);
    background: linear-gradient(135deg, #dee8f3, #ccd8e8);
}
html[data-theme="light"] .student-dashboard .student-path-stage { border-color: var(--border-raised); }
html[data-theme="light"] .student-dashboard .student-path-stage-current {
    background: #dfedfc;
    border-color: var(--trail-accent);
}
html[data-theme="light"] .student-dashboard .student-path-link[aria-current="step"] {
    background: #f5faff;
}

/* Logos sit on dark login and navigation surfaces in both themes. */
.login-header .logo-img, #sidebar .logo-img, #header .logo-img {
  content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20540%20460%22%20width%3D%22540%22%20height%3D%22460%22%20xmlns%3Ac2pa%3D%22http%3A%2F%2Fc2pa.org%2Fmanifest%22%3E%0A%20%20%3Ctitle%3EFlu%C3%AAncia%3C%2Ftitle%3E%0A%20%20%3Cg%20id%3D%22accent%22%3E%0A%20%20%20%20%3Cpath%20id%3D%22wave-yellow%22%20fill%3D%22%23FFCC00%22%20d%3D%22M320.23%2071.5L320.23%2079.3C304.91%2084.09%20288.81%2088.87%20272.7%2084.64C254.94%2079.97%20243.1%2064.95%20223.84%2064.16C216.64%2063.87%20208.83%2067.37%20202.13%2069.63C201.98%2067.34%20202.72%2065.72%20204.41%2064.17C212.31%2061.24%20220.77%2058.08%20229.22%2059.81C239.63%2061.93%20252.64%2073.23%20265.8%2076.37C285.25%2081.01%20301.02%2076.63%20319.41%2070.73Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22wave-black%22%20fill%3D%22%23fff%22%20d%3D%22M204.41%2064.17C208.36%2060.72%20212.6%2056.51%20216.99%2053.55C222.77%2049.63%20231.47%2047.55%20238.31%2049.41C247.97%2052.04%20255.64%2059.92%20265.83%2061.76C280.48%2064.41%20290.96%2061.16%20304.87%2057.24L319.41%2070.73C301.02%2077.03%20285.25%2081.41%20265.8%2076.77C252.64%2073.63%20239.63%2062.33%20229.22%2060.21C220.77%2058.48%20212.31%2061.64%20204.41%2064.17Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Cg%20id%3D%22wordmark%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-F%22%20d%3D%22M3.47%20451L3.47%209.5L47.72%209.5L47.72%2049.17L26.99%2049.17L26.99%20210.5L47.72%20210.5L47.72%20250.17L26.99%20250.17L26.99%20451L3.47%20451Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-L%22%20d%3D%22M97.72%20365L53.47%20365L53.47%20100.83L76.99%20100.83L76.99%20341.16L97.72%20341.16L97.72%20365Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-U%22%20d%3D%22M114.47%20100.83L137.99%20100.83L137.99%20332.74C137.99%20333.26%20138.68%20334.56%20138.85%20335.15C140.56%20340.98%20145.37%20342.46%20151.05%20341.32C153.26%20340.87%20155.59%20339.75%20156.66%20337.64C157.03%20336.91%20157.29%20336.1%20157.58%20335.34C157.71%20334.99%20158.25%20334.06%20158.24%20334.43L158.9%20319.48L158.72%20318.98L158.72%20100.83L182.07%20100.83L182.07%20339.03C182.07%20339.08%20181.25%20341.51%20181.16%20341.95C179.25%20351.39%20175.28%20357.55%20166.54%20361.9C166.12%20362.1%20161.46%20364.02%20161.44%20364.02L148.04%20365.25C147.48%20365.3%20143.97%20364.92%20143.02%20364.87C130.61%20364.25%20121.66%20359.75%20117.01%20347.79C116.4%20346.2%20116.08%20344.66%20115.66%20343.02C115.56%20342.66%20115.12%20342.44%20115.1%20342.07L114.3%20325.13L114.47%20324.62L114.47%20100.83Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-E%22%20d%3D%22M199.47%20365L199.47%20100.83L243.96%20100.83L243.96%20124.5L222.99%20124.5L222.99%20221L243.96%20221L243.96%20244.84L222.99%20244.84L222.99%20341.16L243.96%20341.16L243.96%20365L199.47%20365Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-N%22%20d%3D%22M306.21%20365L283.91%20220.17L283.91%20365L261.47%20365L261.47%20100.83L283.86%20100.83L306.13%20243.01L306.13%20100.83L329.07%20100.83L329.07%20365L306.21%20365Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-C%22%20d%3D%22M413.06%20196L389.71%20196L389.71%20130.52C389.71%20129.99%20388.76%20126.82%20388.46%20126.17C385.92%20120.58%20381.07%20119.98%20375.49%20120.99C373.16%20121.42%20371.32%20123.1%20370.38%20125.21C370.05%20125.96%20369.75%20126.74%20369.49%20127.52C369.38%20127.86%20369%20128.82%20369%20128.46L369%20332.94C369%20333.01%20369.81%20335%20369.9%20335.34C371.57%20341.06%20376.77%20342.47%20382.24%20341.27C384.46%20340.79%20386.74%20339.61%20387.74%20337.46C388.09%20336.72%20388.37%20335.92%20388.65%20335.15C388.78%20334.81%20389.28%20333.86%20389.26%20334.23L389.89%20319.28L389.71%20318.77L389.71%20266L413.06%20266L413.06%20339.52C413.06%20339.74%20412.72%20339.81%20412.62%20340C412.34%20340.49%20412.27%20341.4%20412.16%20341.95C410.25%20351.39%20406.29%20357.55%20397.54%20361.89C396.99%20362.17%20392.16%20364.11%20391.95%20364.12L378.54%20365.24L378%20365.22L365.6%20363.95C365.45%20363.94%20361.44%20362.27%20360.97%20362.04C352.87%20358.13%20348.74%20352.21%20346.77%20343.5C346.68%20343.07%20345.78%20340.6%20345.78%20340.6L345.35%20309.62L345.48%20309.12L345.48%20126.64C345.48%20126.14%20345.84%20125.26%20345.87%20124.64C346.45%20113.87%20350.8%20104.89%20360.68%2099.98C361.22%2099.71%20366.07%2097.86%20366.31%2097.84L380.23%2096.77L380.77%2096.78L392.66%2098.09C392.91%2098.12%20396.77%2099.71%20397.31%2099.95C405.96%20103.95%20410.3%20110.56%20412.1%20119.79C412.24%20120.5%20412.33%20121.58%20412.66%20122.22C412.75%20122.41%20413.06%20122.49%20413.06%20122.7L413.06%20196Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-I%22%20d%3D%22M430.48%20365L430.48%20100.83L453.99%20100.83L453.99%20365L430.48%20365Z%22%2F%3E%0A%20%20%20%20%3Cpath%20id%3D%22letter-A%22%20d%3D%22M515.21%20365L512.38%20309.46L497.87%20331.09C497.63%20331.45%20493.81%20340.48%20493.76%20340.81L491.62%20354.07C491.55%20354.54%20491.79%20355.51%20491.74%20356.11C491.49%20359.08%20491.2%20362.04%20490.94%20365L469.35%20365L483.22%20100.83L523.13%20100.83L536.99%20365L515.21%20365ZM503.04%20136.25L494.76%20294.64L506.03%20275.54C506.14%20275.34%20507.33%20270.94%20507.55%20270.25C507.65%20269.9%20508.11%20269.7%20508.14%20269.33L509.4%20253.43L509.24%20252.91L503.04%20136.25Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
}

/* Student controls and list readability */
.btn-modern-success { background: var(--action-green); color: #fff; }
.btn-modern-success:disabled { opacity: .78; }
.user-menu-identity { padding: 8px 12px; font-weight: 700; color: var(--text-primary); border-bottom: 1px solid var(--border-color); margin-bottom: 4px; }
#studentsTableBody > tr + tr > td { border-top: 1px solid var(--border-color); }
.course-offer { margin-bottom: 1.5rem; }

.comment-admin-reply {
  margin: .65rem 0 0;
  padding: .6rem .8rem;
  border-inline-start: 3px solid var(--primary-blue);
  background: var(--background-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.comment-admin-reply p { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.course-offer-checkout > summary { display: inline-flex; list-style: none; }
.course-offer-checkout > summary::-webkit-details-marker { display: none; }
.course-payment-panel {
  margin-top: 1rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  max-width: 38rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--background-light);
  color: var(--text-primary);
}
.course-payment-panel h3 { margin: 0 0 .65rem; font-size: clamp(1.35rem, 4vw, 2rem); }
.course-payment-price { display: block; color: #397315; font-size: clamp(2rem, 8vw, 3.25rem); line-height: 1.15; }
[data-theme="dark"] .course-payment-price { color: #b9e887; }
.course-payment-button { background: #ffcb1f; color: #172033; }
.course-payment-panel [hidden] { display: none; }
.course-payment-panel [role="status"]:empty { display: none; }

/* Keep data rows distinct in both light and dark themes. */
table tbody tr + tr > td, table tbody tr + tr > th { border-top: 1px solid var(--border-color, #64748b); }
