/* ============================================================
   Alliance Therapy Services — Sentry-inspired Design System
   Gradient accent: #7553FF → #8A82E8 → #E81A9B
   Dark chrome, light content, gradient pops
   ============================================================ */

:root {
  /* Gradient palette */
  --grad: linear-gradient(135deg, #7553FF, #8A82E8, #E81A9B);
  --grad-h: linear-gradient(to right, #7553FF, #8A82E8, #E81A9B);
  --accent-1: #7553FF;
  --accent-2: #8A82E8;
  --accent-3: #E81A9B;

  /* Neutrals — dark-leaning */
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;
  --gray-950: #09090b;

  /* Semantic */
  --green-50: #ecfdf5;
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --blue-50: #eff6ff;
  --blue-500: #3b82f6;
  --amber-50: #fffbeb;
  --amber-500: #f59e0b;

  /* Layout */
  --sidebar-w: 240px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-1); text-decoration:none; }
a:hover { text-decoration:underline; }
img { max-width:100%; height:auto; }

/* === Gradient text utility === */
.grad-text {
  background-image: var(--grad-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}

/* === Eyebrow label (uppercase small) === */
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 600;
}

/* === Skip link === */
.skip-link {
  position:absolute; left:-9999px; top:0;
  background:var(--accent-1); color:#fff;
  padding:8px 16px; z-index:9999; font-weight:600; border-radius:0 0 8px 0;
}
.skip-link:focus { left:0; }

/* ===========================================================
   PUBLIC HEADER (logged-out)
   =========================================================== */
.public-header {
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top:0; z-index:100;
}
.public-header-inner {
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 24px;
}
.public-logo img { height:40px; }
.public-nav { display:flex; align-items:center; gap:24px; }
.nav-link { color:var(--gray-600); font-weight:500; font-size:15px; }
.nav-link:hover { color:var(--gray-900); text-decoration:none; }

/* Footer */
.public-footer {
  background:var(--gray-950); color:var(--gray-500);
  padding:32px 24px;
}
.footer-inner {
  max-width:1200px; margin:0 auto;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  font-size:13px;
}
.footer-links { display:flex; gap:20px; }
.footer-links a { color:var(--gray-500); }
.footer-links a:hover { color:#fff; text-decoration:none; }

/* ===========================================================
   HERO
   =========================================================== */
.hero-split {
  max-width:1200px; margin:0 auto;
  display:grid; grid-template-columns:1fr 1fr; gap:48px;
  padding:100px 24px 72px; align-items:center;
}
.hero-badge {
  display:inline-block;
  font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  padding:6px 14px; border-radius:100px; margin-bottom:24px;
  background: rgba(117,83,255,.1); color:var(--accent-1);
  border:1px solid rgba(117,83,255,.2);
}
.hero-content h1 {
  font-size:3.5em; font-weight:800; line-height:1.08;
  letter-spacing:-0.03em;
  margin-bottom:20px;
}
.hero-content h1 .grad-text {
  font-size:inherit; font-weight:inherit; line-height:inherit;
  letter-spacing:inherit;
}
.hero-content > p {
  font-size:1.15em; color:var(--gray-500); line-height:1.7;
  max-width:460px; margin-bottom:36px;
}
.hero-actions { display:flex; gap:12px; margin-bottom:56px; }

.hero-stats {
  display:flex; gap:48px;
  border-top:1px solid var(--gray-200); padding-top:28px;
}
.hero-stat { display:flex; flex-direction:column; }
.hero-stat-num { font-size:1.8em; font-weight:800; color:var(--gray-900); letter-spacing:-0.02em; }
.hero-stat-label { font-size:12px; color:var(--gray-400); font-weight:500; text-transform:uppercase; letter-spacing:.04em; margin-top:2px; }

/* Floating cards */
.hero-visual { position:relative; min-height:380px; }
.hero-card {
  position:absolute; background:#fff; border-radius:var(--radius-lg);
  padding:18px 24px; box-shadow:var(--shadow-xl);
  display:flex; align-items:center; gap:14px; font-weight:600; font-size:15px;
  color:var(--gray-700); white-space:nowrap;
  border:1px solid var(--gray-100);
  animation: float 6s ease-in-out infinite;
}
.hero-card-1 { top:8%; left:5%; animation-delay:0s; }
.hero-card-2 { top:42%; right:0%; animation-delay:2s; }
.hero-card-3 { bottom:8%; left:15%; animation-delay:4s; }
@keyframes float {
  0%,100% { transform:translateY(0); }
  50% { transform:translateY(-14px); }
}
.hc-icon {
  width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
}
.hc-icon--red { background:rgba(232,26,155,.1); color:var(--accent-3); }
.hc-icon--blue { background:rgba(117,83,255,.1); color:var(--accent-1); }
.hc-icon--green { background:var(--green-50); color:var(--green-600); }

/* Features */
.features {
  background:#fff; border-top:1px solid var(--gray-200);
  padding:80px 24px;
}
.features-inner {
  max-width:1100px; margin:0 auto;
  display:grid; grid-template-columns:repeat(4,1fr); gap:40px;
}
.feature { text-align:center; }
.feature-icon {
  width:56px; height:56px; border-radius:14px;
  background:rgba(117,83,255,.08); color:var(--accent-1);
  display:inline-flex; align-items:center; justify-content:center;
  margin-bottom:16px;
}
.feature h3 { font-size:1em; font-weight:700; margin-bottom:8px; color:var(--gray-900); letter-spacing:-0.01em; }
.feature p { font-size:14px; color:var(--gray-500); line-height:1.6; }

/* ===========================================================
   AUTH PAGES
   =========================================================== */
.auth-page {
  min-height:calc(100vh - 180px);
  display:flex; align-items:center; justify-content:center; padding:40px 20px;
}
.auth-card {
  width:100%; max-width:420px; background:#fff;
  border-radius:var(--radius-lg); padding:44px 40px;
  box-shadow:var(--shadow-xl); border:1px solid var(--gray-200);
}
.auth-header { text-align:center; margin-bottom:36px; }
.auth-header h1 {
  font-size:1.7em; font-weight:700; letter-spacing:-0.02em;
  margin-bottom:8px;
  background-image: var(--grad-h);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  display:inline-block;
}
.auth-header p { color:var(--gray-500); font-size:14px; }

.form-group { margin-bottom:20px; }
.form-group label {
  display:block; font-size:13px; font-weight:600; color:var(--gray-600);
  margin-bottom:6px; letter-spacing:0.01em;
}
.form-group input {
  width:100%; padding:11px 14px; border:1px solid var(--gray-300);
  border-radius:8px; font-size:15px; font-family:inherit;
  transition: border-color .15s, box-shadow .15s;
  background:var(--gray-50);
}
.form-group input:focus {
  outline:none; border-color:var(--accent-1); background:#fff;
  box-shadow:0 0 0 3px rgba(117,83,255,.12);
}
.form-group input::placeholder { color:var(--gray-400); }
.input-hint { font-size:12px; color:var(--gray-400); margin-top:6px; }
.auth-footer { text-align:center; margin-top:24px; font-size:14px; color:var(--gray-500); }
.auth-footer a { font-weight:600; color:var(--accent-1); }

/* ===========================================================
   SIDEBAR (logged-in)
   =========================================================== */
.sidebar {
  position:fixed; top:0; left:0; bottom:0; width:var(--sidebar-w);
  background:var(--gray-950); color:#fff; z-index:200;
  display:flex; flex-direction:column;
  border-right:1px solid rgba(255,255,255,.06);
}
.sidebar-brand { padding:24px 20px 20px; border-bottom:1px solid rgba(255,255,255,.06); }
.sidebar-brand img { height:36px; filter:brightness(0) invert(1); }
.sidebar-nav { padding:12px 10px; flex:1; display:flex; flex-direction:column; }
.sidebar-link {
  display:flex; align-items:center; gap:12px; padding:10px 14px;
  border-radius:8px; font-size:14px; font-weight:500; color:var(--gray-400);
  transition: background .15s, color .15s; text-decoration:none;
}
.sidebar-link:hover { background:rgba(255,255,255,.06); color:#fff; text-decoration:none; }
.sidebar-link.active {
  background:linear-gradient(135deg, rgba(117,83,255,.25), rgba(232,26,155,.15));
  color:#fff;
}
.sidebar-link--logout { margin-top:auto; color:var(--gray-600); }
.sidebar-link--logout:hover { color:var(--red-500); }

.mobile-header { display:none; }
.logged-in .main-wrapper { margin-left:var(--sidebar-w); min-height:100vh; }

/* ===========================================================
   DASHBOARD
   =========================================================== */
.page-shell { max-width:1080px; margin:0 auto; padding:40px 28px 60px; }
.page-shell--narrow { max-width:800px; }

.page-header { margin-bottom:32px; }
.page-header h1 {
  font-size:2em; font-weight:800; letter-spacing:-0.03em;
  background-image: var(--grad-h);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  display:inline-block;
}
.page-subtitle {
  color:var(--gray-500); font-size:14px; margin-top:6px;
  letter-spacing:0.01em;
}

/* Stat cards */
.stat-row { display:flex; gap:16px; margin-bottom:20px; }
.stat-card {
  flex:1; background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius); padding:22px 24px;
  box-shadow:var(--shadow-sm);
}
.stat-value {
  font-size:2.2em; font-weight:800; letter-spacing:-0.02em;
  line-height:1.1;
  background-image: var(--grad-h);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  display:inline-block;
}
.stat-slash {
  -webkit-text-fill-color: var(--gray-300);
  font-weight:400;
}
.stat-label {
  font-size:12px; color:var(--gray-400); font-weight:600;
  text-transform:uppercase; letter-spacing:.04em; margin-top:4px;
}

/* Progress track */
.progress-track {
  width:100%; height:5px; background:var(--gray-200);
  border-radius:3px; margin-bottom:24px; overflow:hidden;
}
.progress-track-fill {
  height:100%; border-radius:3px;
  background: var(--grad-h);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* Banner */
.banner {
  display:flex; align-items:center; gap:10px;
  padding:14px 18px; border-radius:var(--radius); font-size:14px; font-weight:600;
  margin-bottom:24px;
}
.banner--success { background:var(--green-50); color:var(--green-700); }
.banner--warning { background:var(--amber-50); color:#92400e; }
.banner--danger { background:var(--red-50); color:#991b1b; }

/* Module grid */
.module-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:16px;
}
.m-card {
  background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius-lg); padding:24px;
  text-decoration:none; color:inherit;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display:flex; flex-direction:column;
  position:relative; overflow:hidden;
}
.m-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background:var(--grad-h); opacity:0;
  transition: opacity .2s;
}
.m-card:hover {
  box-shadow:var(--shadow-md); transform:translateY(-2px);
  text-decoration:none;
}
.m-card:hover::before { opacity:1; }
.m-card--done { border-left:4px solid var(--green-500); }
.m-card--done::before { display:none; }
.m-card--expired { border-left:4px solid var(--red-500); }
.m-card--expired::before { display:none; }
.m-card--expiring { border-left:4px solid var(--amber-500); }
.m-card--expiring::before { display:none; }

.m-card-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.m-card-num {
  font-size:13px; font-weight:800; color:var(--gray-300);
  font-variant-numeric:tabular-nums;
}
.m-card-badge {
  display:inline-flex; align-items:center; gap:4px;
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  padding:3px 10px; border-radius:100px;
  background:var(--green-50); color:var(--green-600);
}
.m-card-badge--pending { background:var(--gray-100); color:var(--gray-400); }
.m-card-badge--expired { background:var(--red-50); color:var(--red-500); }
.m-card-badge--expiring { background:var(--amber-50); color:#92400e; }

.m-card-title {
  font-size:1.05em; font-weight:700; color:var(--gray-900);
  margin-bottom:6px; line-height:1.4; letter-spacing:-0.01em;
}
.m-card-desc {
  font-size:13px; color:var(--gray-500); flex:1; line-height:1.55;
  margin-bottom:16px;
}
.m-card-action {
  display:inline-flex; align-items:center; gap:6px;
  font-size:13px; font-weight:600; color:var(--accent-1);
}

/* ===========================================================
   BREADCRUMBS
   =========================================================== */
.crumbs {
  display:flex; align-items:center; gap:8px;
  font-size:13px; color:var(--gray-400); margin-bottom:24px;
}
.crumbs a { color:var(--gray-500); font-weight:500; }
.crumbs a:hover { color:var(--accent-1); text-decoration:none; }
.crumbs svg { color:var(--gray-300); flex-shrink:0; }

/* ===========================================================
   MODULE DETAIL
   =========================================================== */
.mod-header { margin-bottom:28px; }
.mod-header h1 {
  font-size:1.8em; font-weight:800; letter-spacing:-0.02em;
  background-image: var(--grad-h);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  display:inline-block;
}
.mod-status {
  display:inline-flex; align-items:center; gap:6px;
  font-size:13px; font-weight:600; padding:6px 14px;
  border-radius:100px; margin-top:12px;
}
.mod-status--done { background:var(--green-50); color:var(--green-600); }
.mod-status--expired { background:var(--red-50); color:var(--red-500); }
.mod-status--expiring { background:var(--amber-50); color:#92400e; }

.mod-block { margin-bottom:36px; }
.mod-block h2 {
  display:flex; align-items:center; gap:8px;
  font-size:1.1em; font-weight:700; color:var(--gray-900);
  padding-bottom:12px; border-bottom:1px solid var(--gray-200);
  margin-bottom:16px; letter-spacing:-0.01em;
}
.mod-block h2 svg { color:var(--accent-1); flex-shrink:0; }

.mod-list { padding-left:24px; }
.mod-list li { margin-bottom:10px; line-height:1.7; color:var(--gray-600); }
.mod-list--refs li { font-size:14px; color:var(--gray-500); }

.content-card {
  background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius); padding:24px;
  margin-bottom:16px;
  border-left:3px solid transparent;
  border-image: var(--grad) 1;
  border-image-slice:0 0 0 1;
}
.content-card h3 {
  font-size:1em; font-weight:700; color:var(--gray-800);
  margin-bottom:12px; letter-spacing:-0.01em;
}
.content-card p { margin-bottom:12px; line-height:1.7; color:var(--gray-600); }
.content-card p:last-child { margin-bottom:0; }
.content-card ul { padding-left:20px; margin-top:8px; }
.content-card li { margin-bottom:8px; line-height:1.6; color:var(--gray-600); }

.mod-actions {
  display:flex; flex-wrap:wrap; gap:12px;
  padding-top:28px; border-top:1px solid var(--gray-200); margin-top:8px;
}

/* ===========================================================
   QUIZ
   =========================================================== */
.quiz-head { margin-bottom:28px; }
.quiz-head h1 {
  font-size:1.5em; font-weight:800; letter-spacing:-0.02em;
  background-image: var(--grad-h);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  display:inline-block;
  margin-bottom:8px;
}
.quiz-meta { display:flex; gap:20px; }
.quiz-meta-item {
  display:flex; align-items:center; gap:6px;
  font-size:13px; font-weight:500; color:var(--gray-500);
}

.q-card {
  border:1px solid var(--gray-200); border-radius:var(--radius-lg);
  padding:24px; margin-bottom:16px; background:#fff;
  transition: border-color .15s, box-shadow .15s;
}
.q-card:focus-within {
  border-color:var(--accent-2);
  box-shadow:0 0 0 3px rgba(117,83,255,.08);
}

.q-legend {
  display:flex; align-items:flex-start; gap:12px;
  font-weight:600; line-height:1.5; margin-bottom:16px;
  color:var(--gray-800); font-size:15px;
}
.q-num {
  flex-shrink:0; width:30px; height:30px; border-radius:8px;
  background:linear-gradient(135deg, rgba(117,83,255,.12), rgba(232,26,155,.08));
  color:var(--accent-1);
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:800;
}

.q-option {
  display:flex; align-items:center; gap:10px; cursor:pointer;
  padding:10px 14px; border-radius:8px; border:1px solid transparent;
  transition: background .1s, border-color .15s; margin-bottom:6px;
}
.q-option:hover { background:var(--gray-50); }
.q-option:has(input:checked) {
  background:rgba(117,83,255,.06); border-color:var(--accent-1);
}
.q-option input[type="radio"] { position:absolute; opacity:0; width:0; height:0; }
.q-option-marker {
  flex-shrink:0; width:28px; height:28px; border-radius:50%;
  border:2px solid var(--gray-300); display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:var(--gray-400);
  transition: border-color .15s, background .15s, color .15s;
}
.q-option:has(input:checked) .q-option-marker {
  border-color:var(--accent-1); background:var(--accent-1); color:#fff;
}
.q-option-text { font-size:14px; color:var(--gray-600); line-height:1.5; }

.quiz-submit-btn { margin-top:24px; }

/* ===========================================================
   BUTTONS
   =========================================================== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:inherit; font-weight:600; font-size:14px;
  padding:10px 22px; border-radius:8px; border:2px solid transparent;
  cursor:pointer; transition: all .15s; text-decoration:none; line-height:1.5;
}
.btn:hover { text-decoration:none; }
.btn:focus-visible { outline:2px solid var(--accent-1); outline-offset:2px; }

.btn-primary {
  background:var(--accent-1); color:#fff; border-color:var(--accent-1);
}
.btn-primary:hover {
  background:#6344e0; border-color:#6344e0;
  box-shadow:0 4px 12px rgba(117,83,255,.3);
}

.btn-success { background:var(--green-600); color:#fff; border-color:var(--green-600); }
.btn-success:hover { background:var(--green-700); }

.btn-outline { background:transparent; color:var(--gray-700); border-color:var(--gray-300); }
.btn-outline:hover { border-color:var(--accent-1); color:var(--accent-1); }

.btn-ghost { background:transparent; color:var(--gray-600); border-color:transparent; }
.btn-ghost:hover { background:var(--gray-100); color:var(--gray-900); }

.btn-sm { padding:7px 16px; font-size:13px; }
.btn-lg { padding:13px 28px; font-size:15px; }
.btn-block { width:100%; }

/* ===========================================================
   TOASTS
   =========================================================== */
.toast-container {
  position:fixed; top:20px; right:20px; z-index:9999;
  display:flex; flex-direction:column; gap:10px; max-width:400px;
}
.toast {
  display:flex; align-items:center; gap:10px;
  background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius); padding:14px 16px;
  box-shadow:var(--shadow-lg); font-size:14px; font-weight:500;
  animation: slideIn .3s ease-out;
  transition: opacity .3s, transform .3s;
}
@keyframes slideIn {
  from { opacity:0; transform:translateX(40px); }
  to { opacity:1; transform:translateX(0); }
}
.toast-icon { flex-shrink:0; }
.toast-success .toast-icon { color:var(--green-500); }
.toast-danger .toast-icon, .toast-error .toast-icon { color:var(--red-500); }
.toast-warning .toast-icon { color:var(--amber-500); }
.toast-info .toast-icon { color:var(--blue-500); }

.toast-success { border-left:3px solid var(--green-500); }
.toast-danger, .toast-error { border-left:3px solid var(--red-500); }
.toast-warning { border-left:3px solid var(--amber-500); }
.toast-info { border-left:3px solid var(--blue-500); }

.toast-msg { flex:1; color:var(--gray-700); }
.toast-close {
  background:none; border:none; font-size:18px; cursor:pointer;
  color:var(--gray-400); line-height:1; padding:0 2px;
}
.toast-close:hover { color:var(--gray-700); }

/* ===========================================================
   FOCUS STATES
   =========================================================== */
a:focus-visible,
input:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline:2px solid var(--accent-1); outline-offset:2px;
}

/* ===========================================================
   ADMIN
   =========================================================== */
.admin-section { margin-bottom:32px; }
.admin-section-title {
  font-size:1.05em; font-weight:700; color:var(--gray-900);
  margin-bottom:16px; letter-spacing:-0.01em;
}

.admin-table-wrap {
  background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm);
}
.admin-table { width:100%; border-collapse:collapse; font-size:14px; }
.admin-table thead { background:var(--gray-50); }
.admin-table th {
  padding:10px 16px; text-align:left; font-size:11px;
  text-transform:uppercase; letter-spacing:.04em;
  color:var(--gray-500); font-weight:600; border-bottom:1px solid var(--gray-200);
}
.admin-table td { padding:12px 16px; border-bottom:1px solid var(--gray-100); }
.admin-table tbody tr:last-child td { border-bottom:none; }
.admin-table tbody tr:hover { background:var(--gray-50); }

