/**
 * Aurelux LMS Frontend — Dashboard Stylesheet
 *
 * Design: dark glassmorphism with deep indigo/violet palette.
 * Fully responsive, accessible, no external dependencies.
 *
 * @package AureluxLMS\Frontend
 */

/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
  --alms-bg:           #0f0f1a;
  --alms-surface:      rgba(255,255,255,0.05);
  --alms-surface-2:    rgba(255,255,255,0.08);
  --alms-border:       rgba(255,255,255,0.10);
  --alms-primary:      #7c6fff;
  --alms-primary-dark: #5a49e8;
  --alms-accent:       #e85aad;
  --alms-success:      #3dd68c;
  --alms-warning:      #f5a623;
  --alms-danger:       #ff5370;
  --alms-text:         #e8e8f0;
  --alms-muted:        #9090b0;
  --alms-radius:       12px;
  --alms-radius-sm:    8px;
  --alms-shadow:       0 8px 32px rgba(0,0,0,0.45);
  --alms-font:         'Inter', system-ui, -apple-system, sans-serif;
  --alms-transition:   220ms ease;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
.alms-dashboard {
  font-family: var(--alms-font);
  color: var(--alms-text);
  background: linear-gradient(-45deg, #0f0f1a, #1a1a2e, #16213e, #0f0f1a);
  background-size: 400% 400%;
  animation: alms-gradient-bg 15s ease infinite;
  min-height: 100vh;
  padding: 0;
}

@keyframes alms-gradient-bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* ── Header ───────────────────────────────────────────────────────────────── */
.alms-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--alms-surface);
  border-bottom: 1px solid var(--alms-border);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

.alms-dash-header__user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alms-avatar {
  border-radius: 50%;
  border: 2px solid var(--alms-primary);
}

.alms-dash-header__greeting {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--alms-text);
}

.alms-dash-header__role {
  font-size: 0.8rem;
  color: var(--alms-primary);
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.alms-dash-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Navigation tabs ──────────────────────────────────────────────────────── */
.alms-dash-nav {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  background: var(--alms-surface);
  border-bottom: 1px solid var(--alms-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.alms-dash-nav::-webkit-scrollbar { display: none; }

.alms-dash-nav__tab {
  padding: 8px 18px;
  border: none;
  border-radius: var(--alms-radius-sm);
  background: transparent;
  color: var(--alms-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--alms-transition), color var(--alms-transition);
}

.alms-dash-nav__tab:hover {
  background: var(--alms-surface-2);
  color: var(--alms-text);
}

.alms-dash-nav__tab--active,
.alms-dash-nav__tab[aria-selected="true"] {
  background: var(--alms-primary);
  color: #fff;
}

/* ── Content panels ───────────────────────────────────────────────────────── */
.alms-dash-content {
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.alms-dash-panel { display: none; }
.alms-dash-panel--active { display: block; animation: alms-fade-in 0.2s ease; }

@keyframes alms-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel header ─────────────────────────────────────────────────────────── */
.alms-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.alms-panel-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--alms-text);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.alms-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--alms-radius-sm);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--alms-transition), transform var(--alms-transition), box-shadow var(--alms-transition);
}

.alms-btn--sm { padding: 7px 14px; font-size: 0.8rem; }

.alms-btn--primary { background: var(--alms-primary); color: #fff; }
.alms-btn--primary:hover { background: var(--alms-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,111,255,0.4); }

.alms-btn--secondary { background: var(--alms-surface-2); color: var(--alms-text); border: 1px solid var(--alms-border); }
.alms-btn--secondary:hover { background: var(--alms-surface); }

.alms-btn--ghost { background: transparent; color: var(--alms-muted); border: 1px solid var(--alms-border); }
.alms-btn--ghost:hover { color: var(--alms-text); background: var(--alms-surface-2); }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.alms-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.alms-course-card {
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  overflow: hidden;
  transition: transform var(--alms-transition), box-shadow var(--alms-transition);
}

.alms-course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--alms-shadow);
}

/* ── Lists ────────────────────────────────────────────────────────────────── */
.alms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alms-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  transition: background var(--alms-transition);
}

.alms-list-item:hover { background: var(--alms-surface-2); }

/* ── Owner stat cards ─────────────────────────────────────────────────────── */
.alms-owner-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--alms-border);
}

