@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Основные */
  --color-primary: #7C4DFF;
  --color-primary-dark: #6200EA;
  --color-primary-glow: rgba(124, 77, 255, 0.25);
  --color-secondary: #00E5FF;
  --color-accent: #00E676;

  /* Фон */
  --color-bg: #0A0A12;
  --color-surface: rgba(22, 22, 42, 0.85);
  --color-surface-solid: #16162A;
  --color-surface-light: rgba(37, 37, 65, 0.7);
  --color-card: rgba(20, 28, 58, 0.65);
  --color-card-hover: rgba(28, 38, 72, 0.8);

  /* Текст */
  --color-text-primary: #ECECEC;
  --color-text-secondary: #8E8EA0;
  --color-text-muted: #5A5A6E;

  /* Статусы */
  --color-sent: #00E676;
  --color-queued: #448AFF;
  --color-received: #FFD740;
  --color-failed: #FF5252;
  --color-banned: #FF5252;

  /* Утилиты */
  --color-divider: rgba(42, 42, 64, 0.6);
  --color-error: #FF5252;
  --color-warning: #FFD740;
  --color-success: #00E676;

  /* Типографика */
  --font-primary: 'Inter', -apple-system, sans-serif;

  /* Скругления */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Тени */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px var(--color-primary-glow);

  /* Glassmorphism */
  --glass-blur: blur(16px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  overscroll-behavior: none; /* Жёстко глушим pull-to-refresh на всех устройствах */
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg);
  color: var(--color-text-primary);
  overflow: hidden;
  height: 100vh; /* Фоллбэк */
  height: 100dvh; /* Динамический вьюпорт для мобилок */
  /* Фоновый градиент */
  background-image:
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(124, 77, 255, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
}

.app {
  display: flex;
  height: 100vh; /* Фоллбэк */
  height: 100dvh; /* Учитываем адресную строку мобильного браузера */
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: 230px;
  background: var(--color-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: 16px;
}

.logo-icon { font-size: 26px; filter: drop-shadow(0 0 6px var(--color-primary-glow)); }
.logo-text {
  font-weight: 700;
  font-size: 17px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  list-style: none;
  flex: 1;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  color: var(--color-text-secondary);
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: inherit;
  z-index: -1;
}

.nav-item:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-light);
  transform: translateX(4px);
}

.nav-item.active {
  color: #fff;
  background: transparent;
  box-shadow: var(--shadow-glow);
}

.nav-item.active::before { opacity: 1; }

.nav-icon { font-size: 18px; }
.nav-label { font-size: 14px; font-weight: 500; }

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-divider);
}

.version {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}

/* ── Content ─────────────────────────────────────── */
.content {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
  overscroll-behavior-y: contain; /* Чтобы скролл внутри не тащил весь экран на телефонах */
  -webkit-overflow-scrolling: touch; /* Плавный кинетический скролл на iOS */
  animation: fadeIn 0.35s ease-out;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-text-primary) 50%, var(--color-text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Stat Cards (Glassmorphism) ──────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--color-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  border: var(--glass-border);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.4s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.8;
}