.admin-search {
  padding:7px 12px; border:1px solid var(--gray-300); border-radius:6px;
  font-size:14px; font-family:inherit; width:220px;
}
.admin-search:focus { outline:none; border-color:var(--accent-1); box-shadow:0 0 0 3px rgba(117,83,255,.1); }

.admin-select {
  padding:7px 12px; border:1px solid var(--gray-300); border-radius:6px;
  font-size:13px; font-family:inherit; background:#fff; cursor:pointer;
}
.admin-select:focus { outline:none; border-color:var(--accent-1); }

.text-muted { color:var(--gray-500); }

.role-badge {
  display:inline-block; padding:2px 10px; border-radius:100px;
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
}
.role-badge--admin { background:rgba(117,83,255,.1); color:var(--accent-1); }
.role-badge--org_admin { background:rgba(117,83,255,.1); color:var(--accent-1); }
.role-badge--sys_admin { background:rgba(232,26,155,.1); color:var(--accent-3); }
.role-badge--manager { background:rgba(59,130,246,.1); color:#2563eb; }
.role-badge--employee { background:var(--gray-100); color:var(--gray-500); }
.role-badge--enterprise { background:rgba(117,83,255,.1); color:var(--accent-1); }
.role-badge--team { background:rgba(59,130,246,.1); color:#2563eb; }
.role-badge--individual { background:var(--gray-100); color:var(--gray-500); }

.status-dot {
  display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px;
}
.status-dot--active { background:var(--green-500); }
.status-dot--suspended { background:var(--red-500); }

.audit-action {
  display:inline-block; padding:2px 8px; border-radius:4px;
  font-size:12px; font-weight:600; font-family:monospace;
  background:var(--gray-100); color:var(--gray-600);
}

.pagination {
  display:flex; align-items:center; justify-content:center; gap:12px;
  margin-top:20px;
}
.pagination-info { font-size:13px; color:var(--gray-500); }

.badge-pill--pending { background:var(--gray-100); color:var(--gray-400); border-color:var(--gray-200); }

/* ===========================================================
   PROFILE
   =========================================================== */
.profile-card {
  background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius-lg); padding:36px;
  box-shadow:var(--shadow-sm);
}
.profile-avatar {
  width:72px; height:72px; border-radius:50%;
  background:linear-gradient(135deg, rgba(117,83,255,.15), rgba(232,26,155,.1));
  display:flex; align-items:center; justify-content:center;
  margin-bottom:24px;
}
.profile-initials { font-size:1.5em; font-weight:800; }
.profile-info { margin-bottom:24px; }
.profile-field {
  display:flex; flex-direction:column; padding:14px 0;
  border-bottom:1px solid var(--gray-100);
}
.profile-field:last-child { border-bottom:none; }
.profile-label {
  font-size:12px; font-weight:600; text-transform:uppercase;
  letter-spacing:.04em; color:var(--gray-400); margin-bottom:4px;
}
.profile-value { font-size:15px; color:var(--gray-900); font-weight:500; }
.profile-actions { display:flex; gap:12px; }

/* Full profile page */
.prof-hero-wrap {
  position:relative; margin-bottom:28px;
  border-radius:var(--radius-lg); overflow:hidden;
  background:#fff; border:1px solid var(--gray-200);
  box-shadow:var(--shadow);
}
.prof-banner {
  height:120px;
  background:linear-gradient(135deg, #7553FF 0%, #8A82E8 40%, #E81A9B 100%);
  position:relative;
}
.prof-banner::after {
  content:''; position:absolute; inset:0;
  background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.prof-hero {
  display:flex; justify-content:space-between; align-items:flex-end;
  flex-wrap:wrap; gap:20px; padding:0 28px 24px;
  margin-top:-44px; position:relative; z-index:1;
}
.prof-hero-left { display:flex; align-items:flex-end; gap:20px; }
.prof-avatar-lg {
  width:100px; height:100px; border-radius:50%;
  background:linear-gradient(135deg, rgba(117,83,255,.15), rgba(232,26,155,.1));
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  border:4px solid #fff; box-shadow:var(--shadow-md);
  background-color:#fff;
}
.prof-initials-lg { font-size:2.4em; font-weight:800; }
.prof-hero-info { padding-bottom:2px; }
.prof-hero-info h1 { font-size:1.5em; font-weight:700; color:var(--gray-900); margin-bottom:2px; line-height:1.3; }
.prof-email { color:var(--gray-500); font-size:14px; margin-bottom:6px; }
.prof-hero-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.prof-streak-pill {
  display:inline-flex; align-items:center; gap:4px;
  font-size:12px; font-weight:600; color:var(--amber-500);
  background:var(--amber-50); padding:3px 10px; border-radius:20px;
}
.prof-hero-actions {
  display:flex; gap:8px; align-self:flex-start; margin-top:88px;
}
.prof-hero-actions .btn { display:inline-flex; align-items:center; gap:6px; }

/* Profile stat cards row */
.prof-stat-row { display:flex; gap:14px; margin-bottom:24px; }
.prof-stat-card {
  flex:1; display:flex; align-items:center; gap:14px;
  background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius-lg); padding:18px 20px;
  box-shadow:var(--shadow-sm);
  transition:box-shadow .2s, transform .2s;
}
.prof-stat-card:hover {
  box-shadow:var(--shadow-md); transform:translateY(-2px);
}
.prof-stat-icon {
  width:40px; height:40px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.prof-stat-icon--purple { background:rgba(117,83,255,.1); color:var(--accent-1); }
.prof-stat-icon--blue { background:var(--blue-50); color:var(--blue-500); }
.prof-stat-icon--green { background:var(--green-50); color:var(--green-600); }
.prof-stat-icon--amber { background:var(--amber-50); color:var(--amber-500); }
.prof-stat-icon--pink { background:rgba(232,26,155,.08); color:var(--accent-3); }
.prof-stat-card .stat-value { font-size:1.6em; }
.prof-stat-card .stat-label { margin-top:2px; }

.prof-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }

.prof-section {
  background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius-lg);
  padding:24px; margin-bottom:0;
  box-shadow:var(--shadow-sm);
  transition:box-shadow .2s;
}
.prof-section:hover { box-shadow:var(--shadow); }
.prof-col { display:flex; flex-direction:column; gap:20px; }

.prof-section-title {
  display:flex; align-items:center; gap:8px;
  font-size:1em; font-weight:700; color:var(--gray-700); margin-bottom:16px;
}
.prof-section-title svg { color:var(--accent-1); }
.prof-section-count {
  margin-left:auto; font-size:12px; font-weight:600;
  color:var(--gray-400); background:var(--gray-50);
  padding:2px 10px; border-radius:20px;
}
.prof-sub-title {
  font-size:12px; font-weight:700; color:var(--gray-400);
  text-transform:uppercase; letter-spacing:.04em;
  margin-bottom:8px; margin-top:4px;
}
.prof-empty {
  color:var(--gray-400); font-size:14px;
  text-align:center; padding:20px 0;
}

/* Module rows */
.prof-module-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 12px; border-radius:var(--radius);
  transition:background .15s;
}
.prof-module-row:hover { background:var(--gray-50); }
.prof-module-row--done { background:rgba(16,185,129,.03); }
.prof-module-row--done:hover { background:rgba(16,185,129,.06); }
.prof-module-left { display:flex; align-items:center; gap:10px; }
.prof-module-num {
  width:24px; height:24px; border-radius:6px;
  background:var(--gray-100); color:var(--gray-500);
  font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.prof-module-row--done .prof-module-num {
  background:var(--green-50); color:var(--green-600);
}
.prof-module-name { font-size:13px; color:var(--gray-700); font-weight:500; }
.prof-module-badge {
  font-size:10px; font-weight:700; padding:3px 10px; border-radius:20px;
  display:inline-flex; align-items:center; gap:4px;
}
.prof-module-badge--done {
  background:var(--green-50); color:var(--green-600);
}
.prof-module-badge--pending {
  background:var(--gray-100); color:var(--gray-400);
}
.prof-module-badge--expired {
  background:var(--red-50); color:var(--red-500);
}
.prof-module-row--expired .prof-module-num {
  background:var(--red-50); color:var(--red-500);
}

/* Badge grid */
.prof-badge-grid { display:flex; flex-direction:column; gap:8px; }
.prof-badge {
  display:flex; align-items:center; gap:12px;
  padding:12px 14px; border-radius:var(--radius); border:1px solid var(--gray-200);
  transition:transform .15s, box-shadow .15s;
}
.prof-badge:hover { transform:translateX(2px); }
.prof-badge--earned {
  background:rgba(117,83,255,.03); border-color:rgba(117,83,255,.15);
  box-shadow:0 0 0 0 rgba(117,83,255,0);
}
.prof-badge--earned:hover { box-shadow:0 2px 8px rgba(117,83,255,.1); }
.prof-badge--locked { opacity:.4; }
.prof-badge-icon { flex-shrink:0; width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; }
.prof-badge--earned .prof-badge-icon { background:rgba(117,83,255,.1); color:var(--accent-1); }
.prof-badge--locked .prof-badge-icon { background:var(--gray-100); color:var(--gray-400); }
.prof-badge-info { display:flex; flex-direction:column; gap:1px; }
.prof-badge-info strong { font-size:13px; color:var(--gray-900); }
.prof-badge-info span { font-size:12px; color:var(--gray-500); }
.prof-badge-pts { color:var(--accent-1); font-weight:700; font-size:11px; }

/* Mini stats */
.prof-mini-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.prof-mini-stat {
  text-align:center; padding:14px 8px;
  background:var(--gray-50); border-radius:var(--radius);
  border:1px solid var(--gray-100);
  transition:border-color .2s;
}
.prof-mini-stat:hover { border-color:var(--gray-200); }
.prof-mini-val { display:block; font-size:1.3em; font-weight:700; color:var(--gray-900); }
.prof-mini-lbl { font-size:10px; color:var(--gray-400); text-transform:uppercase; letter-spacing:.04em; margin-top:2px; }

/* Attempt list */
.prof-attempt-list { display:flex; flex-direction:column; }
.prof-attempt {
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 8px; border-bottom:1px solid var(--gray-100);
  border-radius:var(--radius); transition:background .15s;
}
.prof-attempt:hover { background:var(--gray-50); }
.prof-attempt:last-child { border-bottom:none; }
.prof-attempt-left { display:flex; flex-direction:column; gap:2px; }
.prof-attempt-mod { font-size:13px; font-weight:600; color:var(--gray-700); }
.prof-attempt-date { font-size:11px; color:var(--gray-400); }
.prof-attempt-right { display:flex; align-items:center; gap:10px; }
.prof-attempt-score { font-weight:700; font-size:14px; }
.prof-attempt-score--pass { color:var(--green-600); }
.prof-attempt-score--fail { color:var(--red-500); }
.prof-attempt-pts { font-size:12px; color:var(--accent-1); font-weight:600; }

/* Kudos on profile */
.prof-kudos-list { display:flex; flex-direction:column; gap:10px; }
.prof-kudos-card {
  padding:14px 16px; border-radius:var(--radius);
  border-left:3px solid var(--accent-3);
  background:rgba(232,26,155,.02);
  transition:background .15s;
}
.prof-kudos-card:hover { background:rgba(232,26,155,.05); }
.prof-kudos-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.prof-kudos-sender { font-weight:600; font-size:14px; color:var(--gray-800); text-decoration:none; }
.prof-kudos-sender:hover { color:var(--accent-1); }
.prof-kudos-date { font-size:12px; color:var(--gray-400); }
.prof-kudos-msg { font-size:13px; color:var(--gray-600); font-style:italic; margin:0; line-height:1.5; }

@media (max-width:900px) {
  .prof-stat-row { flex-wrap:wrap; }
  .prof-stat-card { min-width:calc(50% - 7px); }
}
@media (max-width:768px) {
  .prof-grid { grid-template-columns:1fr; }
  .prof-hero { flex-direction:column; align-items:flex-start; }
  .prof-hero-actions { margin-top:16px; align-self:auto; }
  .prof-mini-stats { grid-template-columns:repeat(2,1fr); }
  .prof-stat-row { flex-direction:column; }
  .prof-stat-card { min-width:100%; }
  .prof-banner { height:80px; }
  .prof-hero { margin-top:-32px; padding:0 16px 20px; }
  .prof-avatar-lg { width:80px; height:80px; }
  .prof-initials-lg { font-size:2em; }
}

/* ===========================================================
   ERROR PAGES
   =========================================================== */
.error-page {
  min-height:60vh; display:flex; align-items:center; justify-content:center;
  padding:40px 20px;
}
.error-card { text-align:center; max-width:440px; }
.error-code {
  font-size:6em; font-weight:800; letter-spacing:-0.04em; line-height:1;
  margin-bottom:16px;
}
.error-card h1 {
  font-size:1.5em; font-weight:700; color:var(--gray-900); margin-bottom:8px;
}
.error-card p { color:var(--gray-500); font-size:15px; margin-bottom:28px; }
.error-actions { display:flex; justify-content:center; gap:12px; }

/* ===========================================================
   QUIZ RESULTS
   =========================================================== */
.results-hero {
  text-align:center; padding:48px 24px 36px;
  border-radius:var(--radius-lg); margin-bottom:32px;
}
.results-hero--pass { background:linear-gradient(135deg, rgba(16,185,129,.08), rgba(117,83,255,.08)); }
.results-hero--fail { background:linear-gradient(135deg, rgba(239,68,68,.08), rgba(232,26,155,.08)); }

.results-icon { margin-bottom:16px; }
.results-hero--pass .results-icon { color:var(--green-500); }
.results-hero--fail .results-icon { color:var(--red-500); }

.results-hero h1 {
  font-size:2em; font-weight:800; letter-spacing:-0.02em;
  color:var(--gray-900); margin-bottom:4px;
}
.results-subtitle { color:var(--gray-500); font-size:15px; margin-bottom:28px; }

.results-stats { display:flex; justify-content:center; gap:40px; }
.results-stat { display:flex; flex-direction:column; align-items:center; }
.results-stat-val { font-size:2em; font-weight:800; letter-spacing:-0.02em; }
.results-stat-lbl { font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--gray-400); font-weight:600; margin-top:2px; }

