/* ============================================================
   style.css — Global styles for SPSPL Training Portal
   Blue & White Corporate Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── VARIABLES ── */
:root {
  /* Brand — Corporate Blue */
  --p:        #1e40af;
  --p-hover:  #1e3a8a;
  --p-light:  #dbeafe;
  --p-mid:    #3b82f6;
  --p-dark:   #172554;

  /* Accent — Sky Blue */
  --ac:       #0ea5e9;
  --ac-light: #e0f2fe;

  /* Surfaces — Clean white/blue tint */
  --bg:       #f0f4ff;
  --surface:  #FFFFFF;
  --surface2: #eff6ff;
  --surface3: #dbeafe;

  /* Borders */
  --border:   #bfdbfe;
  --border2:  #93c5fd;

  /* Text — Slate for readability */
  --tx:       #0f172a;
  --tx2:      #475569;
  --tx3:      #94a3b8;

  /* Semantic */
  --red:      #EF4444;
  --red-bg:   #FEF2F2;
  --green:    #0ea5e9;
  --green-bg: #e0f2fe;
  --amber:    #F59E0B;
  --amber-bg: #FEF3C7;
  --info:     #3B82F6;
  --info-bg:  #EFF6FF;

  /* Layout */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  22px;

  /* Shadows — Blue-tinted */
  --shadow-sm: 0 1px 2px rgba(30,64,175,.05), 0 2px 6px rgba(30,64,175,.06);
  --shadow:    0 1px 3px rgba(30,64,175,.06), 0 4px 14px rgba(30,64,175,.08);
  --shadow-lg: 0 4px 8px rgba(30,64,175,.08), 0 12px 28px rgba(30,64,175,.12);

  /* Transitions */
  --t: .18s ease;
}

/* Dark mode — Deep blue-grey */
html.is_dark {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --surface2: #334155;
  --surface3: #475569;
  --border:   #334155;
  --border2:  #475569;
  --tx:       #f8fafc;
  --tx2:      #cbd5e1;
  --tx3:      #64748b;
  --p-light:  #1e3a8a;
  --p-mid:    #60a5fa;
  --red-bg:   rgba(239,68,68,.15);
  --green-bg: rgba(14,165,233,.12);
  --amber-bg: rgba(245,158,11,.12);
  --info-bg:  rgba(59,130,246,.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.25);
  --shadow:    0 2px 10px rgba(0,0,0,.30);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.35);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--tx);
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
}

a { color: var(--p); text-decoration: none; }
a:hover { color: var(--p-hover); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── TYPOGRAPHY ── */
h1 { font-size: 28px; font-weight: 700; line-height: 1.25; }
h2 { font-size: 22px; font-weight: 700; line-height: 1.3;  }
h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }
h4 { font-size: 16px; font-weight: 600; line-height: 1.4;  }
h5 { font-size: 14px; font-weight: 600; }
h6 { font-size: 13px; font-weight: 600; }

p { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

/* ── DARK / LIGHT TOGGLE ── */
.my_switcher {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
}
.my_switcher button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
  color: var(--tx2);
}
.my_switcher button:hover { background: var(--surface2); }
.my_switcher button svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.my_switcher .light__mode { display: none; }
.my_switcher .dark__mode  { display: block; }
html.is_dark .my_switcher .light__mode { display: block; }
html.is_dark .my_switcher .dark__mode  { display: none; }
.my_switcher span { display: none; }

/* ── HEADER ── */
.lms-header {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: background var(--t), border-color var(--t);
}
.lms-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lms-header__mark {
  width: 36px;
  height: 36px;
  background: var(--p);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lms-header__mark svg {
  width: 18px; height: 18px;
  stroke: #fff; fill: none; stroke-width: 2;
}
.lms-header__name {
  font-weight: 700;
  font-size: 15px;
  color: var(--tx);
}
.lms-header__mark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.lms-header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lms-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--p-light);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--p);
  overflow: hidden;
  flex-shrink: 0;
}
.lms-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── PAGE LAYOUT ── */
.lms-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - 60px);
}
.lms-main {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-x: hidden;
}

/* ── SIDEBAR ── */
.lms-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem .875rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  transition: background var(--t);
}
.lms-sidebar::-webkit-scrollbar { width: 4px; }
.lms-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sb-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tx3);
  padding: 0 .625rem;
  margin: 1rem 0 .35rem;
}
.sb-section:first-child { margin-top: .25rem; }

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--tx2);
  text-decoration: none;
  transition: background var(--t), color var(--t);
  position: relative;
}
.sb-item svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
  flex-shrink: 0;
  opacity: .65;
  transition: opacity var(--t);
}
.sb-item:hover { background: var(--surface2); color: var(--tx); }
.sb-item:hover svg { opacity: 1; }
.sb-item.active {
  background: var(--p-light);
  color: var(--p);
  font-weight: 600;
}
html.is_dark .sb-item.active {
  background: var(--p-dark);
  color: var(--p-mid);
}
.sb-item.active svg { opacity: 1; stroke: var(--p); }
html.is_dark .sb-item.active svg { stroke: var(--p-mid); }
.sb-item.danger { color: var(--red); }
.sb-item.danger svg { stroke: var(--red); opacity: .8; }
.sb-item.danger:hover { background: var(--red-bg); }

