/* =========================================================
   MyTaxBot LinkedIn Automation — Dashboard Styles
   Design: Premium dark mode with glassmorphism & micro-animations
   ========================================================= */

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

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  /* Colors */
  --bg-base:       #0a0d14;
  --bg-surface:    #111520;
  --bg-elevated:   #161b2b;
  --bg-card:       #1a2035;
  --bg-card-hover: #1f2840;

  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);

  --accent-blue:   #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-teal:   #06b6d4;
  --accent-green:  #10b981;
  --accent-amber:  #f59e0b;
  --accent-red:    #ef4444;

  /* Gradients */
  --grad-primary:  linear-gradient(135deg, #3b82f6, #8b5cf6);
  --grad-success:  linear-gradient(135deg, #10b981, #06b6d4);
  --grad-warning:  linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-card:     linear-gradient(160deg, rgba(59,130,246,0.06) 0%, rgba(139,92,246,0.04) 100%);

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;
  --text-accent:    #60a5fa;

  /* Typography */
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.15);
  --shadow-elevated: 0 8px 40px rgba(0,0,0,0.5);

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Layout ────────────────────────────────────────────── */
.app-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.main-content {
  padding: 32px;
  overflow-x: hidden;
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.sidebar-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo .logo-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
}

.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.nav-badge {
  margin-left: auto;
  background: var(--accent-blue);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.nav-badge.urgent { background: var(--accent-red); }

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px 4px;
  margin-top: 8px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ── Page Header ───────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Stats Row ─────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  font-size: 22px;
  margin-bottom: 12px;
  display: block;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-trend {
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-trend.up { color: var(--accent-green); }
.stat-trend.down { color: var(--accent-red); }

/* ── Filter Bar ────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.filter-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  border-right: 1px solid var(--border);
}

.filter-btn:last-child { border-right: none; }
.filter-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.filter-btn.active { background: var(--accent-blue); color: white; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  transition: border-color var(--transition);
}

.search-box:focus-within { border-color: var(--accent-blue); }

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  width: 100%;
}

.search-box input::placeholder { color: var(--text-muted); }

/* ── Post Cards ────────────────────────────────────────── */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  animation: slideIn 0.3s ease forwards;
}

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

.post-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); }

.post-card.urgency-alta { border-left: 3px solid var(--accent-red); }
.post-card.urgency-media { border-left: 3px solid var(--accent-amber); }
.post-card.urgency-baja { border-left: 3px solid var(--border-strong); }

.post-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.post-type-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-type-badge.normativa {
  background: rgba(59,130,246,0.15);
  color: var(--accent-blue);
}

.post-type-badge.actualidad {
  background: rgba(16,185,129,0.15);
  color: var(--accent-green);
}

.sector-badge {
  padding: 4px 10px;
  background: rgba(139,92,246,0.12);
  color: #a78bfa;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
}

.urgency-badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

.urgency-badge.alta { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.urgency-badge.media { background: rgba(245,158,11,0.15); color: var(--accent-amber); }
.urgency-badge.baja { background: rgba(100,116,139,0.12); color: var(--text-muted); }

.post-source {
  font-size: 12px;
  color: var(--text-muted);
}

/* Confidence meter */
.confidence-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.confidence-bar {
  width: 60px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

.confidence-fill.low    { background: var(--accent-red); }
.confidence-fill.medium { background: var(--accent-amber); }
.confidence-fill.high   { background: var(--accent-green); }

.confidence-label { color: var(--text-muted); }

/* Post body */
.post-card-body {
  padding: 16px 20px;
}

.post-content-preview {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 120px;
  overflow: hidden;
  position: relative;
  transition: max-height var(--transition-slow);
}

.post-content-preview.expanded { max-height: 9999px; }

.post-content-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-card));
  pointer-events: none;
  transition: opacity var(--transition);
}

.post-content-preview.expanded::after { opacity: 0; }

.expand-btn {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 6px;
  font-family: var(--font-sans);
  transition: color var(--transition);
}

.expand-btn:hover { color: var(--text-primary); }