/* New badges celebration */
.new-badges-section {
  margin-bottom:32px; padding:24px;
  background:linear-gradient(135deg, rgba(117,83,255,.06), rgba(232,26,155,.04));
  border-radius:var(--radius-lg); border:1px solid rgba(117,83,255,.15);
}
.new-badges-section h2 {
  display:flex; align-items:center; gap:8px;
  font-size:1.1em; font-weight:700; color:var(--gray-900); margin-bottom:16px;
}
.new-badges-section h2 svg { color:var(--accent-1); }

.badge-cards { display:flex; flex-wrap:wrap; gap:12px; }
.badge-card {
  display:flex; align-items:center; gap:12px;
  padding:14px 18px; border-radius:var(--radius);
  background:#fff; border:1px solid var(--gray-200);
  box-shadow:var(--shadow-sm);
}
.badge-card-icon {
  width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
}
.badge-card--purple .badge-card-icon { background:rgba(117,83,255,.1); color:var(--accent-1); }
.badge-card--gold .badge-card-icon { background:rgba(245,158,11,.1); color:var(--amber-500); }
.badge-card--green .badge-card-icon { background:var(--green-50); color:var(--green-600); }
.badge-card--red .badge-card-icon { background:rgba(239,68,68,.1); color:var(--red-500); }
.badge-card--blue .badge-card-icon { background:var(--blue-50); color:var(--blue-500); }

