/* ============================================================
   BLUEWAVE — Main Stylesheet
   Blue & White theme | Dark mode | Mobile-first responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  /* Brand blues */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;

  /* Light mode */
  --bg:          #f0f6ff;
  --bg-card:     #ffffff;
  --bg-elevated: #f8faff;
  --bg-input:    #f1f5f9;
  --border:      #e2eaf7;
  --border-focus:#3b82f6;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  --accent:         #2563eb;
  --accent-hover:   #1d4ed8;
  --accent-light:   #eff6ff;
  --accent-text:    #1d4ed8;

  --danger:    #ef4444;
  --success:   #22c55e;
  --warning:   #f59e0b;

  /* Layout */
  --nav-h:       60px;
  --bottom-nav-h:64px;
  --sidebar-w:   260px;
  --content-max: 600px;
  --radius:      12px;
  --radius-lg:   20px;
  --radius-sm:   8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(37,99,235,.08), 0 1px 2px rgba(37,99,235,.05);
  --shadow:    0 4px 16px rgba(37,99,235,.10), 0 1px 4px rgba(37,99,235,.06);
  --shadow-lg: 0 12px 40px rgba(37,99,235,.14), 0 4px 12px rgba(37,99,235,.08);

  /* Transitions */
  --t: 200ms cubic-bezier(.4,0,.2,1);
}

/* ── DARK MODE ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #0a0f1e;
  --bg-card:     #111827;
  --bg-elevated: #1a2236;
  --bg-input:    #1e2d45;
  --border:      #1e3a5f;
  --border-focus:#3b82f6;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  --accent-light:   #1e3a5f;
  --accent-text:    #60a5fa;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow:    0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--t), color var(--t);
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.app-wrapper {
  display: grid;
  min-height: 100vh;
  padding-top: var(--nav-h);
  padding-bottom: var(--bottom-nav-h);
}

@media (min-width: 768px) {
  .app-wrapper {
    grid-template-columns: var(--sidebar-w) 1fr;
    padding-top: var(--nav-h);
    padding-bottom: 0;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    gap: 0 24px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (min-width: 1024px) {
  .app-wrapper {
    grid-template-columns: var(--sidebar-w) minmax(0,var(--content-max)) 240px;
  }
}

.main-content {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 768px) {
  .main-content { padding: 24px 0; }
}

/* ── TOP NAVBAR ─────────────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--t), border-color var(--t);
}

.nav-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand .wave-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-search {
  display: none;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 16px;
  gap: 8px;
  width: 220px;
  transition: all var(--t);
}
.nav-search:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.nav-search input {
  background: none;
  border: none;
  color: var(--text-primary);
  width: 100%;
  font-size: 14px;
}
.nav-search input::placeholder { color: var(--text-muted); }

@media (min-width: 640px) { .nav-search { display: flex; } }

/* ── BOTTOM NAV (mobile) ────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  transition: background var(--t), border-color var(--t);
}

@media (min-width: 768px) { .bottom-nav { display: none; } }

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--t);
  position: relative;
  background: none;
  border: none;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active svg path { fill: currentColor; }

.notif-badge {
  position: absolute;
  top: 6px; right: 12px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  display: none;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  height: fit-content;
  padding-top: 24px;
}
@media (min-width: 768px) { .sidebar { display: block; } }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
  transition: all var(--t);
  border: none; background: none; width: 100%; text-align: left;
}
.sidebar-item:hover {
  background: var(--accent-light);
  color: var(--accent-text);
}
.sidebar-item.active {
  background: var(--accent-light);
  color: var(--accent-text);
  font-weight: 600;
}
.sidebar-item svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: background var(--t), border-color var(--t);
}

/* ── POST COMPOSER ──────────────────────────────────────────── */
.composer {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
}

.composer-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-700));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.composer-avatar img { width: 100%; height: 100%; object-fit: cover; }

.composer-body { flex: 1; }

.composer-textarea {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  resize: none;
  min-height: 72px;
  line-height: 1.5;
  padding: 4px 0;
}
.composer-textarea::placeholder { color: var(--text-muted); }

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-options { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.char-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.char-count.warning { color: var(--warning); }
.char-count.danger  { color: var(--danger); }

/* ── POST CARD ───────────────────────────────────────────────── */
.post-card {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.post-card:last-child { border-bottom: none; }
.post-card:hover { background: var(--bg-elevated); }

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-700));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 80px; height: 80px; font-size: 28px; }
.avatar-xl { width: 120px; height: 120px; font-size: 42px; }

.author-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.author-name:hover { color: var(--accent); }
.author-handle {
  font-size: 13px;
  color: var(--text-muted);
}