/* Post editor */
.post-editor {
  display: none;
  width: 100%;
  min-height: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  padding: 14px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

.post-editor:focus { border-color: var(--accent-blue); }
.post-editor.visible { display: block; }

.char-counter {
  text-align: right;
  font-size: 11px;
  font-family: var(--font-mono);
  margin-top: 6px;
  transition: color var(--transition);
}

.char-counter.ok { color: var(--accent-green); }
.char-counter.warn { color: var(--accent-amber); }
.char-counter.over { color: var(--accent-red); }

/* Hashtags preview */
.hashtags-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.hashtag-chip {
  padding: 3px 10px;
  background: rgba(59,130,246,0.1);
  color: var(--text-accent);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}

/* Post card footer / actions */
.post-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.post-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: auto;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(59,130,246,0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
}

.btn-success {
  background: var(--accent-green);
  color: white;
  box-shadow: 0 2px 12px rgba(16,185,129,0.25);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239,68,68,0.2);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239,68,68,0.25);
  border-color: var(--accent-red);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* Icon only button */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-strong); }

/* ── Toast Notifications ───────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  font-size: 14px;
  max-width: 360px;
  pointer-events: all;
  animation: toastIn 0.3s ease forwards;
  transition: all var(--transition);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error   { border-color: rgba(239,68,68,0.3); }
.toast.info    { border-color: rgba(59,130,246,0.3); }

/* ── Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.visible { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 560px;
  width: 90%;
  box-shadow: var(--shadow-elevated);
  transform: scale(0.95) translateY(8px);
  transition: transform var(--transition);
}

.modal-overlay.visible .modal { transform: scale(1) translateY(0); }

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

.modal-title { font-size: 18px; font-weight: 700; }

/* ── LinkedIn Preview ──────────────────────────────────── */
.linkedin-preview {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #1a1a1a;
  font-family: -apple-system, sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.linkedin-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.linkedin-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0077b5, #00a0dc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.linkedin-name { font-weight: 700; font-size: 15px; color: rgba(0,0,0,0.9); }
.linkedin-title { font-size: 13px; color: rgba(0,0,0,0.55); }
.linkedin-time  { font-size: 12px; color: rgba(0,0,0,0.4); margin-top: 2px; }

.linkedin-body {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0,0,0,0.85);
  white-space: pre-wrap;
}

.linkedin-hashtags { color: #0a66c2; margin-top: 8px; font-size: 14px; }

/* ── Analytics Page ────────────────────────────────────── */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.analytics-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
}

/* Sector bars */
.sector-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sector-bar-label {
  font-size: 13px;
  width: 130px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.sector-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.sector-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--grad-primary);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sector-bar-pct {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  width: 36px;
  text-align: right;
}

/* Phase indicator */
.phase-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
}

.phase-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.phase-step::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.phase-step:last-child::before { display: none; }

.phase-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 14px;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.phase-step.completed .phase-dot {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.phase-step.active .phase-dot {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 0 16px rgba(59,130,246,0.4);
}

.phase-label { font-size: 11px; color: var(--text-muted); line-height: 1.3; }
.phase-step.active .phase-label { color: var(--text-primary); font-weight: 600; }

/* Confidence gauge */
.confidence-gauge {
  text-align: center;
  padding: 12px 0;
}

.gauge-value {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gauge-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.gauge-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── History Table ─────────────────────────────────────── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.history-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.history-table tbody tr:hover { background: var(--bg-card-hover); }
.history-table tbody td { padding: 14px 16px; color: var(--text-secondary); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.status-pill.published { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.status-pill.pending   { background: rgba(245,158,11,0.12); color: var(--accent-amber); }
.status-pill.rejected  { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.status-pill.scheduled { background: rgba(59,130,246,0.12); color: var(--accent-blue); }

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-sub { font-size: 14px; }

/* ── Loading ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card-hover) 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; }
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Setup / Onboarding Banner ─────────────────────────── */
.setup-banner {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.setup-banner-icon { font-size: 28px; flex-shrink: 0; }
.setup-banner-title { font-weight: 700; margin-bottom: 4px; }
.setup-banner-sub { font-size: 13px; color: var(--text-secondary); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .main-content { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 20px; }
}