.stat-card.total::after { background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); }
.stat-card.sent::after { background: linear-gradient(90deg, var(--color-sent), #00B862); }
.stat-card.failed::after { background: linear-gradient(90deg, var(--color-failed), #D81B60); }
.stat-card.queued::after { background: linear-gradient(90deg, var(--color-queued), #2962FF); }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.stat-card .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.stat-card .stat-value {
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-card.total .stat-value { color: var(--color-primary); }
.stat-card.sent .stat-value { color: var(--color-sent); }
.stat-card.failed .stat-value { color: var(--color-failed); }
.stat-card.queued .stat-value { color: var(--color-queued); }

/* ── Message List ────────────────────────────────── */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  border: var(--glass-border);
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  animation: fadeIn 0.3s ease-out both;
}

.message-row:hover {
  background: var(--color-card-hover);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.message-row.read { opacity: 0.55; }
.message-row.read:hover { opacity: 0.85; }

.btn-read {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--color-divider);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-read:hover {
  border-color: var(--color-sent);
  color: var(--color-sent);
  background: rgba(0, 230, 118, 0.1);
  transform: scale(1.15);
}

.btn-read.read {
  border-color: var(--color-sent);
  color: var(--color-sent);
  background: rgba(0, 230, 118, 0.15);
}

/* ── Badge ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex-shrink: 0;
}

.badge.SENT { background: rgba(0, 230, 118, 0.12); color: var(--color-sent); border: 1px solid rgba(0, 230, 118, 0.2); }
.badge.RECEIVED { background: rgba(255, 215, 64, 0.12); color: var(--color-received); border: 1px solid rgba(255, 215, 64, 0.2); }
.badge.QUEUED { background: rgba(68, 138, 255, 0.12); color: var(--color-queued); border: 1px solid rgba(68, 138, 255, 0.2); }
.badge.FAILED { background: rgba(255, 82, 82, 0.12); color: var(--color-failed); border: 1px solid rgba(255, 82, 82, 0.2); }
.badge.BANNED { background: rgba(255, 82, 82, 0.12); color: var(--color-banned); border: 1px solid rgba(255, 82, 82, 0.2); }
.badge.SPAM { background: rgba(255, 82, 82, 0.12); color: var(--color-failed); border: 1px solid rgba(255, 82, 82, 0.2); }
.badge.BOT { background: rgba(124, 77, 255, 0.12); color: var(--color-primary); border: 1px solid rgba(124, 77, 255, 0.2); }
.badge.SENDING { background: rgba(124, 77, 255, 0.12); color: var(--color-primary); border: 1px solid rgba(124, 77, 255, 0.2); }
.badge.PARTIAL_SENT { background: rgba(255, 215, 64, 0.12); color: var(--color-warning); border: 1px solid rgba(255, 215, 64, 0.2); }

.message-body { flex: 1; min-width: 0; }
.message-text { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.message-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; display: flex; gap: 14px; }
.message-time { font-size: 12px; color: var(--color-text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ── Table ────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-text-muted);
  font-weight: 600;
}

td {
  font-size: 13px;
  transition: background 0.15s;
}

tr:hover td {
  background: rgba(124, 77, 255, 0.03);
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-danger {
  background: rgba(255, 82, 82, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(255, 82, 82, 0.25);
}

.btn-danger:hover {
  background: rgba(255, 82, 82, 0.2);
  box-shadow: 0 0 16px rgba(255, 82, 82, 0.15);
}

/* ── Filters / Inputs ────────────────────────────── */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-input {
  background: var(--color-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.filter-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.filter-input::placeholder {
  color: var(--color-text-muted);
}

/* ── Toast ────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--color-surface-solid);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  box-shadow: var(--shadow-elevated);
  animation: toastSlideIn 0.35s cubic-bezier(.4,0,.2,1), toastFadeOut 0.35s 2.6s ease-in forwards;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  border-left: 3px solid var(--color-success);
}

.toast.success::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
  font-size: 16px;
}

.toast.error {
  border-left: 3px solid var(--color-error);
}

.toast.error::before {
  content: '✕';
  color: var(--color-error);
  font-weight: 700;
  font-size: 16px;
}

/* ── Loading ──────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  height: 200px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.loading::before {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-divider);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Info Card ────────────────────────────────────── */
.info-card {
  background: var(--color-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  padding: 22px;
  border: var(--glass-border);
  margin-bottom: 16px;
  animation: slideUp 0.4s ease-out both;
}

.info-card h3 {
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--color-text-primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider);
  transition: background 0.15s;
}

.info-row:hover { background: rgba(124, 77, 255, 0.03); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--color-text-muted); font-size: 13px; }
.info-value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Pagination ──────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination button {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 13px;
  transition: all 0.2s;
}

.pagination button:hover {
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

.pagination button.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--color-primary-glow);
}

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-divider);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ── Modal (P2) ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border: var(--glass-border);
  box-shadow: var(--shadow-elevated), 0 0 40px rgba(124, 77, 255, 0.15);
  animation: slideUp 0.3s cubic-bezier(.4,0,.2,1);
}

.modal-content .info-card { margin-bottom: 12px; }
.modal-content pre {
  background: rgba(0,0,0,0.15);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

/* ── Pagination disabled ─────────────────────────── */
.pagination button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Animations ──────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(50px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastFadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(10px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Section headers ─────────────────────────────── */
h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--color-text-primary);
}

/* ── Code ─────────────────────────────────────────── */
code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  background: rgba(124, 77, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Login screen ────────────────────────────────── */
#fh-login {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  font-family: 'Inter', sans-serif;
}

.login-card {
  background: var(--color-surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(124, 77, 255, 0.2);
  border-radius: 20px;
  padding: 48px 40px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 0 60px rgba(124, 77, 255, 0.08);
}

.login-logo {
  font-size: 56px;
  margin-bottom: 8px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0 0 28px;
}

.login-input {
  width: 100%;
  background: var(--color-surface-light);
  color: var(--color-text-primary);
  border: 1.5px solid rgba(124, 77, 255, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.login-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.login-input::placeholder { color: var(--color-text-muted); }

.login-error {
  color: var(--color-failed);
  font-size: 13px;
  min-height: 20px;
  margin: 10px 0 4px;
}

.login-btn {
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.login-btn:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 4px 20px var(--color-primary-glow);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ── Connection fields (Tauri client) ──────────── */
.login-field-group {
  margin-bottom: 14px;
  text-align: left;
}

.login-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

/* ── Logout button ───────────────────────────────── */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 10px 20px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
  margin-top: 8px;
}

.logout-btn:hover { color: var(--color-failed); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar {
    width: 60px;
    padding: 12px 0;
  }
  .sidebar-logo { padding: 0 12px 12px; }
  .logo-text { display: none; }
  .nav-label { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .sidebar-footer { text-align: center; }
  .content { padding: 20px 16px; }
  .db-toggle { flex-direction: column; padding: 4px !important; }
  .db-btn span { display: none; }
}

@media (max-width: 600px) {
  .app { flex-direction: column-reverse; }
  .stat-grid { grid-template-columns: 1fr; }
  .sidebar { 
    width: 100%; 
    height: 60px; 
    flex-direction: row; 
    border-right: none; 
    border-top: var(--glass-border); 
    padding: 0;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
  }
  .sidebar-logo { display: none; }
  .sidebar-nav { 
    display: flex; 
    flex-direction: row; 
    width: 100%; 
    padding: 0; 
    margin: 0;
  }
  .nav-item { 
    flex: 1; 
    justify-content: center; 
    padding: 10px; 
    margin: 0; 
    border-radius: 0; 
  }
  .nav-icon { font-size: 20px; margin: 0; }
  
  .sidebar-footer { 
    padding: 0; 
    display: flex; 
    align-items: center; 
    border-top: none;
    margin-right: 12px;
  }
  .version { display: none; }
  .db-toggle { flex-direction: row; gap: 6px; padding: 0 !important; }
  .db-btn { font-size: 16px !important; padding: 8px !important; border-radius: 50% !important; }
  .logout-btn { display: none; }
  
  .content { padding: 16px 12px; }
  .filters { flex-direction: column; }
  .filter-input { width: 100% !important; }
  
  .message-meta { flex-wrap: wrap; gap: 8px; }
  .stat-card { padding: 16px; }
  .page-header h1 { font-size: 22px; }
}