.alms-stat-card {
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--alms-transition);
}

.alms-stat-card:hover { transform: translateY(-2px); }

.alms-stat-card__value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--alms-primary);
}

.alms-stat-card__label {
  font-size: 0.8rem;
  color: var(--alms-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Form controls ────────────────────────────────────────────────────────── */
.alms-input, .alms-select {
  background: var(--alms-surface-2);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius-sm);
  color: var(--alms-text);
  padding: 8px 14px;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color var(--alms-transition);
}

.alms-input:focus, .alms-select:focus { border-color: var(--alms-primary); }
.alms-select--sm { width: auto; }

.alms-search-bar { margin-bottom: 16px; }

/* ── Loading skeleton ─────────────────────────────────────────────────────── */
.alms-loading-zone { min-height: 120px; }

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

.alms-skeleton-card, .alms-skeleton-list {
  background: linear-gradient(90deg, var(--alms-surface) 25%, var(--alms-surface-2) 50%, var(--alms-surface) 75%);
  background-size: 200% 100%;
  animation: alms-shimmer 1.5s infinite;
  border-radius: var(--alms-radius);
  height: 180px;
}

.alms-skeleton-list { height: 64px; }

@keyframes alms-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Notification bell ────────────────────────────────────────────────────── */
.alms-notif-bell {
  position: relative;
  cursor: pointer;
  font-size: 1.3rem;
  user-select: none;
}

.alms-notif-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--alms-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Child switcher ───────────────────────────────────────────────────────── */
.alms-child-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--alms-muted);
}

/* ── Login prompt ─────────────────────────────────────────────────────────── */
.alms-login-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 16px;
  text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .alms-dash-content { padding: 16px; }
  .alms-owner-stats  { padding: 16px; }
  .alms-dash-header  { padding: 14px 16px; flex-wrap: wrap; }

  .alms-courses-grid {
    grid-template-columns: 1fr;
  }
}
/* -- Auth Portal ----------------------------------------------------------- */
.alms-portal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.alms-portal-box {
  width: 100%;
  max-width: 420px;
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  padding: 40px 32px;
  box-shadow: var(--alms-shadow);
  animation: alms-fade-in 0.4s ease-out;
}

.alms-portal-header {
  text-align: center;
  margin-bottom: 32px;
}

.alms-portal-logo {
  max-width: 64px;
  margin-bottom: 20px;
  border-radius: 12px;
}

.alms-portal-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
}

.alms-portal-subtitle {
  color: var(--alms-muted);
  font-size: 0.9rem;
  margin: 0;
}

.alms-form-group {
  margin-bottom: 20px;
}

.alms-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--alms-text);
  margin-bottom: 8px;
}

.alms-form-actions {
  margin-top: 32px;
}

.alms-btn--block {
  width: 100%;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1rem;
}

.alms-native-login-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alms-native-login-wrapper p {
  margin: 0;
}

.alms-native-login-wrapper label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--alms-text);
  margin-bottom: 8px;
}

.alms-native-login-wrapper input[type="text"],
.alms-native-login-wrapper input[type="password"] {
  background: var(--alms-surface-2);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius-sm);
  color: var(--alms-text);
  padding: 10px 14px;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: border-color var(--alms-transition);
}

.alms-native-login-wrapper input[type="text"]:focus,
.alms-native-login-wrapper input[type="password"]:focus {
  border-color: var(--alms-primary);
}

