/* ICT Expert LMS theme — Navy/Red · light/dark · shared shell, forms, tables, cards */

:root {
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(28, 28, 122, 0.10);
  --space: 1.25rem;
  --max: 1100px;
  color-scheme: light;
  --bg: #F4F5FA;
  --bg-accent: #E6E8F5;
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --muted: #5B6080;
  --border: #CDD1EE;
  --accent: #1C1C7A;
  --accent-hover: #16166A;
  --accent-soft: #E6E8F5;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --success: #059669;
  --success-soft: #D1FAE5;
  --warn: #D97706;
  --warn-soft: #FEF3C7;
  --header: #1C1C7A;
  --header-text: #FFFFFF;
  --nav-hover: rgba(255, 255, 255, 0.12);
  --focus: #E31E24;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080818;
  --bg-accent: #0E0E2A;
  --surface: #111130;
  --text: #E8EEFF;
  --muted: #7880B0;
  --border: #1E1E60;
  --accent: #6B6BCC;
  --accent-hover: #8888DD;
  --accent-soft: #0E0E3A;
  --danger: #F87171;
  --danger-soft: #3B1515;
  --success: #34D399;
  --success-soft: #0D2F20;
  --warn: #FBBF24;
  --warn-soft: #2D2010;
  --header: #06061A;
  --header-text: #E8EEFF;
  --nav-hover: rgba(255, 255, 255, 0.08);
  --focus: #E31E24;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1400px 500px at 15% -5%, var(--bg-accent), transparent 55%),
    var(--bg);
}

