/* =========================================================
   Morning Glory Montessori — Design System v2
   A modern, soft, nature-inspired interface
   ========================================================= */

:root {
  /* Brand blues (variable names kept for compatibility) */
  --mg-green:        #1d3a8f;   /* primary royal blue */
  --mg-green-dark:   #122a6b;   /* deep navy */
  --mg-green-light:  #2b54c9;   /* bright blue */
  --mg-green-soft:   #7d99e6;
  --mg-green-pale:   #dde6fb;
  --mg-green-mist:   #eef2fd;

  /* Gold accent */
  --mg-amber:        #f5b800;
  --mg-amber-dark:   #d99a00;
  --mg-amber-light:  #fdf0c6;
  --mg-earth:        #4a3a1a;
  --mg-sky:          #1a759f;
  --mg-violet:       #7b6cf6;

  /* Neutrals */
  --mg-ink:          #16213f;
  --mg-text:         #243049;
  --mg-muted:        #6b7488;
  --mg-faint:        #9aa1b3;
  --mg-line:         #e6eaf3;
  --mg-bg:           #f4f6fb;
  --mg-bg-2:         #eef1f9;
  --mg-card:         #ffffff;

  /* Effects */
  --radius:          18px;
  --radius-sm:       12px;
  --radius-lg:       24px;
  --shadow-sm:       0 1px 2px rgba(20,36,28,.06), 0 2px 6px rgba(20,36,28,.05);
  --shadow:          0 4px 14px rgba(20,36,28,.07), 0 1px 4px rgba(20,36,28,.05);
  --shadow-md:       0 10px 30px rgba(20,36,28,.10), 0 4px 10px rgba(20,36,28,.06);
  --shadow-lg:       0 24px 60px rgba(20,36,28,.18);
  --shadow-green:    0 8px 24px rgba(29,58,143,.30);

  --gradient-green:  linear-gradient(135deg, #1d3a8f 0%, #2b54c9 100%);
  --gradient-brand:  linear-gradient(135deg, #122a6b 0%, #1d3a8f 55%, #2b54c9 100%);
  --gradient-amber:  linear-gradient(135deg, #f5b800 0%, #d99a00 100%);

  --sidebar-w:       268px;
  --ease:            cubic-bezier(.16,.84,.44,1);
}

/* ── Reset / Global ──────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -5%, rgba(43,84,201,.12), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(244,162,97,.12), transparent 55%),
    var(--mg-bg);
  background-attachment: fixed;
  color: var(--mg-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .page-title, .brand-name {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  letter-spacing: -.015em;
}

a { color: var(--mg-green); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--mg-green-light); }

::selection { background: var(--mg-green-pale); color: var(--mg-green-dark); }

/* Custom weight + helper utilities (used across pages) */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.min-w-0 { min-width: 0 !important; }
.opacity-40 { opacity: .4 !important; }

/* Scrollbar polish */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(29,58,143,.22); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(29,58,143,.4); background-clip: padding-box; }

/* ── Sidebar ─────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--gradient-brand);
  position: fixed;
  top: 0; left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease);
  box-shadow: 4px 0 30px rgba(20,36,28,.12);
  overflow: hidden;
}

/* decorative glow */
#sidebar::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(125,153,230,.4), transparent 70%);
  pointer-events: none;
}

#sidebar .sidebar-brand {
  padding: 1.5rem 1.4rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  position: relative;
}

#sidebar .brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

#sidebar .brand-sub {
  font-size: .68rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
}

#sidebar .sidebar-brand span[style] {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
}

#sidebar .nav-section-label {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  padding: 1rem 1.5rem .4rem;
}

#sidebar .nav-link {
  position: relative;
  color: rgba(255,255,255,.8);
  padding: .62rem 1rem;
  border-radius: 12px;
  margin: 2px .85rem;
  font-size: .875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: background .2s var(--ease), color .2s, transform .2s var(--ease);
}

#sidebar .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  opacity: .9;
  transition: transform .2s var(--ease);
}

#sidebar .nav-link:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateX(2px);
}
#sidebar .nav-link:hover i { transform: scale(1.12); }

#sidebar .nav-link.active {
  background: rgba(255,255,255,.96);
  color: var(--mg-green-dark);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
#sidebar .nav-link.active i { color: var(--mg-green); opacity: 1; }

/* active accent bar */
#sidebar .nav-link.active::before {
  content: '';
  position: absolute;
  left: -.85rem; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--mg-amber);
}