.alms-native-login-wrapper .forgetmenot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.alms-native-login-wrapper .forgetmenot label {
  margin: 0;
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.alms-native-login-wrapper .submit input {
  background: var(--alms-primary);
  color: #fff;
  border: none;
  border-radius: var(--alms-radius-sm);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: background var(--alms-transition), transform var(--alms-transition), box-shadow var(--alms-transition);
}

.alms-native-login-wrapper .submit input:hover {
  background: var(--alms-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,111,255,0.4);
}

.alms-portal-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--alms-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.alms-portal-link {
  color: var(--alms-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color var(--alms-transition);
}

.alms-portal-link:hover {
  color: #fff;
}

/* ── Glassmorphism utility ─────────────────────────────────────────────────── */
.glassmorphism {
  background: rgba(255, 255, 255, 0.05) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ── Global container ──────────────────────────────────────────────────────── */
.alms-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Page hero (compact) ───────────────────────────────────────────────────── */
.alms-page-hero--compact {
  padding: 40px 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 32px;
}

.alms-page-hero__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
}

.alms-page-hero__sub { color: rgba(255,255,255,0.5); margin: 0; font-size: 0.95rem; }

/* ── Btn additional variants ───────────────────────────────────────────────── */
.alms-btn--outline {
  background: transparent;
  color: var(--alms-primary);
  border: 1px solid rgba(124,111,255,0.5);
}
.alms-btn--outline:hover {
  background: rgba(124,111,255,0.1);
  border-color: var(--alms-primary);
}
.alms-btn--xs { padding: 4px 10px; font-size: 0.75rem; }
.alms-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Section heading ───────────────────────────────────────────────────────── */
.alms-section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: rgba(255,255,255,0.85);
}

/* ── Back button ───────────────────────────────────────────────────────────── */
.alms-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 24px;
  transition: color 0.2s;
}
.alms-back-btn:hover { color: #fff; }

/* ── Notice + access-denied ────────────────────────────────────────────────── */
.alms-notice--error, .alms-access-denied {
  padding: 20px;
  border-radius: 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444;
}
.alms-auth-wall {
  text-align: center;
  padding: 60px 20px;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */
.alms-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255,255,255,0.4);
}
.alms-empty-state h2 { font-size: 1.3rem; margin: 0 0 8px; }
.alms-empty-state p { margin: 0 0 24px; }

/* ── Loader wrap ───────────────────────────────────────────────────────────── */
.alms-loader-wrap {
  text-align: center;
  padding: 60px;
  color: rgba(255,255,255,0.4);
}
.alms-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(124,111,255,0.2);
  border-top-color: #7c6fff;
  border-radius: 50%;
  animation: alms-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes alms-spin { to { transform: rotate(360deg); } }