img,
iframe,
video {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
h2 { font-size: 1.2rem; margin-top: 1.8rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 20;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ── Site Header ── */
.site-header {
  background: var(--header);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0,0,0,0.18);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.brand {
  color: var(--header-text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.07rem;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366F1, #7C3AED);
  flex-shrink: 0;
  color: #fff;
}
.brand-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

.brand:hover {
  color: #fff;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem;
}

.site-nav a,
.theme-toggle {
  color: rgba(224, 231, 255, 0.78);
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.93rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.theme-toggle:hover {
  background: var(--nav-hover);
  color: #fff;
}

.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
}

.nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: 0.5rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Profile dropdown ── */
.nav-profile {
  position: relative;
}

.nav-profile-btn {
  color: var(--header-text);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  gap: 0.4rem;
  transition: background 0.15s;
}

.nav-profile-btn:hover {
  background: var(--nav-hover);
  color: #fff;
}

.nav-profile-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(79,70,229,0.05);
  z-index: 20;
  overflow: hidden;
}

.nav-profile-menu.is-open {
  display: block;
}

.nav-profile-name {
  display: block;
  padding: 0.6rem 0.9rem 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.nav-profile-menu a:not(.nav-profile-logout) {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: unset;
  border-radius: 0;
  transition: background 0.12s, color 0.12s;
}

.nav-profile-menu a:not(.nav-profile-logout):hover {
  background: var(--accent);
  color: #fff;
}

.nav-profile-menu .nav-profile-logout {
  display: block;
  width: 100%;
  padding: 0.55rem 0.9rem;
  color: var(--danger);
  background: transparent;
  text-align: left;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: unset;
  border-radius: 0;
  transition: background 0.12s;
}

.nav-profile-menu .nav-profile-logout:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.theme-toggle {
  margin-left: 0.15rem;
}

/* ── Bell notification ── */
.nav-bell {
  position: relative;
}

.nav-bell-btn {
  position: relative;
  color: rgba(224, 231, 255, 0.78);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-bell-btn:hover {
  background: var(--nav-hover);
  color: #fff;
}

.nav-bell-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
  border: 2px solid var(--header);
  pointer-events: none;
}

.nav-bell-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  box-shadow: var(--shadow);
  z-index: 20;
  overflow: hidden;
}

.nav-bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.nav-bell-head a {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
}

.nav-bell-item {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.nav-bell-item:last-child {
  border-bottom: 0;
}

.nav-bell-item-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.nav-bell-item-body {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.nav-bell-item-time {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.nav-bell-empty {
  padding: 1rem 0.9rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── Page shell ── */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1.1rem 2.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── Auth layout ── */

/* Brand colour overrides for the login page */
body.is-auth {
  --accent:       #CC0000;
  --accent-hover: #AA0000;
  --accent-soft:  #FFF0F0;
  --focus:        #CC0000;
}

body.is-auth .site-header-inner {
  justify-content: space-between;
}

body.is-auth .site-main {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  max-width: 100%;
  min-height: calc(100vh - 57px);
}

.auth-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(160deg, #06061A 0%, #0D0D3A 50%, #1C1C6A 100%);
}

.auth-brand {
  width: 500px;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(28, 28, 122, 0.25);
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(227, 30, 36, 0.12);
  pointer-events: none;
}

.auth-brand-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: nowrap;
}

.auth-brand-wdlms {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(227, 30, 36, 0.25);
  justify-content: center;
  flex-shrink: 0;
}

.auth-brand-logo svg {
  width: 24px;
  height: 24px;
}

.auth-brand-logo img {
  max-height: 72px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.auth-brand h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.75rem;
  letter-spacing: -0.025em;
}

.auth-brand-lede {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 3rem;
  line-height: 1.65;
  max-width: 340px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.auth-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(28, 28, 122, 0.40);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-feature-icon svg {
  width: 18px;
  height: 18px;
}

.auth-feature-title {
  font-size: 0.93rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.auth-feature-text {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
}

.auth-powered-by {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.2);
  margin: auto 0 0;
  padding-top: 2rem;
  letter-spacing: 0.03em;
}

.auth-mobile-footer {
  display: none;
}

.auth-mobile-top {
  display: none;
}


.auth-form-side {
  flex: 1;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.auth-panel {
  width: 100%;
  max-width: 26rem;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 2.5rem;
}

.auth-panel-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.auth-panel-logo img {
  max-height: 100px;
  max-width: 240px;
  width: auto;
  object-fit: contain;
}

.auth-panel h1 {
  font-size: clamp(1.7rem, 2.5vw, 2.1rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.03em;
}

.lede {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── Alerts ── */
.alert {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  margin: 0 0 1rem;
  border: 1px solid transparent;
  font-size: 0.93rem;
}

.alert-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 25%, transparent);
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}

.alert-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ── Forms ── */
label {
  display: block;
  font-weight: 600;
  font-size: 0.93rem;
  margin-bottom: 0.85rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="file"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
select,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.62rem 0.8rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
input[type="month"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28, 28, 122, 0.15);
  outline: none;
}

/* ── Date / time picker parts ── */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px;
  opacity: 0.55;
  filter: var(--date-icon-filter, none);
  transition: opacity 0.15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: var(--accent-soft, rgba(28,28,122,0.10));
}

/* Style the editable date segments */
input[type="date"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit {
  color: var(--text);
  padding: 0;
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
input[type="date"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text {
  color: var(--muted);
  padding: 0 2px;
}
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
input[type="datetime-local"]::-webkit-datetime-edit-ampm-field,
input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-minute-field,
input[type="time"]::-webkit-datetime-edit-ampm-field {
  color: var(--text);
  border-radius: 4px;
  padding: 1px 3px;
}
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-month-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-day-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-year-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-ampm-field:focus,
input[type="time"]::-webkit-datetime-edit-hour-field:focus,
input[type="time"]::-webkit-datetime-edit-minute-field:focus,
input[type="time"]::-webkit-datetime-edit-ampm-field:focus {
  background: var(--accent);
  color: #fff;
  outline: none;
}

/* Dark mode: invert the browser's calendar icon so it shows on dark bg */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.85);
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ── Buttons ── */
.btn,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(28, 28, 122, 0.22);
}

.btn:hover,
button[type="submit"]:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(28, 28, 122, 0.32);
}

.btn:active,
button[type="submit"]:active {
  transform: translateY(1px);
}

[data-theme="dark"] .btn:not(.btn-secondary),
[data-theme="dark"] button[type="submit"]:not(.btn-secondary) {
  color: #E8EEFF;
}

.btn-secondary,
a.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
  box-shadow: none;
}

button.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
  box-shadow: none;
}

.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

[data-theme="dark"] button.btn-secondary {
  color: var(--accent);
  background: transparent;
}

[data-theme="dark"] button.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* ── Page header ── */
.page-header {
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.2rem;
}

.section {
  margin-top: 1.75rem;
}

.section > h2:first-child {
  margin-top: 0;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.15s;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(28, 28, 122, 0.14);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  transform: translateY(-1px);
}

.card h3 {
  margin-bottom: 0.3rem;
}

/* ── Stats ── */
.stat {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0.25rem 0 0.85rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

/* ── Progress bar ── */
.progress {
  height: 10px;
  background: var(--bg-accent);
  border-radius: 99px;
  overflow: hidden;
  margin: 0.6rem 0 1rem;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #7C3AED));
  border-radius: inherit;
  transition: width 0.4s ease;
}
body.is-student .progress > span {
  background: linear-gradient(90deg, #E31E24, #1C1C7A);
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 0;
}

th, td {
  text-align: left;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface));
}

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

tbody tr:hover {
  background: var(--accent-soft);
}

.empty {
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

/* ── Quick links ── */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

/* ── Badge / pill ── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Search bar ── */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.search-bar label {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .site-header-inner {
    padding: 0.6rem 0.85rem;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a,
  .theme-toggle {
    min-height: 40px;
    padding: 0.2rem 0.55rem;
    font-size: 0.92rem;
  }

  .site-main {
    padding: 1.2rem 0.85rem 2rem;
  }

  body.is-auth .site-main {
    min-height: auto;
    flex-direction: column;
  }

  .auth-split {
    flex-direction: column;
    background: linear-gradient(160deg, #06061A 0%, #0D0D3A 50%, #1C1C6A 100%);
    min-height: 100dvh;
    justify-content: space-between;
  }

  .auth-brand {
    width: 100%;
    padding: 2.5rem 1.5rem 2rem;
    min-height: auto;
    background: transparent;
    align-items: center;
    text-align: center;
  }

  .auth-brand::before,
  .auth-brand::after {
    display: none;
  }

  .auth-brand-logo {
    margin: 0 auto 1rem;
  }

  .auth-brand h2 {
    font-size: 1.6rem;
  }

  .auth-brand-lede {
    font-size: 0.9rem;
    margin-bottom: 0;
    max-width: 280px;
  }

  .auth-brand {
    display: none;
  }

  .auth-features {
    display: none;
  }

  .auth-mobile-footer {
    display: block;
    text-align: center;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.25);
    padding: 1rem 1rem 1.5rem;
    letter-spacing: 0.03em;
    margin: 0;
  }

  .auth-mobile-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 4rem 1rem 2.75rem;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }

  .auth-mobile-wdlms {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.08em;
    font-weight: 500;
  }

  .auth-mobile-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
  }

  .auth-mobile-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(28, 28, 122, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .auth-mobile-icon svg {
    width: 15px;
    height: 15px;
  }

  body.is-auth {
    background: linear-gradient(160deg, #06061A 0%, #0D0D3A 50%, #1C1C6A 100%);
    min-height: 100vh;
  }

  .auth-form-side {
    background: transparent;
    padding: 0 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-panel {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.1rem;
  }

  .auth-panel h1 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
  }

  .auth-panel .lede {
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
  }

  .auth-panel label {
    margin-bottom: 0.5rem;
  }

  .auth-panel-logo img {
    max-height: 80px;
  }

  .auth-panel-logo {
    margin-bottom: 0.75rem;
  }
}

/* ── Page header with actions ── */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.page-header-row h1 {
  margin: 0;
}

.page-header-row .lede {
  margin: 0.2rem 0 0;
}

/* ── Section head: title + button on same row ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  margin: 0;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.3rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* ── Table row actions ── */
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

/* ── Ghost buttons (for inline table actions) ── */
.btn-ghost,
a.btn-ghost,
button.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--accent) !important;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  min-height: unset;
}

.btn-ghost:hover,
a.btn-ghost:hover,
button.btn-ghost:hover {
  background: var(--accent-soft) !important;
  color: var(--accent-hover) !important;
}

.btn-ghost-danger,
a.btn-ghost-danger,
button.btn-ghost-danger {
  display: inline-flex;
  align-items: center;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--danger) !important;
  cursor: pointer;
  transition: background 0.12s;
  min-height: unset;
}

.btn-ghost-danger:hover,
a.btn-ghost-danger:hover,
button.btn-ghost-danger:hover {
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

/* ── Badge color variants ── */
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-muted {
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  color: var(--muted);
}

/* ── Stat card ── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s, transform 0.15s;
  border-top: 3px solid var(--accent);
}

.stat-card:hover {
  box-shadow: 0 8px 24px rgba(28, 28, 122, 0.14);
  transform: translateY(-1px);
}

.stat-card-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0.15rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.75rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.12s;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.tab-btn.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* ── Class cards ── */
.class-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.class-card:hover {
  box-shadow: 0 8px 24px rgba(28, 28, 122, 0.14);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  transform: translateY(-1px);
}

.class-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.class-card-meta {
  font-size: 0.83rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin: 0;
}

.class-card-footer {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

a.pagination-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.pagination-btn[aria-disabled="true"],
.pagination-ellipsis {
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

/* ── Class picker (checkbox cards) ── */
.class-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.class-pick-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}

.class-pick-item input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.class-pick-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.class-pick-item:hover {
  border-color: var(--accent);
}

/* ── Announcement cards ── */
.ann-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
}

.ann-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.ann-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.ann-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ann-card-body {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}

/* ── Course content items (student view) ── */
.ci-module {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.ci-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface));
  border-bottom: 1px solid var(--border);
}

.ci-module-title {
  margin: 0 0 0.1rem;
  font-size: 1rem;
  font-weight: 700;
}

.ci-module-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.ci-module-progress {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.ci-module-progress-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.ci-progress-bar {
  width: 80px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 20%, transparent);
  overflow: hidden;
}

.ci-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s;
}

.ci-list {
  display: flex;
  flex-direction: column;
}

.ci-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.ci-row:last-child {
  border-bottom: 0;
}

.ci-row:hover {
  background: var(--accent-soft);
}

.ci-type {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  text-align: center;
}

.ci-type--lesson { background: #E6E8F5; color: #1C1C7A; }
.ci-type--quiz   { background: #FEF3C7; color: #D97706; }
.ci-type--assign { background: #D1FAE5; color: #059669; }

.ci-body {
  flex: 1;
  min-width: 0;
}

.ci-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ci-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.ci-sub--warn {
  color: var(--danger);
}

.ci-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.ci-action {
  font-size: 0.82rem;
  padding: 0.28rem 0.8rem;
  min-height: unset;
  white-space: nowrap;
}

/* ── Quiz intro page ── */
.quiz-intro-wrap {
  max-width: 660px;
}

.qi-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.qi-stat {
  flex: 1;
  min-width: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.qi-stat--danger .qi-stat-value {
  color: var(--danger);
}

.qi-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.qi-stat-unit {
  font-size: 1rem;
  font-weight: 600;
}

.qi-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
}

.qi-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.qi-notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.qi-history {
  margin-bottom: 1.5rem;
}

.qi-history-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.qi-history .ci-module {
  margin-bottom: 0;
}

.qi-action {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.qi-start-btn {
  font-size: 1rem;
  padding: 0.7rem 2rem;
}

.qi-action-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

/* Legacy class kept for any pages still using it */
.course-module { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; overflow: hidden; }
.course-module-head { padding: 0.9rem 1.2rem; background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); border-bottom: 1px solid var(--border); }
.course-module-head h2 { margin: 0; font-size: 1rem; }
.course-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.72rem 1.2rem; border-bottom: 1px solid var(--border); transition: background 0.12s; }
.course-item:last-child { border-bottom: 0; }
.course-item:hover { background: var(--accent-soft); }
.course-item-icon { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; }
.course-item-icon.type-lesson { background: #E6E8F5; color: #1C1C7A; }
.course-item-icon.type-quiz   { background: #FEF3C7; color: #D97706; }
.course-item-icon.type-assign { background: #D1FAE5; color: #059669; }
.course-item-title { flex: 1; font-size: 0.93rem; font-weight: 500; color: var(--text); text-decoration: none; }
.course-item-title:hover { color: var(--accent); }
.course-item-status { font-size: 0.8rem; font-weight: 600; flex-shrink: 0; }

/* ════════════════════════════════════════════
   STUDENT SIDEBAR LAYOUT
   ════════════════════════════════════════════ */

/* Override body for sidebar layout */
body.is-student,
body.is-admin {
  display: block;
  background: var(--bg);
}

/* ── Student portal colour palette: ICT Expert Navy / Red ── */
body.is-student {
  --bg:          #F4F5FA;
  --bg-accent:   #E6E8F5;
  --surface:     #FFFFFF;
  --text:        #1A1A2E;
  --muted:       #5B6080;
  --border:      #CDD1EE;
  --accent:      #E31E24;
  --accent-hover:#BF1219;
  --accent-soft: #FDEAEA;
  --header:      #1C1C7A;
  --header-text: #FFFFFF;
  --nav-hover:   rgba(255,255,255,0.10);
  --shadow:      0 4px 16px rgba(28,28,122,0.12);
  --focus:       #E31E24;
}
[data-theme="dark"] body.is-student,
body.is-student[data-theme="dark"] {
  --bg:          #080818;
  --bg-accent:   #0E0E2A;
  --surface:     #111130;
  --text:        #E8EEFF;
  --muted:       #7880B0;
  --border:      #1E1E60;
  --accent:      #FF3840;
  --accent-hover:#FF5D63;
  --accent-soft: #2D0A10;
  --header:      #06061A;
  --header-text: #E8EEFF;
  --nav-hover:   rgba(255,255,255,0.08);
  --shadow:      0 8px 28px rgba(0,0,0,0.6);
  --focus:       #FF3840;
}

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

/* ── Sidebar ── */
.sl-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--header);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  transition: transform 0.25s ease;
}

.sl-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.4rem 1.25rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sl-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sl-logo-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.sl-powered-by {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
  text-align: center;
  padding: 0.5rem 1rem 0.75rem;
  letter-spacing: 0.03em;
}

.sl-logo-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
}

.sl-logo-img img {
  max-height: 56px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.sl-logo-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--header-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.sl-logo-sub {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--header-text) 45%, transparent);
  margin-top: 1px;
}

.sl-nav {
  flex: 1;
  padding: 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sl-nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--header-text) 65%, transparent);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.sl-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sl-nav-item:hover {
  background: var(--nav-hover);
  color: var(--header-text);
}

.sl-nav-item--active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.sl-nav-item--active:hover {
  background: var(--accent-hover);
  color: #fff;
}

.sl-nav-badge {
  margin-left: auto;
  background: var(--header-text);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  min-width: 1.3rem;
  text-align: center;
}

.sl-sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sl-widget {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--nav-hover);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.sl-widget-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sl-widget-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-soft);
}