.post-content {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-content .hashtag { color: var(--accent); font-weight: 500; }
.post-content .mention { color: var(--accent); }
.post-content a { color: var(--accent); word-break: break-all; }

.post-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 20px;
  transition: all var(--t);
}
.action-btn:hover { background: var(--accent-light); color: var(--accent-text); }
.action-btn.liked { color: var(--danger); }
.action-btn.liked:hover { background: #fef2f2; color: var(--danger); }
.action-btn svg { width: 18px; height: 18px; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--accent-light);
  color: var(--accent-text);
}
.btn-secondary:hover { background: var(--blue-100); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: white; }

.btn-danger {
  background: #fef2f2;
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-ghost {
  background: none;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-elevated); }

.btn-sm { font-size: 12px; padding: 6px 14px; }
.btn-lg { font-size: 16px; padding: 14px 28px; }
.btn-full { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--t);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }

.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.form-error.show { display: block; }

.form-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.form-success.show { display: block; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: background var(--t);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--t);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Select styled */
.visibility-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
}

/* ── PROFILE ─────────────────────────────────────────────────── */
.profile-cover {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  position: relative;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-edit {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,.5);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.profile-info-wrap {
  padding: 0 20px 20px;
  margin-top: -48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-avatar-wrap {
  position: relative;
  width: fit-content;
}
.profile-avatar-wrap .avatar-xl {
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow);
}
.avatar-edit-btn {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 28px; height: 28px;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.profile-meta { display: flex; flex-direction: column; gap: 4px; }
.profile-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}
.profile-username { font-size: 14px; color: var(--text-muted); }
.profile-bio { font-size: 15px; color: var(--text-secondary); }

.profile-stats {
  display: flex;
  gap: 24px;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-label { font-size: 12px; color: var(--text-muted); }

/* ── COMMENT SECTION ─────────────────────────────────────────── */
.comment-section { padding: 12px 16px; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment-body {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 10px 14px;
}
.comment-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}
.comment-author.anon { color: var(--text-muted); font-style: italic; }
.comment-text { font-size: 14px; color: var(--text-primary); margin-top: 2px; }
.comment-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97);
  transition: transform var(--t);
  overflow: hidden;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: all var(--t);
}
.modal-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ── GUEST TIMER BANNER ─────────────────────────────────────── */
.guest-banner {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 300px;
  max-width: calc(100vw - 32px);
  animation: slideUp .4s cubic-bezier(.34,1.56,.64,1);
}
@media (min-width: 768px) { .guest-banner { bottom: 24px; } }

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(80px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.guest-timer {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--accent);
  min-width: 36px;
}
.guest-timer.urgent { color: var(--danger); }
.guest-banner-text { flex: 1; }
.guest-banner-text strong { display: block; font-weight: 600; font-size: 15px; }
.guest-banner-text span { font-size: 13px; color: var(--text-muted); }

/* ── AUTH PAGES ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-mark {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(37,99,235,.3);
}
.auth-logo-mark svg { width: 30px; height: 30px; color: white; }
.auth-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.auth-subtitle { font-size: 14px; color: var(--text-muted); }

/* OTP input */
.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}
.otp-digit {
  width: 48px; height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all var(--t);
}
.otp-digit:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
  background: var(--bg-card);
}

/* ── NOTIFICATION ITEM ──────────────────────────────────────── */
.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.notif-item:hover { background: var(--bg-elevated); }
.notif-item.unread { background: var(--accent-light); }
.notif-item.unread:hover { background: var(--blue-100); }
.notif-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.notif-text { font-size: 14px; color: var(--text-primary); }
.notif-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: .6;
}
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-text  { font-size: 14px; }

/* ── DARK MODE TOGGLE ───────────────────────────────────────── */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--t);
}
.theme-toggle:hover { background: var(--accent-light); color: var(--accent-text); }

/* ── ADMIN PANEL ─────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  background: var(--blue-800);
  color: white;
  flex-shrink: 0;
  padding: 0;
}
.admin-brand {
  padding: 24px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-brand span { opacity: .6; font-size: 12px; display: block; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  transition: all var(--t);
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(255,255,255,.1);
  color: white;
}
.admin-main { flex: 1; padding: 32px; background: #f8fafc; }
.admin-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}
.admin-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  padding: 24px;
  margin-bottom: 24px;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.admin-table th { font-weight: 600; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-blue   { background: #eff6ff; color: #2563eb; }
.badge-green  { background: #f0fdf4; color: #166534; }
.badge-red    { background: #fef2f2; color: #dc2626; }
.badge-yellow { background: #fefce8; color: #92400e; }

/* ── UTILITIES ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: 13px; }
.flex        { display: flex; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Toast */
.toast-container { position: fixed; top: 80px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  max-width: 320px;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--accent); }
@keyframes toastIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
