/* ============================================================
   Campaign Manager — style.css
   Theme: Purple (Mockup 4) — deep violet sidebar, light content
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Purple Palette */
  --purple-950: #1a0a2e;
  --purple-900: #240d3f;
  --purple-800: #3b1065;
  --purple-700: #5b1fa8;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-100: #ede9fe;
  --purple-50:  #f5f3ff;

  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  /* Semantic */
  --primary:        var(--purple-600);
  --primary-hover:  var(--purple-700);
  --text-main:      var(--slate-900);
  --text-secondary: var(--slate-500);
  --text-muted:     var(--slate-300);
  --surface:        var(--white);
  --surface-soft:   var(--slate-50);
  --surface-muted:  var(--slate-100);
  --border:         var(--slate-200);
  --border-focus:   var(--purple-500);

  /* Sidebar-specific (dark purple) */
  --sidebar-bg:         #2d1b69;
  --sidebar-bg-deep:    #1e0f4a;
  --sidebar-text:       rgba(255,255,255,0.75);
  --sidebar-text-hover: #ffffff;
  --sidebar-active-bg:  var(--purple-600);
  --sidebar-active-text:#ffffff;
  --sidebar-border:     rgba(255,255,255,0.08);
  --sidebar-header-bg:  #240d3f;

  /* Danger */
  --danger:       #6d28d9;
  --danger-hover: #5b21b6;

  /* Radius & shadow */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 2px 8px rgba(15,23,42,.08);
  --shadow-md: 0 4px 20px rgba(15,23,42,.10);
  --shadow-lg: 0 8px 40px rgba(15,23,42,.12);

  /* Misc */
  --transition: all 0.18s ease;
  --sidebar-w:  260px;
  --header-h:   64px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--surface-soft);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }
ul { list-style: none; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }

/* ── Landing page ──────────────────────────────────────────── */
.container {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.container > header {
  max-width: 680px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.container > header h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.container > header p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  font-weight: 400;
}

.auth-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.or-divider {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card i {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--purple-50);
  color: var(--primary);
  font-size: 1.25rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Utility classes ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  line-height: 1.2;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled, button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-main);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-muted);
  color: var(--primary);
  border-color: var(--slate-300);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: var(--white);
}

.btn-success { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-success:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--white); }

.btn-sm { min-height: 2rem; padding: 0.35rem 0.75rem; font-size: 0.8125rem; }
.btn-block { display: flex; width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bg-primary, .bg-success { background: var(--primary); color: var(--white); }
.bg-info    { background: var(--purple-400); color: var(--white); }
.bg-warning { background: var(--purple-700); color: var(--white); }
.bg-danger  { background: var(--danger); color: var(--white); }

.text-center { text-align: center; }
.text-muted, small { color: var(--text-secondary); font-size: 0.85em; }

.mt-1 { margin-top: 0.5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* ── Dashboard layout ──────────────────────────────────────── */
.dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--surface-soft);
}

/* Sidebar — deep purple dark theme */
.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--shadow-xs);
  z-index: 100;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--sidebar-header-bg);
}

.sidebar-header h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.sidebar-header p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.sidebar-nav ul li { margin-bottom: 2px; }

.sidebar-nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-nav ul li a i {
  width: 1.1rem;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-nav ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--sidebar-text-hover);
}

.sidebar-nav ul li.active > a {
  background: var(--purple-600);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-nav ul li.active > a i { opacity: 1; }

/* Submenu */
.sidebar-nav .has-submenu { position: relative; }
.sidebar-nav .submenu {
  display: none;
  margin: 4px 0 6px 1rem;
  padding: 4px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-sm);
}
.sidebar-nav .has-submenu.active .submenu { display: block; }
.sidebar-nav .submenu li { margin-bottom: 1px; }
.sidebar-nav .submenu li a {
  min-height: 2.1rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
}
.sidebar-nav .submenu li a:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--sidebar-border);
}

/* Logout button in sidebar inherits sidebar text */
.sidebar-footer .btn-secondary {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.12);
}
.sidebar-footer .btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  border-color: rgba(255,255,255,0.2);
}

/* Main content */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 3vw, 2rem);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.content-header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.avatar {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--purple-50);
  color: var(--primary);
  font-size: 0.9rem;
  border: 2px solid var(--border);
}

