/* ============================================================
   MARKETING DIGITAL LMS — Design System
   Paleta: Navy profundo + Azul elétrico + Teal + Gold
   Tipografia: Syne (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  --navy:        #1A2B5A;
  --navy-light:  #243476;
  --navy-dark:   #111D3E;
  --blue:        #2563EB;
  --blue-light:  #3B82F6;
  --teal:        #0891B2;
  --teal-light:  #22D3EE;
  --gold:        #F59E0B;
  --gold-light:  #FCD34D;
  --green:       #10B981;
  --red:         #EF4444;
  --purple:      #7C3AED;
  --bg:          #F0F4FF;
  --bg-card:     #FFFFFF;
  --text:        #1E293B;
  --text-muted:  #64748B;
  --border:      #E2E8F0;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:      0 4px 16px rgba(26,43,90,.10);
  --shadow-lg:   0 8px 40px rgba(26,43,90,.15);
  --radius:      12px;
  --radius-lg:   20px;
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --transition:  all .2s cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { font-size: .975rem; color: var(--text-muted); }
a  { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-light); }

/* ── LAYOUT ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.wrapper   { display: flex; min-height: 100vh; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-body  { padding: 1.5rem; }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem;
}
.card-header h3 { margin: 0; font-size: 1.05rem; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-size: .9rem; font-weight: 500;
  padding: .65rem 1.5rem; border-radius: var(--radius);
  border: none; cursor: pointer; transition: var(--transition);
  white-space: nowrap; text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4fd8; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn-navy    { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-light); color: #fff; transform: translateY(-1px); }
.btn-teal    { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #0771a0; color: #fff; transform: translateY(-1px); }
.btn-gold    { background: var(--gold); color: var(--navy); font-weight: 700; }
.btn-gold:hover { background: #e08e00; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,.35); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost  { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm   { padding: .45rem 1rem; font-size: .82rem; border-radius: 8px; }
.btn-lg   { padding: .9rem 2rem; font-size: 1rem; border-radius: 14px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ── FORMS ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: .85rem; font-weight: 500;
  color: var(--text); margin-bottom: .4rem;
}
.form-control {
  width: 100%; padding: .7rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-body); font-size: .95rem; color: var(--text);
  background: #fff; transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-control::placeholder { color: var(--text-muted); }
.form-control.is-invalid { border-color: var(--red); }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.form-error { font-size: .78rem; color: var(--red); margin-top: .3rem; }

.input-icon { position: relative; }
.input-icon .form-control { padding-left: 2.75rem; }
.input-icon .icon {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem; pointer-events: none;
}
.input-icon.icon-right .form-control { padding-left: 1rem; padding-right: 2.75rem; }
.input-icon.icon-right .icon { left: auto; right: .9rem; cursor: pointer; pointer-events: auto; }

.form-select {
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748B' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem; border-radius: 50px;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.badge-blue   { background: #EFF6FF; color: var(--blue); }
.badge-teal   { background: #F0FDFE; color: var(--teal); }
.badge-gold   { background: #FFFBEB; color: #B45309; }
.badge-green  { background: #ECFDF5; color: #059669; }
.badge-red    { background: #FEF2F2; color: var(--red); }
.badge-purple { background: #F5F3FF; color: var(--purple); }
.badge-navy   { background: var(--navy); color: #fff; }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: .9rem 1.25rem; border-radius: var(--radius);
  font-size: .9rem; margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .6rem;
  border-left: 4px solid;
}
.alert-success { background: #ECFDF5; color: #065F46; border-color: var(--green); }
.alert-error   { background: #FEF2F2; color: #991B1B; border-color: var(--red); }
.alert-info    { background: #EFF6FF; color: #1E40AF; border-color: var(--blue); }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: var(--gold); }

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: 260px; min-width: 260px; background: var(--navy);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; transition: var(--transition);
  overflow-y: auto;
}
.sidebar-logo {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo .logo-text {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 800;
  color: #fff; line-height: 1.2;
}
.sidebar-logo .logo-sub {
  font-size: .72rem; color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .08em; margin-top: .1rem;
}
.sidebar-user {
  padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: .8rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: #fff; font-size: .9rem;
  flex-shrink: 0;
}
.sidebar-user-info .name { font-size: .88rem; font-weight: 600; color: #fff; }
.sidebar-user-info .role { font-size: .72rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .05em; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-section { padding: .5rem 1.5rem .25rem; font-size: .68rem; font-weight: 600; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: .1em; }
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1.5rem; color: rgba(255,255,255,.65);
  font-size: .88rem; font-weight: 400; transition: var(--transition);
  cursor: pointer; text-decoration: none; border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; border-left-color: rgba(255,255,255,.3); }
.nav-item.active { background: rgba(37,99,235,.25); color: #fff; border-left-color: var(--blue-light); font-weight: 500; }
.nav-item .icon { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .badge-count {
  margin-left: auto; background: var(--blue); color: #fff;
  font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 50px;
}
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: 64px; background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1.1rem;
  background: transparent; border: none; cursor: pointer; transition: var(--transition);
  position: relative;
}
.topbar-btn:hover { background: var(--bg); color: var(--text); }
.topbar-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
  border: 2px solid #fff;
}

/* ── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  margin-left: 260px; flex: 1;
  display: flex; flex-direction: column; min-height: 100vh;
}
.page-content { padding: 2rem; flex: 1; }

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.page-header-text h1 { color: var(--navy); margin-bottom: .25rem; }
.page-header-text p  { font-size: .9rem; }
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--border); }

/* ── STATS GRID ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 1.25rem 1.5rem;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.blue   { background: #EFF6FF; }
.stat-icon.teal   { background: #F0FDFE; }
.stat-icon.gold   { background: #FFFBEB; }
.stat-icon.green  { background: #ECFDF5; }
.stat-icon.purple { background: #F5F3FF; }
.stat-info .value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-info .label { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }
.stat-info .delta { font-size: .78rem; color: var(--green); font-weight: 500; }
.stat-info .delta.down { color: var(--red); }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: #fff; }
thead { background: #F8FAFC; }
th { padding: .9rem 1rem; font-size: .8rem; font-weight: 600; color: var(--text-muted); text-align: left; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: .9rem 1rem; font-size: .88rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFBFF; }
.td-name { font-weight: 500; color: var(--text); }
.td-email { color: var(--text-muted); font-size: .83rem; }
.td-actions { display: flex; gap: .4rem; }

/* ── PROGRESS ───────────────────────────────────────────── */
.progress { background: var(--border); border-radius: 50px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width .6s ease; }
.progress-bar.gold  { background: linear-gradient(90deg, var(--gold), #FBBF24); }
.progress-bar.green { background: linear-gradient(90deg, var(--green), #34D399); }

/* ── MODULE CARDS ───────────────────────────────────────── */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.module-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  transition: var(--transition); cursor: pointer;
}
.module-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.module-card-thumb {
  height: 140px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.module-card-thumb .mod-number {
  font-family: var(--font-head); font-size: 4rem; font-weight: 800;
  color: rgba(255,255,255,.2); line-height: 1;
}
.module-card-thumb .mod-icon {
  position: absolute; font-size: 2.5rem; top: 50%; left: 50%;
  transform: translate(-50%,-50%); filter: drop-shadow(0 2px 8px rgba(0,0,0,.2));
}
.module-card-body { padding: 1.25rem; }
.module-card-body .mod-tag {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: .5rem;
}
.module-card-body h3 { font-size: 1rem; color: var(--navy); margin-bottom: .4rem; }
.module-card-body p  { font-size: .82rem; color: var(--text-muted); margin-bottom: 1rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.module-card-footer {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.mod-progress-text { font-size: .78rem; color: var(--text-muted); }
.mod-progress-pct  { font-size: .78rem; font-weight: 600; color: var(--blue); }
.module-locked .module-card-thumb::after {
  content: '🔒'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%); font-size: 2rem;
  background: rgba(0,0,0,.4); border-radius: 50%; padding: .75rem;
}
.module-locked .module-card-body, .module-locked .module-card-footer { opacity: .5; }

/* ── LOGIN PAGE ─────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh; display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
}
.auth-left {
  padding: 3rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(37,99,235,.25) 0%, transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(8,145,178,.15) 0%, transparent 50%);
}
.auth-left-content { position: relative; z-index: 2; max-width: 460px; }
.auth-logo { display: flex; align-items: center; gap: .75rem; margin-bottom: 3rem; }
.auth-logo-icon {
  width: 44px; height: 44px; background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.auth-logo-text { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; color: #fff; }
.auth-logo-text span { color: var(--teal-light); }
.auth-tagline { font-size: 2.4rem; font-family: var(--font-head); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 1rem; }
.auth-tagline span { color: var(--gold); }
.auth-desc { font-size: .95rem; color: rgba(255,255,255,.65); max-width: 380px; }
.auth-stats { display: flex; gap: 2rem; margin-top: 2.5rem; }
.auth-stat .num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: #fff; }
.auth-stat .lbl { font-size: .75rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }
.auth-right {
  background: var(--bg); padding: 3rem;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.auth-right::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: linear-gradient(90deg, var(--blue), var(--teal), var(--gold));
}
.auth-card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-card-header { padding: 2rem 2rem 1.25rem; }
.auth-card-header h2 { color: var(--navy); margin-bottom: .3rem; font-size: 1.6rem; }
.auth-card-header p  { font-size: .88rem; color: var(--text-muted); }
.auth-card-body { padding: 0 2rem 2rem; }
.auth-tabs { display: flex; margin: 0 2rem; border-bottom: 2px solid var(--border); margin-bottom: 0; }
.auth-tab {
  flex: 1; padding: .85rem 1rem; text-align: center; font-size: .88rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.auth-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-pane { display: none; padding: 1.5rem 0 0; }
.tab-pane.active { display: block; }
.auth-divider { text-align: center; margin: 1rem 0; position: relative; color: var(--text-muted); font-size: .8rem; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); z-index: 0; }
.auth-divider span { background: #fff; padding: 0 .75rem; position: relative; z-index: 1; }
.auth-footer { padding: 1.25rem 2rem; background: #F8FAFC; border-top: 1px solid var(--border); text-align: center; font-size: .82rem; color: var(--text-muted); }

/* ── NOTIFICATIONS ──────────────────────────────────────── */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .9rem 1.25rem; display: flex; align-items: center; gap: .75rem;
  min-width: 300px; border-left: 4px solid var(--blue);
  animation: slideIn .3s ease;
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--gold); }
.toast-msg { font-size: .88rem; color: var(--text); flex: 1; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { margin: 0; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.3rem; color: var(--text-muted); transition: var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; }

/* ── AVATAR ─────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar-md { width: 40px; height: 40px; font-size: .9rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.4rem; }

/* ── DROPDOWN ───────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + .5rem); right: 0;
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  min-width: 180px; z-index: 100; overflow: hidden;
  animation: fadeDown .2s ease;
}
.dropdown-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem 1rem; font-size: .88rem; color: var(--text);
  cursor: pointer; transition: var(--transition); text-decoration: none; border: none; background: none; width: 100%;
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: #FEF2F2; }
.dropdown-divider { height: 1px; background: var(--border); margin: .25rem 0; }

/* ── SEARCH ─────────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 50px; padding: .45rem .75rem .45rem 1rem;
  transition: var(--transition); min-width: 200px;
}
.search-bar:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.search-bar input { border: none; background: none; outline: none; font-size: .88rem; flex: 1; font-family: var(--font-body); }
.search-bar .icon { color: var(--text-muted); font-size: .95rem; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse    { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.fade-in { animation: fadeIn .4s ease; }

/* ── HELPERS ────────────────────────────────────────────── */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.gap-1  { gap: .5rem; } .gap-2 { gap: .75rem; } .gap-3 { gap: 1rem; } .gap-4 { gap: 1.5rem; }
.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; }
.text-center { text-align: center; }
.text-sm     { font-size: .82rem; }
.text-xs     { font-size: .75rem; }
.text-muted  { color: var(--text-muted); }
.text-navy   { color: var(--navy); }
.text-blue   { color: var(--blue); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-left    { display: none; }
  .auth-right   { padding: 2rem 1.5rem; }
}
@media (max-width: 768px) {
  .sidebar      { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar       { padding: 0 1rem; }
  .page-content { padding: 1rem; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .auth-card    { max-width: 100%; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