#sidebar .sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

#sidebar .sidebar-footer > div {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: .6rem .7rem;
  backdrop-filter: blur(6px);
}

/* ── Main wrapper ────────────────────────────────────────── */
#main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ──────────────────────────────────────────────── */
#topbar {
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--mg-line);
  padding: .85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

#topbar .page-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--mg-ink);
  margin: 0;
}

/* ── Page content ────────────────────────────────────────── */
#page-content {
  flex: 1;
  padding: 1.9rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  animation: pageIn .45s var(--ease);
}

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

/* ── Stat cards ──────────────────────────────────────────── */
.stat-card {
  position: relative;
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--mg-card);
  box-shadow: var(--shadow);
  border: 1px solid var(--mg-line);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: .05;
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.stat-card .stat-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}

.stat-card .stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}
.stat-card .stat-label {
  font-size: .74rem;
  color: var(--mg-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .25rem;
}

/* ── Badges ──────────────────────────────────────────────── */
.entry-badge {
  font-size: .68rem;
  font-weight: 800;
  padding: .32em .75em;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
}

.badge-developmental { background: #d8f3dc; color: #1b4332; }
.badge-behavioral    { background: #fff3cd; color: #7a5b00; }
.badge-emotional     { background: #fce4ec; color: #a01453; }
.badge-social        { background: #e3f2fd; color: #0d47a1; }
.badge-language      { background: #f3e5f5; color: #6a1b9a; }
.badge-cognitive     { background: #e8f5e9; color: #2e7d32; }
.badge-physical      { background: #fbe9e7; color: #c0360b; }
.badge-general       { background: #eceff1; color: #455a64; }

.badge-positive         { background: #d8f3dc; color: #1b4332; }
.badge-neutral          { background: #eef1f0; color: #4a5750; }
.badge-needs_attention  { background: #fff3cd; color: #7a5b00; }

/* ── Avatars ─────────────────────────────────────────────── */
.student-avatar {
  width: 48px; height: 48px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--gradient-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.student-avatar-lg {
  width: 96px; height: 96px;
  border-radius: 28px;
  background: var(--gradient-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  box-shadow: var(--shadow-green);
}

/* ── Cards ───────────────────────────────────────────────── */
.mg-card {
  background: var(--mg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--mg-line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.mg-card:hover { box-shadow: var(--shadow-md); }

.entry-card {
  position: relative;
  border: 1px solid var(--mg-line);
  border-left: 4px solid var(--mg-green-light);
  border-radius: var(--radius-sm);
  background: var(--mg-card);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.entry-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}
.entry-card.sentiment-positive        { border-left-color: var(--mg-green-light); }
.entry-card.sentiment-neutral         { border-left-color: #aebbb3; }
.entry-card.sentiment-needs_attention { border-left-color: var(--mg-amber); }

.profile-section {
  background: var(--mg-card);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--mg-line);
  margin-bottom: 1.5rem;
}

/* ── Timeline ────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2.1rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: .62rem; top: .3rem; bottom: 0;
  width: 2px;
  background: linear-gradient(var(--mg-green-soft), var(--mg-green-pale));
}

.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem; top: .4rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--mg-green-light);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px var(--mg-green-pale);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  border-radius: 12px;
  font-weight: 700;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { border-radius: 10px; }

.btn-mg-primary {
  background: var(--gradient-green);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(29,58,143,.30);
}
.btn-mg-primary:hover {
  color: #fff;
  box-shadow: 0 8px 20px rgba(29,58,143,.42);
  transform: translateY(-1px);
}

.btn-mg-outline {
  border: 1.5px solid var(--mg-green);
  color: var(--mg-green);
  background: transparent;
  font-weight: 700;
}
.btn-mg-outline:hover {
  background: var(--mg-green);
  color: #fff;
  box-shadow: 0 6px 16px rgba(29,58,143,.30);
}

.btn-outline-secondary {
  border-radius: 12px;
  border-color: var(--mg-line);
  color: var(--mg-muted);
}
.btn-outline-secondary:hover {
  background: var(--mg-bg-2);
  border-color: var(--mg-faint);
  color: var(--mg-text);
}

/* ── Forms ───────────────────────────────────────────────── */
.form-label { font-weight: 700; color: var(--mg-text); }

.form-control, .form-select {
  border-radius: 12px;
  border: 1.5px solid var(--mg-line);
  background: #fff;
  padding: .55rem .85rem;
  transition: border-color .18s, box-shadow .18s;
  color: var(--mg-text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--mg-green-soft);
  box-shadow: 0 0 0 .22rem rgba(43,84,201,.16);
}
.form-control::placeholder { color: var(--mg-faint); }

.input-group-text {
  border-radius: 12px;
  border: 1.5px solid var(--mg-line);
  background: var(--mg-green-mist);
  color: var(--mg-green);
}
.input-group > .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .input-group-text:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* ── Tables ──────────────────────────────────────────────── */
.table { color: var(--mg-text); }
.table > :not(caption) > * > * { padding: .85rem 1rem; }
.table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mg-muted);
  font-weight: 800;
  border-bottom: 1.5px solid var(--mg-line);
  background: var(--mg-green-mist);
}
.table tbody tr { transition: background .15s; }
.table-hover tbody tr:hover { background: var(--mg-green-mist); }

/* ── Generic Bootstrap component polish ──────────────────── */
.card { border-radius: var(--radius); border: 1px solid var(--mg-line); box-shadow: var(--shadow-sm); }
.alert { border-radius: var(--radius-sm); border: none; box-shadow: var(--shadow-sm); }
.alert-success { background: #d8f3dc; color: #1b4332; }
.alert-danger  { background: #fde8e8; color: #9b1c1c; }
.alert-warning { background: var(--mg-amber-light); color: #8a4b1f; }
.badge.rounded-pill { font-weight: 700; padding: .4em .8em; }
.dropdown-menu {
  border-radius: var(--radius-sm);
  border: 1px solid var(--mg-line);
  box-shadow: var(--shadow-md);
  padding: .4rem;
}
.dropdown-item { border-radius: 9px; font-weight: 600; padding: .5rem .75rem; }
.dropdown-item:hover { background: var(--mg-green-mist); color: var(--mg-green-dark); }
.modal-content { border-radius: var(--radius); border: none; box-shadow: var(--shadow-lg); }
.nav-tabs { border-bottom: 1.5px solid var(--mg-line); }
.nav-tabs .nav-link { border: none; font-weight: 700; color: var(--mg-muted); border-radius: 10px 10px 0 0; }
.nav-tabs .nav-link.active { color: var(--mg-green); background: transparent; border-bottom: 2.5px solid var(--mg-green); }

/* ── Topbar widgets (added in header) ────────────────────── */
.topbar-pill {
  background: var(--mg-green-mist);
  color: var(--mg-green-dark);
  font-size: .75rem;
  font-weight: 800;
  padding: .45em .9em;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid rgba(29,58,143,.14);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .3rem .35rem .3rem .75rem;
  border-radius: 30px;
  border: 1px solid var(--mg-line);
  background: #fff;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s;
}
.topbar-user:hover { box-shadow: var(--shadow-sm); border-color: var(--mg-green-soft); }
.topbar-user .tu-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gradient-green);
  color: #fff; font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Dashboard hero ──────────────────────────────────────── */
.dash-hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: 1.9rem 2rem;
  color: #fff;
  box-shadow: var(--shadow-green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.dash-hero::before {
  content: '🌻';
  position: absolute;
  right: -10px; bottom: -34px;
  font-size: 9rem;
  opacity: .14;
  transform: rotate(-12deg);
  pointer-events: none;
}
.dash-hero::after {
  content: '';
  position: absolute;
  top: -80px; right: 28%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(125,153,230,.5), transparent 70%);
  pointer-events: none;
}
.dash-hero-content { position: relative; z-index: 1; }
.dash-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35em .85em;
  border-radius: 30px;
  backdrop-filter: blur(4px);
}
.dash-hero-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin: .35rem 0 .25rem;
  color: #fff;
}
.dash-hero-sub { color: rgba(255,255,255,.82); font-size: .92rem; font-weight: 600; }
.dash-hero-sub strong { color: #fff; }
.dash-hero-actions { position: relative; z-index: 1; display: flex; gap: .6rem; flex-wrap: wrap; }
.dash-hero-actions .btn-light { color: var(--mg-green-dark); border: none; }
.dash-hero-actions .btn-outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.dash-hero-actions .btn-outline-light:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Insight cards ───────────────────────────────────────── */
.insight-card { padding: 1.25rem 1.4rem; }
.insight-icon {
  width: 50px; height: 50px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.sentiment-bar {
  display: flex;
  height: 12px;
  border-radius: 30px;
  overflow: hidden;
  background: var(--mg-bg-2);
}
.sentiment-bar span { display: block; height: 100%; transition: width .6s var(--ease); }
.sentiment-bar span:first-child { border-radius: 30px 0 0 30px; }
.sentiment-bar span:last-child { border-radius: 0 30px 30px 0; }

/* ── Structured profile record ───────────────────────────── */
.ps-sec-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--mg-green-mist);
  color: var(--mg-green);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}

.ps-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.ps-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .8rem;
  border: 1.5px solid var(--mg-line);
  border-radius: 30px;
  background: #fff;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  margin: 0;
}
.ps-chip .form-check-input { margin: 0; cursor: pointer; }
.ps-chip:hover { border-color: var(--mg-green-soft); }
.ps-chip:has(.form-check-input:checked) {
  border-color: var(--mg-green);
  background: var(--mg-green-mist);
  color: var(--mg-green-dark);
}

.ps-readonly dt { letter-spacing: .01em; }
.ps-readonly dd { font-weight: 600; }

.ps-table th {
  font-size: .68rem !important;
  white-space: nowrap;
}

/* Sticky section navigation (legacy list — kept for reuse) */
.profile-toc { position: sticky; top: 90px; }
.profile-toc a {
  display: block;
  padding: .4rem .75rem;
  border-radius: 9px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--mg-muted);
  border-left: 2px solid transparent;
}
.profile-toc a:hover { background: var(--mg-green-mist); color: var(--mg-green-dark); text-decoration: none; }

/* Section tabs */
.ps-tabs-wrap {
  position: sticky;
  top: 70px;
  z-index: 20;
  background: var(--mg-bg);
  padding: .5rem 0;
  margin: -.25rem 0 0;
}
.ps-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .35rem;
  scrollbar-width: thin;
  list-style: none;
  margin: 0;
}
.ps-tabs::-webkit-scrollbar { height: 6px; }
.ps-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  padding: .5rem .9rem;
  border-radius: 30px;
  border: 1.5px solid var(--mg-line);
  background: #fff;
  color: var(--mg-muted);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.ps-tab i { font-size: .85rem; opacity: .8; }
.ps-tab:hover { border-color: var(--mg-green-soft); color: var(--mg-green-dark); }
.ps-tab .ps-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--mg-green-mist);
  color: var(--mg-green);
  font-size: .7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.ps-tab.active {
  background: var(--gradient-green);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-green);
}
.ps-tab.active i { opacity: 1; }
.ps-tab.active .ps-tab-num { background: rgba(255,255,255,.25); color: #fff; }

/* hide tab label on small screens, keep number + icon */
@media (max-width: 576px) {
  .ps-tab > span:not(.ps-tab-num) { display: none; }
}

/* ── Misc ────────────────────────────────────────────────── */
.milestone-star { color: var(--mg-amber); filter: drop-shadow(0 1px 2px rgba(244,162,97,.4)); }

.section-header {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mg-muted);
  margin-bottom: .75rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--mg-faint);
}
.empty-state i { color: var(--mg-green-soft); }

/* ── Login page ──────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(125,153,230,.45), transparent 55%),
    radial-gradient(700px 500px at 100% 100%, rgba(244,162,97,.3), transparent 55%),
    var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
/* floating blobs */
.login-wrapper::before,
.login-wrapper::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: .25;
  animation: floaty 9s ease-in-out infinite;
}
.login-wrapper::before { width: 220px; height: 220px; background: #7d99e6; top: 8%; left: 12%; }
.login-wrapper::after  { width: 300px; height: 300px; background: #f4a261; bottom: 6%; right: 10%; animation-delay: -4s; }

@keyframes floaty {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-26px) scale(1.06); }
}

.login-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,.97);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 430px;
  border: 1px solid rgba(255,255,255,.6);
  animation: cardIn .5s var(--ease);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 992px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.show { transform: translateX(0); }
  #main-wrapper { margin-left: 0; }
}
@media (max-width: 576px) {
  #page-content { padding: 1.1rem; }
  #topbar { padding: .7rem 1rem; }
  .login-card { padding: 2rem 1.5rem; }
}

/* sidebar mobile backdrop */
#sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,36,28,.45);
  backdrop-filter: blur(2px);
  z-index: 1035;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s;
}
#sidebar-backdrop.show { opacity: 1; visibility: visible; }