.content-section {
  display: none;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.content-section.active { display: block; }

.section-header, .results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-header h2, .recent-activity h2,
.report-container h3, .validation-results h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.filter-controls, .report-controls,
.state-filter, .result-stats, .numbers-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ── Stat cards ────────────────────────────────────────────── */
.stats-grid, .campaign-stats, .report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.campaign-stats .stat-card, .report-stat {
  display: block;
  text-align: center;
}

.stat-icon {
  display: flex;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 1.1rem;
}

.bg-primary .stat-icon, .stat-icon.bg-primary {
  background: var(--purple-50);
  color: var(--primary);
}
.stat-icon.bg-success { background: #ecfdf5; color: #059669; }
.stat-icon.bg-warning { background: #fefce8; color: #ca8a04; }
.stat-icon.bg-danger  { background: var(--purple-50); color: var(--purple-700); }
.stat-icon.bg-info    { background: var(--purple-50); color: var(--purple-500); }

.stat-info h3, .campaign-stats .stat-card h3, .report-stat p {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
}

.stat-info p, .campaign-stats .stat-card p,
.report-stat h4, .activity-content p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ── Recent activity ───────────────────────────────────────── */
.recent-activity { margin-top: 1.5rem; }
.recent-activity h2 { margin-bottom: 0.75rem; }

.activity-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 0 1.25rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--purple-50);
  color: var(--primary);
  font-size: 0.85rem;
}

.activity-content { min-width: 0; }
.activity-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}
.activity-time {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.775rem;
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ── Tables ────────────────────────────────────────────────── */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th, td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-soft); }

td { font-size: 0.875rem; color: var(--text-main); }

/*.table-actions {*/
/*  display: flex;*/
/*  align-items: center;*/
/*  gap: 0.4rem;*/
/*  flex-wrap: wrap;*/
/*}*/

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.table-actions .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form-col { min-width: 0; }

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

input, select, textarea {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-main);
  font-size: 0.9rem;
  transition: var(--transition);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

textarea { min-height: 6.5rem; resize: vertical; }
input[type="file"] { padding: 0.6rem; cursor: pointer; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.state-filter input { flex: 1 1 12rem; min-width: 0; }

/* ── Modals ────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: min(100%, 580px);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: var(--transition);
}
.close-modal:hover {
  background: var(--surface-muted);
  color: var(--text-main);
}

/* ── Upload & results ──────────────────────────────────────── */
.upload-container, .validation-results, .report-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: clamp(1.1rem, 3vw, 1.5rem);
  margin-bottom: 1.25rem;
}

.file-upload-box {
  position: relative;
  overflow: hidden;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.file-upload-box:hover {
  border-color: var(--primary);
  background: var(--purple-50);
}
.file-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-prompt i {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.65rem;
}
.upload-prompt p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}
.upload-prompt small { color: var(--text-secondary); }

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

/* Tabs */
.results-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.1rem;
}

.tab-btn {
  padding: 0.6rem 0.9rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.numbers-list {
  max-height: 16rem;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.numbers-list div {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}
.numbers-list div:last-child { border-bottom: none; }

/* Reports */
.report-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 1.25rem;
}

.chart-container {
  min-height: 260px;
  margin-top: 1.1rem;
  padding: 1rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* State extractor */
#state-extractor-section .upload-container {
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

#state-extractor-section .download-section {
  max-width: 660px;
  margin: 1.1rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 1.5rem;
  text-align: center;
}
#state-extractor-section .download-section h3 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
#state-extractor-section .download-section p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0.5rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pagination button {
  min-height: 2.1rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: var(--transition);
}
.pagination button:hover:not(:disabled) {
  background: var(--surface-muted);
  color: var(--text-main);
  border-color: var(--slate-300);
}
.pagination button.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-left: 0.5rem;
  font-family: var(--font-mono);
}

/* ── Notifications ─────────────────────────────────────────── */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  width: min(100% - 2rem, 26rem);
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  color: var(--text-main);
}
.notification-content button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}

.error, .error-state { color: var(--purple-700) !important; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --sidebar-w: 230px; }
}

@media (max-width: 900px) {
  .dashboard { display: block; }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .sidebar-nav { overflow: visible; }
  .sidebar-nav > ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.25rem;
  }
  .sidebar-nav .submenu, .sidebar-nav ul li { margin: 0; }
  .content-header { position: relative; }
}

@media (max-width: 768px) {
  .features { grid-template-columns: 1fr; }
  .section-header, .results-header, .content-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .filter-controls > *, .report-controls > *,
  .state-filter > *, .form-actions > .btn { flex: 1 1 100%; }
  .form-row { grid-template-columns: 1fr; }
  .filter-controls, .report-controls, .state-filter, .form-actions { width: 100%; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 1rem, 1100px); }
  .auth-buttons { flex-direction: column; align-items: stretch; }
  .auth-buttons .btn, .auth-buttons .or-divider { width: 100%; text-align: center; }
  .content-section { padding: 1rem; }
  .stat-card { flex-direction: column; align-items: flex-start; }
  .campaign-stats .stat-card { text-align: left; }
  .file-info { flex-direction: column; align-items: stretch; }
  .table-actions .btn, .numbers-actions .btn { width: 100%; }
}