/* ==========================================================================
   Contact Extractor — Premium Dark Glassmorphism Design System
   Font: Inter (400, 500, 600, 700) via Google Fonts
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Backgrounds */
  --bg-base: #0a0e1a;
  --bg-surface: rgba(255, 255, 255, 0.05);
  --bg-surface-hover: rgba(255, 255, 255, 0.08);
  --bg-surface-subtle: rgba(255, 255, 255, 0.03);
  --bg-surface-alt: rgba(255, 255, 255, 0.02);

  /* Borders */
  --border-default: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --border-faint: rgba(255, 255, 255, 0.04);

  /* Typography */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #6b7280;

  /* Accent — Primary (Electric Blue) */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-bg: rgba(59, 130, 246, 0.1);
  --primary-bg-subtle: rgba(59, 130, 246, 0.05);
  --primary-glow: rgba(59, 130, 246, 0.4);
  --primary-ring: rgba(59, 130, 246, 0.1);
  --primary-light: #60a5fa;

  /* Accent — Secondary (Purple) */
  --secondary: #8b5cf6;
  --secondary-bg: rgba(139, 92, 246, 0.15);

  /* Semantic Colors */
  --verified: #10b981;
  --verified-light: #34d399;
  --verified-bg: rgba(16, 185, 129, 0.15);

  --uncertain: #f59e0b;
  --uncertain-light: #fbbf24;
  --uncertain-bg: rgba(245, 158, 11, 0.15);

  --invalid: #ef4444;
  --invalid-light: #f87171;
  --invalid-bg: rgba(239, 68, 68, 0.15);

  --pending: #6b7280;
  --pending-light: #9ca3af;
  --pending-bg: rgba(107, 114, 128, 0.15);

  /* Glassmorphism */
  --glass-blur: blur(20px);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-primary: 0 4px 15px rgba(59, 130, 246, 0.4);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;

  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: var(--glass-blur);
  background: var(--bg-surface-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-title {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.app-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.view-container {
  position: relative;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

/* --------------------------------------------------------------------------
   Upload Zone
   -------------------------------------------------------------------------- */
.upload-zone {
  max-width: 600px;
  margin: 80px auto 0;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  background: var(--bg-surface-subtle);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-bg-subtle);
  box-shadow: var(--shadow-glow);
}

.upload-zone.drag-over {
  transform: scale(1.01);
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  opacity: 0.5;
  color: var(--primary);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.upload-zone:hover .upload-icon {
  opacity: 0.8;
  transform: translateY(-4px);
}

.upload-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 500;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.format-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.format-badge {
  background: var(--bg-surface-hover);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.file-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: left;
}

.file-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.file-size {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.file-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.file-remove:hover {
  color: var(--invalid-light);
}

/* Hidden file input */
.upload-input {
  display: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

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

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* --------------------------------------------------------------------------
   Stats Bar
   -------------------------------------------------------------------------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1rem;
}

.stat-icon.blue {
  background: var(--primary-bg);
  color: var(--primary);
}

.stat-icon.green {
  background: var(--verified-bg);
  color: var(--verified);
}

.stat-icon.amber {
  background: var(--uncertain-bg);
  color: var(--uncertain);
}

.stat-icon.red {
  background: var(--invalid-bg);
  color: var(--invalid);
}

.stat-icon.purple {
  background: var(--secondary-bg);
  color: var(--secondary);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  animation: countUp 0.5s ease forwards;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Filter Bar
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-base);
  font-family: var(--font-family);
  white-space: nowrap;
}

.filter-pill:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.filter-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.filter-pill .pill-count {
  margin-left: 6px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.search-input-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 40px;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 280px;
  outline: none;
  font-family: var(--font-family);
  transition: all var(--transition-base);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

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

/* --------------------------------------------------------------------------
   Data Table
   -------------------------------------------------------------------------- */
.data-table-container {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.data-table-wrapper {
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}

.data-table th:hover {
  color: var(--text-primary);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.7rem;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.sort-arrow.active {
  opacity: 1;
  color: var(--primary);
}

.data-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
  color: var(--text-primary);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-surface-alt);
}

.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* Cell-specific helpers */
.cell-email {
  color: var(--primary-light);
}

.cell-phone {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Status Pills
   -------------------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-pill.pending {
  background: var(--pending-bg);
  color: var(--pending-light);
}

.status-pill.verifying {
  background: var(--primary-bg);
  color: var(--primary-light);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-pill.verified {
  background: var(--verified-bg);
  color: var(--verified-light);
}

.status-pill.uncertain {
  background: var(--uncertain-bg);
  color: var(--uncertain-light);
}

.status-pill.invalid {
  background: var(--invalid-bg);
  color: var(--invalid-light);
}

/* Dot indicator inside status pills */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Confidence Bar
   -------------------------------------------------------------------------- */
.confidence-wrapper {
  display: flex;
  align-items: center;
}

.confidence-bar {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.confidence-bar-fill.high {
  background: var(--verified);
}

.confidence-bar-fill.medium {
  background: var(--uncertain);
}

.confidence-bar-fill.low {
  background: var(--invalid);
}

.confidence-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Checkbox
   -------------------------------------------------------------------------- */
.checkbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font-family);
  font-weight: 500;
  z-index: 1000;
  animation: slideInRight 0.3s ease;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
}

.toast.error {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: 1px solid var(--invalid);
}

.toast.success {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  border: 1px solid var(--verified);
}

.toast.info {
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.toast.hiding {
  animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Download Section
   -------------------------------------------------------------------------- */
.download-section {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.download-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-title {
  font-weight: 600;
  font-size: 1rem;
}

.download-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

.download-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-base);
  border: none;
  outline: none;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch:checked {
  background: var(--primary);
}

.toggle-switch:checked::after {
  transform: translateX(20px);
}

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

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-text {
  font-size: 1rem;
  color: var(--text-secondary);
}

.empty-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Progress Bar (Upload / Processing)
   -------------------------------------------------------------------------- */
.progress-container {
  max-width: 400px;
  margin: 24px auto 0;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.02);
}

/* --------------------------------------------------------------------------
   Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

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

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.slide-in {
  animation: slideInUp 0.4s ease forwards;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-8 {
  gap: 8px;
}

.gap-16 {
  gap: 16px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .app-container {
    padding: 20px 16px;
  }

  .app-header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .app-title {
    font-size: 1.4rem;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-pills {
    flex-wrap: wrap;
  }

  .search-input {
    width: 100%;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .download-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-zone {
    margin-top: 40px;
    padding: 40px 24px;
  }

  .stat-number {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 16px 12px;
  }

  .confidence-bar {
    width: 60px;
  }

  .data-table-wrapper {
    max-height: 400px;
  }
}

/* --------------------------------------------------------------------------
   Risk & Deliverability GUI Styles
   -------------------------------------------------------------------------- */
.status-cell-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  margin-top: 2px;
}

.status-sub-item {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-role {
  background-color: var(--secondary-bg);
  color: var(--secondary);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
}

.confidence-wrapper-vertical {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.risk-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.text-green {
  color: var(--verified-light) !important;
}

.text-amber {
  color: var(--uncertain-light) !important;
}

.text-red {
  color: var(--invalid-light) !important;
}

/* --------------------------------------------------------------------------
   Progress Bar Dashboard styles
   -------------------------------------------------------------------------- */
.progress-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  backdrop-filter: var(--glass-blur);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.4s ease;
}

.progress-container.hidden {
  display: none !important;
}

.progress-bar-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-percent {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
}

.app-progress-bar {
  background: rgba(255, 255, 255, 0.05);
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--border-subtle);
}

.app-progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.app-progress-bar-fill.complete {
  background: var(--verified);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.progress-subtitle-row {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