.sl-widget-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--header-text);
}

.sl-widget-text {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--header-text) 40%, transparent);
  margin-top: 1px;
  line-height: 1.3;
}

/* ── Main area ── */
.sl-main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top bar ── */
.sl-topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.sl-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text);
  flex-shrink: 0;
}

.sl-menu-toggle:hover { background: var(--accent-soft); }

.sl-menu-toggle svg { width: 20px; height: 20px; }

.sl-breadcrumb {
  flex: 1;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sl-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.sl-breadcrumb a:hover { color: var(--accent); }

.sl-bc-sep {
  opacity: 0.4;
  font-size: 0.75rem;
}

.sl-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.sl-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--muted);
  position: relative;
  transition: background 0.12s, color 0.12s;
}

.sl-icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

.sl-icon-btn svg { width: 18px; height: 18px; }

.sl-topbar .theme-toggle {
  color: var(--text);
  margin-left: 0;
}

.sl-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.3rem 0.6rem 0.3rem 0.35rem;
  border-radius: 10px;
  color: var(--text);
  transition: background 0.12s;
}

.sl-user-btn:hover { background: var(--accent-soft); }

.sl-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.sl-username {
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sl-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Content area ── */
.sl-content {
  flex: 1;
  padding: 1.75rem 1.75rem 3rem;
  background: var(--bg);
  overflow-x: hidden;
  min-width: 0;
}

/* Overlay for mobile sidebar */
.sl-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

/* ════════════════════════════════════════════
   STUDENT COURSE PAGE
   ════════════════════════════════════════════ */

.sc-page-header { margin-bottom: 1.25rem; }
.sc-page-title  { font-size: 1.75rem; font-weight: 800; margin: 0 0 0.25rem; color: var(--text); }
.sc-page-sub    { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Stats bar */
.sc-stats {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.sc-stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  padding: 1.1rem 1.25rem;
}

.sc-stat-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0.6rem 0;
}

.sc-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sc-stat-icon svg { width: 22px; height: 22px; }

.sc-stat-icon--blue   { background: #DBEAFE; color: #1D4ED8; }
.sc-stat-icon--green  { background: #D1FAE5; color: #059669; }
.sc-stat-icon--orange { background: #FEF3C7; color: #D97706; }
.sc-stat-icon--indigo { background: #E6E8F5; color: #1C1C7A; }

.sc-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.sc-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Section header */
.sc-section-head  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.sc-section-title { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--text); }

/* Main card */
.sc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Hero lesson card */
.ch-card {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.ch-thumbnail {
  width: 200px;
  flex-shrink: 0;
  background: var(--header);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 160px;
}

.ch-thumbnail svg {
  width: 72px;
  height: 72px;
  position: relative;
  z-index: 1;
}

.ch-thumbnail-blob {
  position: absolute;
  bottom: -30px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(220,38,38,0.25);
  pointer-events: none;
}

.ch-content {
  flex: 1;
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ch-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: #E6E8F5;
  color: #1C1C7A;
  padding: 0.18rem 0.6rem;
  border-radius: 6px;
  align-self: flex-start;
}

.ch-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  line-height: 1.2;
}

.ch-course-name {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: -0.1rem;
}

.ch-progress-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.1rem;
}

.ch-progress-bar {
  flex: 1;
  max-width: 200px;
  height: 5px;
  background: var(--bg-accent);
  border-radius: 999px;
  overflow: hidden;
}

.ch-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}

.ch-progress-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.ch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  margin-top: 0.4rem;
  align-self: flex-start;
  transition: background 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
}

.ch-btn svg { width: 14px; height: 14px; }

.ch-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Module header row */
.sc-module-header {
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
}
.sc-module-header-inner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
}
.sc-module-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sc-module-icon svg { width: 18px; height: 18px; }
.sc-module-meta { flex: 1; min-width: 0; }
.sc-module-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.1rem;
}
.sc-module-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-module-counts {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.sc-module-count-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  background: #E6E8F5;
  color: #1C1C7A;
}
.sc-module-count-pill--assign { background: #D1FAE5; color: #059669; }
.sc-module-count-pill--quiz   { background: #FEF3C7; color: #D97706; }

[data-theme="dark"] .sc-module-header { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .sc-module-count-pill         { background: rgba(28,28,122,0.30);  color: #8888DD; }
[data-theme="dark"] .sc-module-count-pill--assign { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .sc-module-count-pill--quiz   { background: rgba(245,158,11,0.15); color: #FCD34D; }

/* Course list items */
.sc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.sc-item:last-child { border-bottom: 0; }

.sc-item:hover { background: var(--accent-soft); }

.sc-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sc-item-icon svg { width: 20px; height: 20px; }

.sc-item-icon--lesson { background: #E6E8F5; color: #1C1C7A; }
.sc-item-icon--assign { background: #D1FAE5; color: #059669; }
.sc-item-icon--quiz   { background: #FEF3C7; color: #D97706; }

.sc-item-body { flex: 1; min-width: 0; }

.sc-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-item-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.sc-item-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Item badges */
.sc-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.sc-badge--success { background: #D1FAE5; color: #059669; }
.sc-badge--muted   { background: #F3F4F6; color: #6B7280; }
.sc-badge--info    { background: #DBEAFE; color: #1D4ED8; }
.sc-badge--open    { background: #D1FAE5; color: #059669; }
.sc-badge--danger  { background: #FEE2E2; color: #DC2626; }
.sc-badge--failed  { background: #FEE2E2; color: #DC2626; }

[data-theme="dark"] .sc-badge--muted   { background: rgba(255,255,255,0.08); color: var(--muted); }
[data-theme="dark"] .sc-badge--success { background: var(--success-soft); color: var(--success); }
[data-theme="dark"] .sc-badge--danger  { background: var(--danger-soft); color: var(--danger); }
[data-theme="dark"] .sc-badge--failed  { background: var(--danger-soft); color: var(--danger); }
[data-theme="dark"] .sc-badge--info    { background: rgba(28,28,122,0.25); color: #8888DD; }
[data-theme="dark"] .sc-badge--open    { background: var(--success-soft); color: var(--success); }

/* Item action buttons */
.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.1s;
  cursor: pointer;
}

.sc-btn svg { width: 13px; height: 13px; }

.sc-btn--fill {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: var(--shadow);
}

.sc-btn--fill:hover  { background: var(--accent-hover); transform: translateY(-1px); }

.sc-btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.sc-btn--outline:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.sc-item-chevron {
  width: 16px;
  height: 16px;
  color: var(--border);
  flex-shrink: 0;
}

.sc-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Item type tags (inline lesson/assignment/quiz label) */
.sc-item-type-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  vertical-align: middle;
}
.sc-item-type-tag--lesson { background: #E6E8F5; color: #1C1C7A; }
.sc-item-type-tag--assign { background: #D1FAE5; color: #059669; }
.sc-item-type-tag--quiz   { background: #FEF3C7; color: #D97706; }
[data-theme="dark"] .sc-item-type-tag--lesson { background: rgba(28,28,122,0.30);  color: #8888DD; }
[data-theme="dark"] .sc-item-type-tag--assign { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .sc-item-type-tag--quiz   { background: rgba(245,158,11,0.15); color: #FCD34D; }

/* ── Lesson detail page ── */
.sl-lesson-module-crumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.sl-lesson-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.sl-lesson-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  background: var(--accent-soft);
}
.sl-lesson-section-head svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }

.sl-lesson-video-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  background: #000;
}
.sl-lesson-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sl-lesson-pdf-wrap {
  height: 72vh;
  min-height: 400px;
}
.sl-lesson-pdf-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.sl-lesson-description {
  padding: 1.25rem 1.5rem;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text);
}

.sl-lesson-complete-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0 1.5rem;
}

.sc-btn--lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
}

.sl-lesson-completed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--success);
  padding: 0.75rem 0;
}
.sl-lesson-completed svg { width: 20px; height: 20px; }

/* ── Course header card ── */
.crs-header-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.crs-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.crs-header-icon svg { width: 26px; height: 26px; }
.crs-header-body { flex: 1; min-width: 0; }
.crs-header-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.crs-header-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crs-header-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crs-header-right { flex-shrink: 0; }
.crs-header-mod-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
}

/* ── Module accordion ── */
.crs-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.crs-mod {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.crs-mod--open {
  border-color: #6B6BCC;
  box-shadow: 0 0 0 1px #6B6BCC, var(--shadow);
}
.crs-mod-header {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #E6E8F5 0%, #D0D4EE 100%);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.crs-mod-header:hover { background: linear-gradient(135deg, #D0D4EE 0%, #BCC2E8 100%); }
[data-theme="dark"] .crs-mod-header { background: linear-gradient(135deg, rgba(28,28,122,0.25) 0%, rgba(28,28,122,0.15) 100%); }
[data-theme="dark"] .crs-mod-header:hover { background: linear-gradient(135deg, rgba(28,28,122,0.38) 0%, rgba(28,28,122,0.28) 100%); }
.crs-mod-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.crs-mod--open .crs-mod-num {
  background: var(--accent);
  color: #fff;
}
.crs-mod-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.crs-mod-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.crs-mod-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crs-mod-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.crs-mod-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
}
.crs-mod-pill svg { width: 11px; height: 11px; }
.crs-mod-pill--lesson  { background: #E6E8F5; color: #1C1C7A; }
.crs-mod-pill--quiz    { background: #FEF3C7; color: #D97706; }
.crs-mod-pill--assign  { background: #D1FAE5; color: #059669; }
.crs-mod-pill--meeting { background: #FCE7F3; color: #BE185D; }
.crs-mod-pill--empty   { background: var(--accent-soft); color: var(--muted); }
.crs-mod-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.crs-mod--open .crs-mod-chevron { transform: rotate(180deg); }

/* Collapsible body */
.crs-mod-body {
  display: none;
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.crs-mod--open .crs-mod-body { display: block; }

/* ── Course content items (inside accordion) ── */
.crs-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.crs-item:last-child { border-bottom: 0; }
.crs-item:hover { background: var(--accent-soft); }

.crs-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.crs-item-icon svg { width: 18px; height: 18px; }
.crs-item--lesson .crs-item-icon { background: #E6E8F5; color: #1C1C7A; }
.crs-item--assign .crs-item-icon { background: #D1FAE5; color: #059669; }
.crs-item--quiz   .crs-item-icon { background: #FEF3C7; color: #D97706; }

.crs-item-body { flex: 1; min-width: 0; }
.crs-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crs-item--done .crs-item-title { color: var(--muted); }
.crs-item-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crs-item-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.crs-item-arrow {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Item badges ── */
.crs-badge {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.crs-badge svg { width: 11px; height: 11px; }
.crs-badge--done    { background: #D1FAE5; color: #065F46; }
.crs-badge--pending { background: var(--accent-soft); color: var(--muted); }
.crs-badge--info    { background: #DBEAFE; color: #1D4ED8; }
.crs-badge--open    { background: #EDE9FE; color: #6D28D9; }
.crs-badge--danger  { background: #FEE2E2; color: #991B1B; }
.crs-badge--locked  { background: var(--accent-soft); color: var(--muted); }

[data-theme="dark"] .crs-mod-pill--lesson  { background: rgba(28,28,122,0.30);  color: #8888DD; }
[data-theme="dark"] .crs-mod-pill--quiz    { background: rgba(245,158,11,0.15); color: #FCD34D; }
[data-theme="dark"] .crs-mod-pill--assign  { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .crs-mod-pill--meeting { background: rgba(236,72,153,0.15); color: #F9A8D4; }
[data-theme="dark"] .crs-item--lesson  .crs-item-icon { background: rgba(28,28,122,0.30);  color: #8888DD; }
[data-theme="dark"] .crs-item--assign  .crs-item-icon { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .crs-item--quiz    .crs-item-icon { background: rgba(245,158,11,0.15); color: #FCD34D; }
[data-theme="dark"] .crs-item--meeting .crs-item-icon { background: rgba(236,72,153,0.15); color: #F9A8D4; }

.crs-item--meeting .crs-item-icon { background: #FCE7F3; color: #BE185D; }
.crs-badge--meeting { background: #FCE7F3; color: #BE185D; }
[data-theme="dark"] .crs-badge--done   { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .crs-badge--info   { background: rgba(59,130,246,0.15);  color: #93C5FD; }
[data-theme="dark"] .crs-badge--open   { background: rgba(109,40,217,0.2);   color: #C4B5FD; }
[data-theme="dark"] .crs-badge--danger { background: rgba(220,38,38,0.15);   color: #FCA5A5; }

/* ── Profile page ── */
.prof-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.prof-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.prof-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.prof-row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.prof-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 90px;
  flex-shrink: 0;
}
.prof-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

.prof-pw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  max-width: 480px;
}
.prof-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 1.1rem;
  color: var(--text);
}
.prof-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.prof-field-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.sc-alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
}
.sc-alert--success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.sc-alert--danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

[data-theme="dark"] .sc-alert--success { background: rgba(16,185,129,0.15); color: #34D399; border-color: rgba(16,185,129,0.3); }
[data-theme="dark"] .sc-alert--danger  { background: rgba(220,38,38,0.15);  color: #FCA5A5; border-color: rgba(220,38,38,0.3); }

@media (max-width: 480px) {
  .prof-card {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }
  .prof-row {
    flex-direction: column;
    gap: 0.1rem;
    align-items: center;
  }
  .prof-label {
    min-width: unset;
  }
  .prof-pw-card {
    max-width: 100%;
  }
}

/* ── Assignments list (mobile-first cards) ── */
.asgn-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.asgn-card {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.asgn-status-bar {
  width: 4px;
  flex-shrink: 0;
}
.asgn-status-bar--done      { background: var(--success); }
.asgn-status-bar--submitted { background: var(--accent); }
.asgn-status-bar--overdue   { background: var(--danger); }
.asgn-status-bar--pending   { background: #F59E0B; }

.asgn-card-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}
.asgn-body {
  flex: 1;
  min-width: 0;
}
.asgn-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.3rem;
}
.asgn-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
}
.asgn-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: var(--muted);
}
.asgn-meta-item svg { width: 11px; height: 11px; flex-shrink: 0; }
.asgn-meta-item--danger { color: var(--danger); font-weight: 600; }

.asgn-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.asgn-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
}
.asgn-badge--done      { background: #D1FAE5; color: #065F46; }
.asgn-badge--submitted { background: #E6E8F5; color: #1C1C7A; }
.asgn-badge--overdue   { background: #FEE2E2; color: #991B1B; }
.asgn-badge--pending   { background: #FEF3C7; color: #92400E; }

.asgn-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--accent);
  border-radius: 7px;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.asgn-open-btn svg { width: 12px; height: 12px; }
.asgn-open-btn:hover { background: var(--accent); color: #fff; }

[data-theme="dark"] .asgn-badge--done      { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .asgn-badge--submitted { background: rgba(28,28,122,0.25); color: #8888DD; }
[data-theme="dark"] .asgn-badge--overdue   { background: rgba(220,38,38,0.15);  color: #FCA5A5; }
[data-theme="dark"] .asgn-badge--pending   { background: rgba(245,158,11,0.15); color: #FCD34D; }

/* ── Quiz results list (mobile-first cards) ── */
.qr-filter {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.qr-filter-select {
  min-width: 180px;
  max-width: 280px;
}
.qr-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.qr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.qr-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
}
.qr-score {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.qr-score--pass { background: #D1FAE5; color: #065F46; }
.qr-score--fail { background: #FEE2E2; color: #991B1B; }
.qr-score-pct { font-size: 1rem; font-weight: 800; }
.qr-score-pct small { font-size: 0.65em; font-weight: 700; }
.qr-score-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }
.qr-info { flex: 1; min-width: 0; }
.qr-quiz-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.35rem;
}
.qr-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
}
.qr-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.qr-meta-item svg { width: 12px; height: 12px; flex-shrink: 0; }
.qr-review-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.qr-review-btn svg { width: 13px; height: 13px; }
.qr-review-btn:hover { background: var(--accent); color: #fff; }

[data-theme="dark"] .qr-score--pass { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .qr-score--fail { background: rgba(220,38,38,0.15);   color: #FCA5A5; }

/* ── Quiz result review page ── */
.qrv-summary {
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.qrv-summary--pass { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); color: #065F46; }
.qrv-summary--fail { background: linear-gradient(135deg, #FEE2E2, #FECACA); color: #991B1B; }
.qrv-summary-score {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.qrv-summary-pct-sign { font-size: 1.8rem; }
.qrv-summary-verdict {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.qrv-summary-title {
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}
.qrv-summary-meta {
  font-size: 0.8rem;
  opacity: 0.75;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.5rem;
}
.qrv-summary-dot { opacity: 0.5; }

[data-theme="dark"] .qrv-summary--pass { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.15)); color: #6EE7B7; }
[data-theme="dark"] .qrv-summary--fail { background: linear-gradient(135deg, rgba(220,38,38,0.2),  rgba(185,28,28,0.15));  color: #FCA5A5; }

.qrv-questions { display: flex; flex-direction: column; gap: 0.75rem; }

.qrv-q {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.qrv-q--correct { border-left-color: var(--success); }
.qrv-q--wrong   { border-left-color: var(--danger);  }

.qrv-q-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.qrv-q-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.qrv-q-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
}
.qrv-q-status svg { width: 11px; height: 11px; }
.qrv-q-status--correct { background: #D1FAE5; color: #065F46; }
.qrv-q-status--wrong   { background: #FEE2E2; color: #991B1B; }

.qrv-q-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.9rem;
  line-height: 1.6;
}

.qrv-options { display: flex; flex-direction: column; gap: 0.45rem; }
.qrv-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  transition: none;
}
.qrv-option--correct { background: #D1FAE5; border-color: #059669; color: #065F46; font-weight: 600; }
.qrv-option--wrong   { background: #FEE2E2; border-color: #DC2626; color: #991B1B; }
.qrv-option-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.qrv-option--correct .qrv-option-letter { background: #059669; color: #fff; }
.qrv-option--wrong   .qrv-option-letter { background: #DC2626; color: #fff; }
.qrv-option-text { flex: 1; }
.qrv-option-icon { width: 15px; height: 15px; flex-shrink: 0; margin-left: auto; }
.qrv-option--correct .qrv-option-icon { color: #059669; }
.qrv-option--wrong   .qrv-option-icon { color: #DC2626; }

.qrv-no-answer {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.qrv-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-bottom: 1rem;
}

[data-theme="dark"] .qrv-q-status--correct { background: rgba(16,185,129,0.15); color: #34D399; }
[data-theme="dark"] .qrv-q-status--wrong   { background: rgba(220,38,38,0.15);  color: #FCA5A5; }
[data-theme="dark"] .qrv-option--correct { background: rgba(16,185,129,0.12); border-color: #059669; color: #6EE7B7; }
[data-theme="dark"] .qrv-option--wrong   { background: rgba(220,38,38,0.12);  border-color: #DC2626; color: #FCA5A5; }

/* ── Quiz question rich-text rendering ── */
.quiz-question-body ul,
.quiz-question-body ol { padding-left: 1.4rem; margin: 0.4rem 0; }
.quiz-question-body li { margin-bottom: 0.2rem; }
.quiz-question-body sup,
.quiz-question-body sub { font-size: 0.75em; }

/* ── Responsive: sidebar collapse on mobile ── */
@media (max-width: 840px) {
  .sl-sidebar {
    transform: translateX(-100%);
  }

  .sl-sidebar--open {
    transform: translateX(0);
  }

  .sl-overlay--show {
    display: block;
  }

  .sl-main {
    margin-left: 0;
  }

  .sl-menu-toggle {
    display: flex;
  }

  .sl-topbar {
    padding: 0 1rem;
  }

  .sl-content {
    padding: 1.25rem 1rem 2rem;
  }

  .sc-stats {
    flex-wrap: wrap;
  }

  .sc-stat {
    min-width: calc(50% - 1px);
  }

  .sc-stat-divider:nth-child(4) {
    display: none;
  }

  /* Course page: hide count pills in module header — info still visible when opened */
  .crs-mod-pills {
    display: none;
  }

  /* Course stats: progress bar stat goes full width */
  .sc-stats .sc-stat[style*="flex:2"] {
    min-width: calc(100% - 1px);
    flex: 1 1 100%;
  }

  .ch-thumbnail {
    width: 120px;
    min-height: 130px;
  }

  .sl-username {
    display: none;
  }
}

@media (max-width: 560px) {
  .ch-card {
    flex-direction: column;
  }

  .ch-thumbnail {
    width: 100%;
    height: 110px;
    min-height: unset;
  }

  .sc-item-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
  }

  /* Course page: stack all stats to full width on very small screens */
  .sc-stat {
    min-width: 100%;
  }
  .sc-stat-divider {
    display: none;
  }

  /* Course item: hide arrow chevron to save space */
  .crs-item-arrow {
    display: none;
  }

  /* Course item right: stack badge only */
  .crs-item-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
    max-width: 80px;
  }

  /* Force item title + sub to truncate within the viewport */
  .crs-item-title {
    max-width: calc(100vw - 200px);
  }
  .crs-item-sub {
    max-width: calc(100vw - 200px);
  }

  /* Tighten item padding and gap on mobile */
  .crs-item {
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    gap: 0.6rem;
  }
  .crs-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  /* Force module title to truncate within the viewport */
  .crs-mod-title {
    max-width: calc(100vw - 130px);
  }

  /* Tighten module header on mobile */
  .crs-mod-header {
    padding: 0.85rem 1rem;
    gap: 0.65rem;
  }

  /* Course header card: stack vertically */
  .crs-header-card {
    flex-direction: column;
    gap: 0.75rem;
  }
  .crs-header-right {
    align-self: flex-start;
  }

  /* Dashboard ci-row: hide meta (Start button) text on very small, keep button */
  .ci-row {
    padding: 0.7rem 1rem;
    gap: 0.6rem;
  }
  .ci-body {
    min-width: 0;
  }
}

/* ── Dashboard two-column panel grid (mobile-first) ── */
.dash-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 640px) {
  .dash-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}
.dash-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.dash-section-link {
  font-size: 0.78rem;
  white-space: nowrap;
}

.dash-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-empty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Quiz cards */
.dsh-quiz-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow);
}
.dsh-quiz-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft, rgba(28,28,122,0.10));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dsh-quiz-icon svg { width: 18px; height: 18px; }
.dsh-quiz-body {
  flex: 1;
  min-width: 0;
}
.dsh-quiz-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dsh-quiz-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dsh-quiz-closes {
  color: var(--danger);
  font-weight: 600;
}
.dsh-quiz-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft, rgba(28,28,122,0.10));
  border: none;
  border-radius: 7px;
  padding: 0.35rem 0.8rem;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.dsh-quiz-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* Announcement cards */
.dsh-ann-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow);
}
.dsh-ann-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(16,185,129,0.1);
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.dsh-ann-icon svg { width: 16px; height: 16px; }
.dsh-ann-body { flex: 1; min-width: 0; }
.dsh-ann-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.dsh-ann-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

[data-theme="dark"] .dsh-ann-icon {
  background: rgba(16,185,129,0.15);
  color: #34D399;
}

/* ── Form card wrapper ── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 560px;
}

/* ── Enroll form group ── */
.enroll-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.enroll-group label {
  margin: 0;
}

.enroll-group input[type="text"] {
  margin-top: 0.25rem;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.filter-bar label {
  margin: 0;
  min-width: 140px;
  flex: 1;
}

/* ── Module show summary chips ── */
.content-counts {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.content-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 720px) {
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .filter-bar label {
    min-width: 100%;
  }

  .enroll-group {
    flex-direction: column;
  }

  .class-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