/* ── Data table ────────────────────────────────────────────────────────────── */
.alms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 24px;
}
.alms-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.alms-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
}
.alms-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Status badge ──────────────────────────────────────────────────────────── */
.alms-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.alms-status-badge--present { background: rgba(16,185,129,0.15); color: #10b981; }
.alms-status-badge--absent  { background: rgba(239,68,68,0.15);   color: #ef4444; }
.alms-status-badge--late    { background: rgba(245,158,11,0.15);  color: #f59e0b; }

/* ── Page body spacing ─────────────────────────────────────────────────────── */
.alms-page { padding-bottom: 60px; }
.alms-page-hero--compact + .alms-container { padding-top: 0; }

/* ── Stats row utility ─────────────────────────────────────────────────────── */
.alms-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.alms-stats-row .alms-stat-card { flex: 1; min-width: 150px; flex-direction: column; text-align: center; }

/* ── Accessible label ──────────────────────────────────────────────────────── */
.alms-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── HR ────────────────────────────────────────────────────────────────────── */
.alms-hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 16px 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Tablet (≤ 960px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 960px) {
  /* Sidebar collapses on tablet */
  .alms-layout { grid-template-columns: 1fr; }
  .alms-sidebar { display: none; }
  .alms-sidebar--mobile-open { display: block; position: fixed; inset: 0; z-index: 999; }

  /* Nav becomes hamburger */
  .alms-topbar { padding: 0 16px; }
  .alms-topbar__menu { display: none; }
  .alms-topbar__hamburger { display: flex; }

  /* Course grid 2-col */
  .alms-course-grid { grid-template-columns: repeat(2, 1fr); }

  /* Stats 2-col */
  .alms-stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Exam two-column back to single */
  .alms-exam-layout { grid-template-columns: 1fr; }
  .alms-question-panel { max-height: none; }

  /* Batch cards 2-col */
  .alms-batch-grid { grid-template-columns: repeat(2, 1fr); }

  /* Message list + pane stack */
  .alms-messages-layout { grid-template-columns: 1fr; }
  .alms-message-pane { display: none; }
  .alms-message-pane--active { display: flex; }
  .alms-message-list { height: 50vh; }

  /* Leaderboard table — hide rank col */
  .alms-leaderboard-table th:nth-child(1),
  .alms-leaderboard-table td:nth-child(1) { display: none; }

  /* AI Chat */
  .alms-ai-layout { grid-template-columns: 1fr; }
  .alms-ai-sidebar { display: none; }

  /* Analytics charts single-col */
  .alms-analytics-charts { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Mobile (≤ 640px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 640px) {
  /* Portal / auth card */
  .alms-portal-container { padding: 16px; }
  .alms-portal-box { padding: 28px 20px; border-radius: 16px; }
  .alms-portal-logo { width: 56px; height: 56px; }
  .alms-portal-box h2 { font-size: 1.4rem; }

  /* Dashboard hero */
  .alms-page-hero { padding: 28px 0 20px; margin-bottom: 20px; }
  .alms-page-hero__title { font-size: 1.3rem; }
  .alms-page-hero__subtitle { font-size: 0.85rem; }

  /* Container full-bleed on mobile */
  .alms-container { padding: 0 12px; }

  /* Course grid: single column */
  .alms-course-grid { grid-template-columns: 1fr; }

  /* Stats: 2 across */
  .alms-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .alms-stat-card { padding: 16px 12px; }
  .alms-stat-value { font-size: 1.6rem; }

  /* Batch single column */
  .alms-batch-grid { grid-template-columns: 1fr; }

  /* Fees table responsive scroll */
  .alms-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .alms-table { min-width: 540px; }

  /* Certificates grid single col */
  .alms-cert-grid { grid-template-columns: 1fr; }

  /* AI chat input area */
  .alms-chat-input-row { flex-direction: column; gap: 8px; }
  .alms-chat-send-btn { width: 100%; justify-content: center; }

  /* Checkout card full width */
  .alms-checkout-card { padding: 20px 16px; }
  .alms-checkout-summary { flex-direction: column; gap: 8px; }

  /* Profile avatar smaller */
  .alms-profile-avatar { width: 80px; height: 80px; }
  .alms-profile-header { flex-direction: column; align-items: center; text-align: center; }

  /* Buttons full-width in action bars */
  .alms-action-bar { flex-direction: column; }
  .alms-action-bar .alms-btn { width: 100%; justify-content: center; }

  /* Library grid single col */
  .alms-library-grid { grid-template-columns: 1fr; }

  /* Help desk form */
  .alms-helpdesk-form textarea { min-height: 100px; }

  /* Notices list */
  .alms-notice-item { padding: 12px 14px; }

  /* Form row (register: name fields) */
  .alms-form-row { grid-template-columns: 1fr !important; }

  /* Topbar — shrink logo */
  .alms-topbar__logo { font-size: 1rem; }
  .alms-topbar__logo img { height: 28px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Small mobile (≤ 380px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 380px) {
  .alms-stats-grid { grid-template-columns: 1fr; }
  .alms-portal-box { padding: 24px 14px; }
  .alms-btn { padding: 12px 16px; font-size: 0.85rem; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRINT — Certificate page
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media print {
  .alms-topbar, .alms-sidebar, .alms-action-bar,
  .alms-portal-footer, .alms-breadcrumb { display: none !important; }
  .alms-cert-card { box-shadow: none; border: 2px solid #c9a227; }
  body { background: #fff !important; color: #000 !important; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DASHBOARD COMPONENTS — Progress bars, Skeletons, Empty states
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Stats grid ─────────────────────────────────────────────────────────── */
.alms-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

/* ── Progress bar ───────────────────────────────────────────────────────── */
.alms-pbar {
  width: 100%;
}

.alms-pbar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.alms-pbar__label {
  font-size: 0.8rem;
  color: var(--alms-muted, #9090b0);
  font-weight: 500;
}

.alms-pbar__pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--alms-primary, #7c6fff);
}

.alms-pbar__track {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.alms-pbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--alms-primary, #7c6fff), var(--alms-accent, #e85aad));
  border-radius: 100px;
  transition: width 0.4s ease;
  min-width: 0;
}

/* ── Skeleton loaders ───────────────────────────────────────────────────── */
.alms-skel-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alms-skel-wrap:has(.alms-skel--card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.alms-skel-wrap:has(.alms-skel--stat) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.alms-skel {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: alms-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--alms-radius, 12px);
}

.alms-skel--card {
  height: 200px;
}

.alms-skel--stat {
  height: 90px;
}

.alms-skel--list {
  height: 64px;
}

@keyframes alms-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.alms-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
}

.alms-empty h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
}

.alms-empty p {
  font-size: 0.85rem;
  margin: 0;
  max-width: 320px;
}

/* ── Dashboard base ─────────────────────────────────────────────────────── */
.alms-dashboard {
  font-family: var(--alms-font, 'Inter', system-ui, sans-serif);
  color: var(--alms-text, #e8e8f0);
  min-height: 60vh;
}

/* ── Status badge variants ──────────────────────────────────────────────── */
.alms-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.alms-status-badge--active   { background: rgba(124,111,255,0.15); color: #7c6fff; }
.alms-status-badge--completed,
.alms-status-badge--passed   { background: rgba(61,214,140,0.15);  color: #3dd68c; }
.alms-status-badge--failed   { background: rgba(255,83,112,0.15);  color: #ff5370; }
.alms-status-badge--in_progress { background: rgba(245,166,35,0.15); color: #f5a623; }

/* ── Two-column grid utility ────────────────────────────────────────────── */
@media (min-width: 769px) {
  .alms-grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .alms-grid-2-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .alms-skel-wrap:has(.alms-skel--card) {
    grid-template-columns: 1fr;
  }
}
/**
 * Aurelux LMS Frontend — Dashboard Stylesheet
 *
 * Design: dark glassmorphism with deep indigo/violet palette.
 * Fully responsive, accessible, no external dependencies.
 *
 * @package AureluxLMS\Frontend
 */

/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
  --alms-bg:           #0f0f1a;
  --alms-surface:      rgba(255,255,255,0.05);
  --alms-surface-2:    rgba(255,255,255,0.08);
  --alms-border:       rgba(255,255,255,0.10);
  --alms-primary:      #7c6fff;
  --alms-primary-dark: #5a49e8;
  --alms-accent:       #e85aad;
  --alms-success:      #3dd68c;
  --alms-warning:      #f5a623;
  --alms-danger:       #ff5370;
  --alms-text:         #e8e8f0;
  --alms-muted:        #9090b0;
  --alms-radius:       12px;
  --alms-radius-sm:    8px;
  --alms-shadow:       0 8px 32px rgba(0,0,0,0.45);
  --alms-font:         'Inter', system-ui, -apple-system, sans-serif;
  --alms-transition:   220ms ease;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
.alms-dashboard {
  font-family: var(--alms-font);
  color: var(--alms-text);
  background: linear-gradient(-45deg, #0f0f1a, #1a1a2e, #16213e, #0f0f1a);
  background-size: 400% 400%;
  animation: alms-gradient-bg 15s ease infinite;
  min-height: 100vh;
  padding: 0;
}

@keyframes alms-gradient-bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* ── Header ───────────────────────────────────────────────────────────────── */
.alms-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--alms-surface);
  border-bottom: 1px solid var(--alms-border);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

.alms-dash-header__user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alms-avatar {
  border-radius: 50%;
  border: 2px solid var(--alms-primary);
}

.alms-dash-header__greeting {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--alms-text);
}

.alms-dash-header__role {
  font-size: 0.8rem;
  color: var(--alms-primary);
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.alms-dash-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Navigation tabs ──────────────────────────────────────────────────────── */
.alms-dash-nav {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  background: var(--alms-surface);
  border-bottom: 1px solid var(--alms-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.alms-dash-nav::-webkit-scrollbar { display: none; }

.alms-dash-nav__tab {
  padding: 8px 18px;
  border: none;
  border-radius: var(--alms-radius-sm);
  background: transparent;
  color: var(--alms-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--alms-transition), color var(--alms-transition);
}

.alms-dash-nav__tab:hover {
  background: var(--alms-surface-2);
  color: var(--alms-text);
}

.alms-dash-nav__tab--active,
.alms-dash-nav__tab[aria-selected="true"] {
  background: var(--alms-primary);
  color: #fff;
}

/* ── Content panels ───────────────────────────────────────────────────────── */
.alms-dash-content {
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.alms-dash-panel { display: none; }
.alms-dash-panel--active { display: block; animation: alms-fade-in 0.2s ease; }

@keyframes alms-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel header ─────────────────────────────────────────────────────────── */
.alms-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.alms-panel-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--alms-text);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.alms-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--alms-radius-sm);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--alms-transition), transform var(--alms-transition), box-shadow var(--alms-transition);
}

.alms-btn--sm { padding: 7px 14px; font-size: 0.8rem; }

.alms-btn--primary { background: var(--alms-primary); color: #fff; }
.alms-btn--primary:hover { background: var(--alms-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,111,255,0.4); }

.alms-btn--secondary { background: var(--alms-surface-2); color: var(--alms-text); border: 1px solid var(--alms-border); }
.alms-btn--secondary:hover { background: var(--alms-surface); }

.alms-btn--ghost { background: transparent; color: var(--alms-muted); border: 1px solid var(--alms-border); }
.alms-btn--ghost:hover { color: var(--alms-text); background: var(--alms-surface-2); }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.alms-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.alms-course-card {
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  overflow: hidden;
  transition: transform var(--alms-transition), box-shadow var(--alms-transition);
}

.alms-course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--alms-shadow);
}

/* ── Lists ────────────────────────────────────────────────────────────────── */
.alms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alms-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  transition: background var(--alms-transition);
}

.alms-list-item:hover { background: var(--alms-surface-2); }

/* ── Owner stat cards ─────────────────────────────────────────────────────── */
.alms-owner-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--alms-border);
}

.alms-stat-card {
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--alms-transition);
}

.alms-stat-card:hover { transform: translateY(-2px); }

.alms-stat-card__value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--alms-primary);
}

.alms-stat-card__label {
  font-size: 0.8rem;
  color: var(--alms-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Form controls ────────────────────────────────────────────────────────── */
.alms-input, .alms-select {
  background: var(--alms-surface-2);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius-sm);
  color: var(--alms-text);
  padding: 8px 14px;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color var(--alms-transition);
}

.alms-input:focus, .alms-select:focus { border-color: var(--alms-primary); }
.alms-select--sm { width: auto; }

.alms-search-bar { margin-bottom: 16px; }

/* ── Loading skeleton ─────────────────────────────────────────────────────── */
.alms-loading-zone { min-height: 120px; }

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

.alms-skeleton-card, .alms-skeleton-list {
  background: linear-gradient(90deg, var(--alms-surface) 25%, var(--alms-surface-2) 50%, var(--alms-surface) 75%);
  background-size: 200% 100%;
  animation: alms-shimmer 1.5s infinite;
  border-radius: var(--alms-radius);
  height: 180px;
}

.alms-skeleton-list { height: 64px; }

@keyframes alms-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Notification bell ────────────────────────────────────────────────────── */
.alms-notif-bell {
  position: relative;
  cursor: pointer;
  font-size: 1.3rem;
  user-select: none;
}

.alms-notif-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--alms-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Child switcher ───────────────────────────────────────────────────────── */
.alms-child-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--alms-muted);
}

/* ── Login prompt ─────────────────────────────────────────────────────────── */
.alms-login-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 16px;
  text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .alms-dash-content { padding: 16px; }
  .alms-owner-stats  { padding: 16px; }
  .alms-dash-header  { padding: 14px 16px; flex-wrap: wrap; }

  .alms-courses-grid {
    grid-template-columns: 1fr;
  }
}
/* -- Auth Portal ----------------------------------------------------------- */
.alms-portal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.alms-portal-box {
  width: 100%;
  max-width: 420px;
  background: var(--alms-surface);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  padding: 40px 32px;
  box-shadow: var(--alms-shadow);
  animation: alms-fade-in 0.4s ease-out;
}

.alms-portal-header {
  text-align: center;
  margin-bottom: 32px;
}

.alms-portal-logo {
  max-width: 64px;
  margin-bottom: 20px;
  border-radius: 12px;
}

.alms-portal-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
}

.alms-portal-subtitle {
  color: var(--alms-muted);
  font-size: 0.9rem;
  margin: 0;
}

.alms-form-group {
  margin-bottom: 20px;
}

.alms-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--alms-text);
  margin-bottom: 8px;
}

.alms-form-actions {
  margin-top: 32px;
}

.alms-btn--block {
  width: 100%;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1rem;
}

.alms-native-login-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alms-native-login-wrapper p {
  margin: 0;
}

.alms-native-login-wrapper label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--alms-text);
  margin-bottom: 8px;
}