.badge-card-info { display:flex; flex-direction:column; }
.badge-card-info strong { font-size:14px; color:var(--gray-900); }
.badge-card-info span { font-size:12px; color:var(--gray-500); }

/* Question review */
.results-review { margin-bottom:32px; }
.results-review h2 {
  font-size:1.15em; font-weight:700; color:var(--gray-900);
  margin-bottom:16px; letter-spacing:-0.01em;
}

.review-card {
  border:1px solid var(--gray-200); border-radius:var(--radius);
  padding:20px; margin-bottom:12px; background:#fff;
}
.review-card--correct { border-left:3px solid var(--green-500); }
.review-card--wrong { border-left:3px solid var(--red-500); }

.review-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.review-num {
  width:28px; height:28px; border-radius:8px; background:var(--gray-100);
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:800; color:var(--gray-500);
}
.review-verdict {
  display:flex; align-items:center; gap:4px;
  font-size:13px; font-weight:700;
}
.review-card--correct .review-verdict { color:var(--green-600); }
.review-card--wrong .review-verdict { color:var(--red-500); }

.review-question { font-size:14px; font-weight:600; color:var(--gray-800); margin-bottom:12px; line-height:1.5; }

.review-answers { display:flex; flex-direction:column; gap:4px; }
.review-option {
  display:flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:6px; font-size:13px; color:var(--gray-600);
}
.review-option-key {
  width:24px; height:24px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700; border:2px solid var(--gray-200);
  color:var(--gray-400); flex-shrink:0;
}
.review-option--correct {
  background:rgba(16,185,129,.06);
}
.review-option--correct .review-option-key {
  border-color:var(--green-500); background:var(--green-500); color:#fff;
}
.review-option--wrong {
  background:rgba(239,68,68,.06);
}
.review-option--wrong .review-option-key {
  border-color:var(--red-500); background:var(--red-500); color:#fff;
}
.review-check { color:var(--green-500); margin-left:auto; }
.review-x { color:var(--red-500); margin-left:auto; }