.sb-divider {
  height: 1px;
  background: var(--border);
  margin: .5rem .625rem;
}

/* ── BANNER ── */
.lms-banner {
  background: var(--p);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.lms-banner::before {
  content: '';
  position: absolute;
  right: -40px; top: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 44px solid rgba(255,255,255,.06);
}
.lms-banner::after {
  content: '';
  position: absolute;
  right: 90px; bottom: -70px;
  width: 170px; height: 170px;
  border-radius: 50%;
  border: 34px solid rgba(255,255,255,.04);
}
.lms-banner__left { position: relative; z-index: 1; }
.lms-banner__title { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.lms-banner__sub   { font-size: 13px; opacity: .75; }

.lms-banner__pills {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.lms-pill {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lms-pill svg {
  width: 13px; height: 13px;
  stroke: #fff; fill: none; stroke-width: 2; opacity: .85;
}
.lms-banner__btn {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background var(--t);
  text-decoration: none;
}
.lms-banner__btn:hover { background: rgba(255,255,255,.25); color: #fff; }
.lms-banner__btn svg {
  width: 16px; height: 16px;
  stroke: #fff; fill: none; stroke-width: 2.5;
}

/* ── STAT CARDS ── */
.lms-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .875rem;
}
.lms-stat {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: box-shadow var(--t), border-color var(--t);
}
.lms-stat:hover { box-shadow: var(--shadow); border-color: var(--border2); }
.lms-stat__top { display: flex; align-items: center; justify-content: space-between; }
.lms-stat__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.lms-stat__icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.lms-stat__icon.purple { background: var(--p-light); color: var(--p); }
.lms-stat__icon.teal   { background: var(--ac-light); color: #0369a1; }
.lms-stat__icon.amber  { background: var(--amber-bg); color: #B45309; }
.lms-stat__icon.red    { background: var(--red-bg);   color: var(--red); }
html.is_dark .lms-stat__icon.purple { background: var(--p-dark); color: var(--p-mid); }
html.is_dark .lms-stat__icon.teal   { background: rgba(14,165,233,.12); color: var(--ac); }
html.is_dark .lms-stat__icon.amber  { background: rgba(245,158,11,.12); color: #FCD34D; }
html.is_dark .lms-stat__icon.red    { background: rgba(239,68,68,.12);  color: #FCA5A5; }
.lms-stat__delta {
  font-size: 11px; font-weight: 600;
  color: var(--ac); background: var(--ac-light);
  padding: 2px 8px; border-radius: 20px;
}
html.is_dark .lms-stat__delta { background: rgba(14,165,233,.12); }
.lms-stat__num   { font-size: 26px; font-weight: 700; color: var(--tx); line-height: 1; }
.lms-stat__label { font-size: 12px; color: var(--tx3); font-weight: 500; }

/* ── SECTION HEADER ── */
.lms-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.lms-section-title { font-size: 14px; font-weight: 600; color: var(--tx); }
.lms-section-link  { font-size: 12px; font-weight: 500; color: var(--p); }

/* ── CONTENT CARD ── */
.lms-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  transition: box-shadow var(--t), border-color var(--t);
}
.lms-card:hover { box-shadow: var(--shadow); }

/* ── COURSE / NOTE CARDS GRID ── */
.lms-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .875rem;
}
.lms-note-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.lms-note-card:hover {
  border-color: var(--p-mid);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.lms-note-card__top {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .875rem;
}
.lms-note-card__icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--p-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--t);
}
.lms-note-card:hover .lms-note-card__icon { transform: scale(1.06); }
html.is_dark .lms-note-card__icon { background: var(--p-dark); }
.lms-note-card__icon svg {
  width: 20px; height: 20px;
  stroke: var(--p); fill: none; stroke-width: 2;
}
html.is_dark .lms-note-card__icon svg { stroke: var(--p-mid); }
.lms-note-card__title {
  font-size: 13px; font-weight: 600; color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.lms-note-card__sub { font-size: 11px; color: var(--tx3); }
.lms-note-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--surface2);
  margin-top: auto;
}
.lms-note-card__link { font-size: 12px; font-weight: 600; color: var(--p); }
.lms-note-card__count { font-size: 11px; color: var(--tx3); }

/* ── TABLE ── */
.lms-table-wrap { overflow-x: auto; }
.lms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lms-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tx3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.lms-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--tx2);
  vertical-align: middle;
}
.lms-table tr:last-child td { border-bottom: none; }
.lms-table tr:hover td { background: var(--surface2); }
.lms-table .user-pic {
  width: 34px; height: 34px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}

/* ── BADGE ── */
.lms-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.lms-badge.admin   { background: var(--p-light); color: var(--p); }
.lms-badge.student { background: var(--ac-light); color: #0369a1; }
html.is_dark .lms-badge.admin   { background: var(--p-dark); color: var(--p-mid); }
html.is_dark .lms-badge.student { background: rgba(14,165,233,.12); color: var(--ac); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--p); color: #fff; }
.btn-primary:hover { background: var(--p-hover); color: #fff; box-shadow: 0 4px 12px rgba(30,64,175,.3); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--tx2);
}
.btn-outline:hover { background: var(--surface2); border-color: var(--border2); color: var(--tx); }

.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-success { background: var(--ac-light); color: #0369a1; border: 1px solid rgba(14,165,233,.2); }
.btn-success:hover { background: var(--ac); color: #fff; }

.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }

/* ── FORM ELEMENTS ── */
.lms-form-group { margin-bottom: 1rem; }
.lms-form-group:last-child { margin-bottom: 0; }
.lms-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx2);
  margin-bottom: 5px;
  letter-spacing: .01em;
}
.lms-input {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--tx);
  background: var(--surface2);
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  outline: none;
}
.lms-input:focus {
  border-color: var(--p);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(30,64,175,.1);
}
html.is_dark .lms-input {
  background: var(--surface3);
  border-color: var(--border);
  color: var(--tx);
}
.lms-input::placeholder { color: var(--tx3); }
.lms-select { appearance: none; cursor: pointer; }
.lms-textarea { resize: vertical; min-height: 90px; }

/* ── ALERTS / MESSAGES ── */
.lms-alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lms-alert svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.lms-alert.success { background: var(--green-bg); color: #0369a1; }
.lms-alert.error   { background: var(--red-bg);   color: var(--red); }
.lms-alert.info    { background: var(--info-bg);   color: var(--info); }
.lms-alert.warn    { background: var(--amber-bg);  color: #B45309; }

/* ── EMPTY STATE ── */
.lms-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface2);
  border: 2px dashed var(--border);
  color: var(--tx3);
}
.lms-empty svg {
  width: 40px; height: 40px;
  stroke: var(--tx3); fill: none; stroke-width: 1.5;
  margin: 0 auto 1rem;
}
.lms-empty h5 { color: var(--tx2); margin-bottom: .35rem; }
.lms-empty p { font-size: 13px; margin-bottom: 1.25rem; }

/* ── MODAL ── */
.lms-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lms-modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  animation: modal-in .2s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.lms-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lms-modal-title { font-size: 15px; font-weight: 700; color: var(--tx); }
.lms-modal-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface2);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx3);
  transition: background var(--t), color var(--t);
}
.lms-modal-close:hover { background: var(--surface3); color: var(--tx); }
.lms-modal-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.lms-modal-body { padding: 1.5rem; }