.alms-native-login-wrapper input[type="text"],
.alms-native-login-wrapper input[type="password"] {
  background: var(--alms-surface-2);
  border: 1px solid var(--alms-border);
  border-radius: var(--alms-radius-sm);
  color: var(--alms-text);
  padding: 10px 14px;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: border-color var(--alms-transition);
}

.alms-native-login-wrapper input[type="text"]:focus,
.alms-native-login-wrapper input[type="password"]:focus {
  border-color: var(--alms-primary);
}

.alms-native-login-wrapper .forgetmenot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.alms-native-login-wrapper .forgetmenot label {
  margin: 0;
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.alms-native-login-wrapper .submit input {
  background: var(--alms-primary);
  color: #fff;
  border: none;
  border-radius: var(--alms-radius-sm);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: background var(--alms-transition), transform var(--alms-transition), box-shadow var(--alms-transition);
}

.alms-native-login-wrapper .submit input:hover {
  background: var(--alms-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,111,255,0.4);
}

.alms-portal-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--alms-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.alms-portal-link {
  color: var(--alms-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color var(--alms-transition);
}

.alms-portal-link:hover {
  color: #fff;
}

/* ── Glassmorphism utility ─────────────────────────────────────────────────── */
.glassmorphism {
  background: rgba(255, 255, 255, 0.05) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ── Global container ──────────────────────────────────────────────────────── */
.alms-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Page hero (compact) ───────────────────────────────────────────────────── */
.alms-page-hero--compact {
  padding: 40px 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 32px;
}

.alms-page-hero__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
}

.alms-page-hero__sub { color: rgba(255,255,255,0.5); margin: 0; font-size: 0.95rem; }

/* ── Btn additional variants ───────────────────────────────────────────────── */
.alms-btn--outline {
  background: transparent;
  color: var(--alms-primary);
  border: 1px solid rgba(124,111,255,0.5);
}
.alms-btn--outline:hover {
  background: rgba(124,111,255,0.1);
  border-color: var(--alms-primary);
}
.alms-btn--xs { padding: 4px 10px; font-size: 0.75rem; }
.alms-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Section heading ───────────────────────────────────────────────────────── */
.alms-section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: rgba(255,255,255,0.85);
}

/* ── Back button ───────────────────────────────────────────────────────────── */
.alms-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 24px;
  transition: color 0.2s;
}
.alms-back-btn:hover { color: #fff; }

/* ── Notice + access-denied ────────────────────────────────────────────────── */
.alms-notice--error, .alms-access-denied {
  padding: 20px;
  border-radius: 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444;
}
.alms-auth-wall {
  text-align: center;
  padding: 60px 20px;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */
.alms-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255,255,255,0.4);
}
.alms-empty-state h2 { font-size: 1.3rem; margin: 0 0 8px; }
.alms-empty-state p { margin: 0 0 24px; }