.results-actions {
  display:flex; flex-wrap:wrap; gap:12px; justify-content:center;
  padding-top:24px; border-top:1px solid var(--gray-200);
}

/* ===========================================================
   BADGES (dashboard)
   =========================================================== */
.dash-badges { margin-bottom:28px; }
.dash-section-title {
  display:flex; align-items:center; gap:8px;
  font-size:1em; font-weight:700; color:var(--gray-700);
  margin-bottom:12px;
}
.dash-section-title svg { color:var(--accent-1); }

.badge-row { display:flex; flex-wrap:wrap; gap:8px; }
.badge-pill {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 14px; border-radius:100px; font-size:12px; font-weight:600;
  border:1px solid;
}
.badge-pill--purple { background:rgba(117,83,255,.08); color:var(--accent-1); border-color:rgba(117,83,255,.2); }
.badge-pill--gold { background:rgba(245,158,11,.08); color:#b45309; border-color:rgba(245,158,11,.2); }
.badge-pill--green { background:rgba(16,185,129,.08); color:var(--green-700); border-color:rgba(16,185,129,.2); }
.badge-pill--red { background:rgba(239,68,68,.08); color:#dc2626; border-color:rgba(239,68,68,.2); }
.badge-pill--blue { background:rgba(59,130,246,.08); color:#2563eb; border-color:rgba(59,130,246,.2); }

.streak-fire { color:var(--amber-500); vertical-align:middle; }

/* ===========================================================
   LEADERBOARD
   =========================================================== */
.lb-you {
  display:flex; gap:16px; margin-bottom:28px;
}
.lb-you > div {
  flex:1; background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius); padding:20px 24px;
  text-align:center; box-shadow:var(--shadow-sm);
}
.lb-you-rank-num, .lb-you-pts-num, .lb-you-streak-num {
  font-size:2em; font-weight:800; letter-spacing:-0.02em;
}
.lb-you-rank-lbl, .lb-you-pts-lbl, .lb-you-streak-lbl {
  font-size:12px; color:var(--gray-400); text-transform:uppercase;
  letter-spacing:.04em; font-weight:600; margin-top:4px; display:block;
}

.lb-table-wrap {
  background:#fff; border:1px solid var(--gray-200);
  border-radius:var(--radius-lg); overflow:hidden;
  box-shadow:var(--shadow-sm);
}
.lb-table { width:100%; border-collapse:collapse; font-size:14px; }
.lb-table thead { background:var(--gray-50); }
.lb-table th {
  padding:12px 16px; text-align:left; font-size:12px;
  text-transform:uppercase; letter-spacing:.04em;
  color:var(--gray-500); font-weight:600; border-bottom:1px solid var(--gray-200);
}
.lb-table td { padding:14px 16px; border-bottom:1px solid var(--gray-100); }
.lb-table tbody tr:last-child td { border-bottom:none; }
.lb-table tbody tr:hover { background:var(--gray-50); }
.lb-row--you { background:rgba(117,83,255,.04); }
.lb-row--you:hover { background:rgba(117,83,255,.08); }

.lb-medal {
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:50%;
  font-size:12px; font-weight:800; color:#fff;
}
.lb-medal--gold { background:linear-gradient(135deg, #f59e0b, #d97706); }
.lb-medal--silver { background:linear-gradient(135deg, #9ca3af, #6b7280); }
.lb-medal--bronze { background:linear-gradient(135deg, #d97706, #92400e); }
.lb-rank-num { color:var(--gray-400); font-weight:600; }

.lb-you-tag {
  display:inline-block; font-size:10px; font-weight:700;
  background:var(--accent-1); color:#fff; padding:2px 8px;
  border-radius:100px; margin-left:8px; text-transform:uppercase; letter-spacing:.04em;
}

.lb-streak-badge {
  display:inline-flex; align-items:center; gap:4px;
  font-size:12px; font-weight:700; color:var(--amber-500);
}
.lb-streak-none { color:var(--gray-300); }
.lb-empty { text-align:center; color:var(--gray-400); padding:40px; }

.lb-col-rank { width:60px; }
.lb-col-pts { width:100px; }
.lb-col-streak { width:80px; }

/* ===========================================================
   SOCIAL — PEOPLE DIRECTORY
   =========================================================== */
.people-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px;
}
.person-card {
  background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius-lg);
  padding:20px; display:flex; flex-direction:column; align-items:center;
  text-decoration:none; color:inherit; text-align:center;
  transition: box-shadow .2s, transform .2s;
}
.person-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); text-decoration:none; }

.person-avatar {
  width:56px; height:56px; border-radius:50%;
  background:linear-gradient(135deg, rgba(117,83,255,.15), rgba(232,26,155,.1));
  display:flex; align-items:center; justify-content:center;
  margin-bottom:12px;
}
.person-initials { font-size:1.2em; font-weight:800; color:var(--accent-1); }

.person-name { font-size:15px; color:var(--gray-900); display:block; margin-bottom:2px; }
.person-role { font-size:12px; color:var(--gray-400); text-transform:capitalize; }
.person-info { margin-bottom:14px; }

.person-stats { display:flex; gap:20px; margin-bottom:8px; }
.person-stat { display:flex; flex-direction:column; align-items:center; }
.person-stat-val { font-size:1.1em; font-weight:700; color:var(--gray-900); }
.person-stat-lbl { font-size:10px; color:var(--gray-400); text-transform:uppercase; letter-spacing:.04em; }

.person-streak {
  display:flex; align-items:center; gap:4px;
  font-size:11px; font-weight:600; color:var(--amber-500);
}

/* ===========================================================
   SOCIAL — PROFILE
   =========================================================== */
.sp-header {
  display:flex; align-items:center; gap:20px; margin-bottom:28px;
}
.sp-avatar {
  width:80px; height:80px; border-radius:50%;
  background:linear-gradient(135deg, rgba(117,83,255,.15), rgba(232,26,155,.1));
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.sp-initials { font-size:2em; font-weight:800; }
.sp-header-info h1 { font-size:1.5em; font-weight:700; color:var(--gray-900); margin-bottom:6px; }

.sp-section { margin-bottom:28px; }
.sp-section-title {
  display:flex; align-items:center; gap:8px;
  font-size:1em; font-weight:700; color:var(--gray-700);
  margin-bottom:14px;
}
.sp-section-title svg { color:var(--accent-1); }

/* ===========================================================
   SOCIAL — KUDOS
   =========================================================== */
.kudos-form {
  display:flex; gap:8px; align-items:flex-start;
}
.kudos-input {
  flex:1; padding:10px 14px; border:1px solid var(--gray-300); border-radius:8px;
  font-size:14px; font-family:inherit; resize:none;
  transition: border-color .15s;
}
.kudos-input:focus { outline:none; border-color:var(--accent-1); box-shadow:0 0 0 3px rgba(117,83,255,.1); }

.kudos-card {
  background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius);
  padding:14px 18px; margin-bottom:8px;
  border-left:3px solid var(--accent-3);
}
.kudos-from { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.kudos-from strong { font-size:14px; color:var(--gray-900); }
.kudos-msg { font-size:14px; color:var(--gray-600); font-style:italic; line-height:1.5; }

/* ===========================================================
   SOCIAL — ACTIVITY FEED
   =========================================================== */
.feed-list { display:flex; flex-direction:column; gap:8px; }

.feed-item {
  display:flex; align-items:flex-start; gap:12px;
  padding:12px 0; border-bottom:1px solid var(--gray-100);
}
.feed-item:last-child { border-bottom:none; }

.feed-item--full {
  background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius);
  padding:16px; border-bottom:none; margin-bottom:0;
}

.feed-icon {
  width:32px; height:32px; border-radius:8px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.feed-icon--green { background:var(--green-50); color:var(--green-600); }
.feed-icon--purple { background:rgba(117,83,255,.1); color:var(--accent-1); }
.feed-icon--gold { background:rgba(245,158,11,.1); color:var(--amber-500); }
.feed-icon--red { background:rgba(239,68,68,.08); color:#e11d48; }
.feed-icon--blue { background:var(--blue-50); color:var(--blue-500); }

.feed-content { flex:1; min-width:0; }
.feed-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.feed-user { font-weight:600; font-size:14px; color:var(--accent-1); }
.feed-title { font-size:14px; color:var(--gray-700); display:block; line-height:1.5; }
.feed-detail { font-size:13px; color:var(--gray-500); font-style:italic; display:block; margin-top:2px; }
.feed-detail-box {
  font-size:13px; color:var(--gray-500); font-style:italic;
  background:var(--gray-50); padding:8px 12px; border-radius:6px; margin-top:8px; line-height:1.5;
}
.feed-time { font-size:12px; color:var(--gray-400); white-space:nowrap; }

/* ===========================================================
   LEGAL PAGES
   =========================================================== */
.legal-page { padding-bottom:40px; }
.legal-page h1 { font-size:2em; font-weight:800; margin-bottom:4px; }
.legal-updated { color:var(--gray-400); font-size:13px; margin-bottom:32px; }

.legal-content h2 {
  font-size:1.15em; font-weight:700; color:var(--gray-900);
  margin:28px 0 12px; padding-top:20px;
  border-top:1px solid var(--gray-100);
}
.legal-content h2:first-child { border-top:none; padding-top:0; margin-top:0; }
.legal-content h3 { font-size:1em; font-weight:600; color:var(--gray-700); margin:16px 0 8px; }
.legal-content p { color:var(--gray-600); line-height:1.7; margin-bottom:12px; }
.legal-content ul { padding-left:24px; margin-bottom:12px; }
.legal-content li { color:var(--gray-600); line-height:1.7; margin-bottom:6px; }

/* ===========================================================
   SUPPORT PAGE
   =========================================================== */
.support-cards {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
  gap:16px; margin-bottom:36px;
}
.support-card {
  background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius-lg);
  padding:24px; text-align:center;
}
.support-card-icon {
  width:48px; height:48px; border-radius:12px;
  display:inline-flex; align-items:center; justify-content:center; margin-bottom:14px;
}
.support-card h3 { font-size:1em; font-weight:700; color:var(--gray-900); margin-bottom:6px; }
.support-card p { font-size:13px; color:var(--gray-500); line-height:1.5; margin-bottom:12px; }

.support-contact {
  background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius-lg);
  padding:28px; margin-bottom:36px;
}
.support-contact h2 { font-size:1.1em; font-weight:700; color:var(--gray-900); margin-bottom:20px; }
.support-contact-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:20px; }
.support-contact-item {
  display:flex; align-items:flex-start; gap:12px;
}
.support-contact-item svg { color:var(--accent-1); flex-shrink:0; margin-top:2px; }
.support-contact-item strong { font-size:13px; color:var(--gray-900); display:block; margin-bottom:2px; }
.support-contact-item p { font-size:14px; color:var(--gray-500); margin:0; }

.support-form-section {
  background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius-lg);
  padding:28px;
}
.support-form-section h2 { font-size:1.1em; font-weight:700; color:var(--gray-900); margin-bottom:6px; }

.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.support-textarea {
  width:100%; padding:10px 14px; border:1px solid var(--gray-300); border-radius:8px;
  font-size:14px; font-family:inherit; resize:vertical;
  transition: border-color .15s;
}
.support-textarea:focus { outline:none; border-color:var(--accent-1); box-shadow:0 0 0 3px rgba(117,83,255,.1); }

@media (max-width:600px) {
  .form-row { grid-template-columns:1fr; }
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width:1024px) {
  .hero-split { grid-template-columns:1fr; text-align:center; padding:56px 24px 48px; }
  .hero-content > p { margin:0 auto 32px; }
  .hero-actions { justify-content:center; }
  .hero-stats { justify-content:center; }
  .hero-visual { display:none; }
  .features-inner { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:768px) {
  .sidebar { transform:translateX(-100%); transition:transform .25s ease; }
  .sidebar.open { transform:translateX(0); box-shadow:var(--shadow-xl); }

  .mobile-header {
    display:flex; align-items:center; gap:14px;
    background:var(--gray-950); padding:12px 16px;
    position:sticky; top:0; z-index:150;
  }
  .mobile-logo { height:30px; filter:brightness(0) invert(1); }
  .hamburger {
    background:none; border:none; cursor:pointer; padding:4px;
    display:flex; flex-direction:column; gap:5px;
  }
  .hamburger span { display:block; width:22px; height:2px; background:#fff; border-radius:2px; }

  .logged-in .main-wrapper { margin-left:0; }

  .stat-row { flex-direction:column; }
  .module-grid { grid-template-columns:1fr; }
  .page-shell { padding:24px 16px 48px; }
  .features-inner { grid-template-columns:1fr; }
  .public-header-inner { padding:12px 16px; }
  .mod-actions { flex-direction:column; }
  .mod-actions .btn { text-align:center; }
}

@media (max-width:480px) {
  .hero-split { padding:32px 16px; }
  .hero-content h1 { font-size:2.2em; }
  .hero-stats { flex-direction:column; gap:16px; text-align:center; }
  .auth-card { padding:28px 20px; }
  .toast-container { left:12px; right:12px; max-width:none; }
  .page-header h1 { font-size:1.5em; }
}