/* ── TOAST ── */
.lms-toast-wrap {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.lms-toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx);
  max-width: 320px;
  transform: translateX(360px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  pointer-events: all;
}
.lms-toast.show { transform: translateX(0); }
.lms-toast svg  { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.lms-toast.success { border-left: 3px solid var(--ac); }
.lms-toast.success svg { stroke: var(--ac); }
.lms-toast.error   { border-left: 3px solid var(--red); }
.lms-toast.error svg { stroke: var(--red); }

/* ── FOOTER ── */
.lms-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 12px;
  color: var(--tx3);
  flex-wrap: wrap;
}
.lms-footer a { color: var(--tx3); }
.lms-footer a:hover { color: var(--p); }

/* ── UTILITIES ── */
.text-primary   { color: var(--tx);  }
.text-secondary { color: var(--tx2); }
.text-muted     { color: var(--tx3); }
.text-brand     { color: var(--p);   }
.text-success   { color: var(--ac);  }
.text-danger    { color: var(--red); }
.text-center    { text-align: center; }
.text-right     { text-align: right; }

.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }  .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1 { gap: .5rem; }  .gap-2 { gap: .875rem; }
.gap-3 { gap: 1.25rem; }

.w-full { width: 100%; }
.hidden { display: none; }

/* ── HAMBURGER BUTTON (mobile only) ── */
.lms-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t);
}
.lms-hamburger:hover { background: var(--surface3); }
.lms-hamburger svg { width: 18px; height: 18px; stroke: var(--tx2); fill: none; stroke-width: 2; }

/* Overlay behind drawer */
.lms-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 998;
  backdrop-filter: blur(2px);
}
.lms-sidebar-overlay.open { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .lms-layout { grid-template-columns: 200px 1fr; }
}

@media (max-width: 768px) {
  .lms-hamburger { display: flex; }
  .lms-layout    { grid-template-columns: 1fr; }
  .lms-header    { padding: 0 1rem; }

  /* Sidebar becomes a slide-in drawer */
  .lms-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 240px;
    height: 100vh;
    z-index: 999;
    padding-top: 1rem;
    border-right: 1px solid var(--border);
    transition: left .25s ease, box-shadow .25s ease;
  }
  .lms-sidebar.open {
    left: 0;
    box-shadow: 4px 0 32px rgba(15,23,42,.22);
  }

  .lms-main   { padding: 1rem; }
  .lms-banner { flex-direction: column; align-items: flex-start; }
  .lms-stats  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .lms-stats      { grid-template-columns: 1fr; }
  .lms-cards-grid { grid-template-columns: 1fr; }
}
 