/* ── Loader wrap ───────────────────────────────────────────────────────────── */
.alms-loader-wrap {
  text-align: center;
  padding: 60px;
  color: rgba(255,255,255,0.4);
}
.alms-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(124,111,255,0.2);
  border-top-color: #7c6fff;
  border-radius: 50%;
  animation: alms-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes alms-spin { to { transform: rotate(360deg); } }

/* ── Data table ────────────────────────────────────────────────────────────── */
.alms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 24px;
}
.alms-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.alms-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
}
.alms-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Status badge ──────────────────────────────────────────────────────────── */
.alms-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.alms-status-badge--present { background: rgba(16,185,129,0.15); color: #10b981; }
.alms-status-badge--absent  { background: rgba(239,68,68,0.15);   color: #ef4444; }
.alms-status-badge--late    { background: rgba(245,158,11,0.15);  color: #f59e0b; }

/* ── Page body spacing ─────────────────────────────────────────────────────── */
.alms-page { padding-bottom: 60px; }
.alms-page-hero--compact + .alms-container { padding-top: 0; }

/* ── Stats row utility ─────────────────────────────────────────────────────── */
.alms-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.alms-stats-row .alms-stat-card { flex: 1; min-width: 150px; flex-direction: column; text-align: center; }

/* ── Accessible label ──────────────────────────────────────────────────────── */
.alms-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── HR ────────────────────────────────────────────────────────────────────── */
.alms-hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 16px 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Tablet (≤ 960px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 960px) {
  /* Sidebar collapses on tablet */
  .alms-layout { grid-template-columns: 1fr; }
  .alms-sidebar { display: none; }
  .alms-sidebar--mobile-open { display: block; position: fixed; inset: 0; z-index: 999; }

  /* Nav becomes hamburger */
  .alms-topbar { padding: 0 16px; }
  .alms-topbar__menu { display: none; }
  .alms-topbar__hamburger { display: flex; }

  /* Course grid 2-col */
  .alms-course-grid { grid-template-columns: repeat(2, 1fr); }

  /* Stats 2-col */
  .alms-stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Exam two-column back to single */
  .alms-exam-layout { grid-template-columns: 1fr; }
  .alms-question-panel { max-height: none; }

  /* Batch cards 2-col */
  .alms-batch-grid { grid-template-columns: repeat(2, 1fr); }

  /* Message list + pane stack */
  .alms-messages-layout { grid-template-columns: 1fr; }
  .alms-message-pane { display: none; }
  .alms-message-pane--active { display: flex; }
  .alms-message-list { height: 50vh; }

  /* Leaderboard table — hide rank col */
  .alms-leaderboard-table th:nth-child(1),
  .alms-leaderboard-table td:nth-child(1) { display: none; }

  /* AI Chat */
  .alms-ai-layout { grid-template-columns: 1fr; }
  .alms-ai-sidebar { display: none; }

  /* Analytics charts single-col */
  .alms-analytics-charts { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Mobile (≤ 640px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 640px) {
  /* Portal / auth card */
  .alms-portal-container { padding: 16px; }
  .alms-portal-box { padding: 28px 20px; border-radius: 16px; }
  .alms-portal-logo { width: 56px; height: 56px; }
  .alms-portal-box h2 { font-size: 1.4rem; }

  /* Dashboard hero */
  .alms-page-hero { padding: 28px 0 20px; margin-bottom: 20px; }
  .alms-page-hero__title { font-size: 1.3rem; }
  .alms-page-hero__subtitle { font-size: 0.85rem; }

  /* Container full-bleed on mobile */
  .alms-container { padding: 0 12px; }

  /* Course grid: single column */
  .alms-course-grid { grid-template-columns: 1fr; }

  /* Stats: 2 across */
  .alms-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .alms-stat-card { padding: 16px 12px; }
  .alms-stat-value { font-size: 1.6rem; }

  /* Batch single column */
  .alms-batch-grid { grid-template-columns: 1fr; }

  /* Fees table responsive scroll */
  .alms-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .alms-table { min-width: 540px; }

  /* Certificates grid single col */
  .alms-cert-grid { grid-template-columns: 1fr; }

  /* AI chat input area */
  .alms-chat-input-row { flex-direction: column; gap: 8px; }
  .alms-chat-send-btn { width: 100%; justify-content: center; }

  /* Checkout card full width */
  .alms-checkout-card { padding: 20px 16px; }
  .alms-checkout-summary { flex-direction: column; gap: 8px; }

  /* Profile avatar smaller */
  .alms-profile-avatar { width: 80px; height: 80px; }
  .alms-profile-header { flex-direction: column; align-items: center; text-align: center; }

  /* Buttons full-width in action bars */
  .alms-action-bar { flex-direction: column; }
  .alms-action-bar .alms-btn { width: 100%; justify-content: center; }

  /* Library grid single col */
  .alms-library-grid { grid-template-columns: 1fr; }

  /* Help desk form */
  .alms-helpdesk-form textarea { min-height: 100px; }

  /* Notices list */
  .alms-notice-item { padding: 12px 14px; }

  /* Form row (register: name fields) */
  .alms-form-row { grid-template-columns: 1fr !important; }

  /* Topbar — shrink logo */
  .alms-topbar__logo { font-size: 1rem; }
  .alms-topbar__logo img { height: 28px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — Small mobile (≤ 380px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 380px) {
  .alms-stats-grid { grid-template-columns: 1fr; }
  .alms-portal-box { padding: 24px 14px; }
  .alms-btn { padding: 12px 16px; font-size: 0.85rem; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRINT — Certificate page
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media print {
  .alms-topbar, .alms-sidebar, .alms-action-bar,
  .alms-portal-footer, .alms-breadcrumb { display: none !important; }
  .alms-cert-card { box-shadow: none; border: 2px solid #c9a227; }
  body { background: #fff !important; color: #000 !important; }
}
