/* ============================================
   CodeDirectory — Design System
   ============================================ */

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

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Primary Palette */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;

  /* Accent */
  --accent-400: #34d399;
  --accent-500: #10b981;
  --accent-600: #059669;

  /* Warning / Info */
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;

  /* Neutrals */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* Surface Colors (Dark Mode Default) */
  --bg-primary: #0b0f1a;
  --bg-secondary: #111827;
  --bg-elevated: #1a2035;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-glass: rgba(30, 41, 59, 0.4);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #818cf8;

  /* Borders */
  --border-subtle: rgba(148, 163, 184, 0.1);
  --border-default: rgba(148, 163, 184, 0.2);
  --border-hover: rgba(129, 140, 248, 0.4);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
  --shadow-glow-accent: 0 0 20px rgba(16, 185, 129, 0.15);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-default: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 80%, rgba(244, 63, 94, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-300);
}

code, .font-mono {
  font-family: var(--font-mono);
}

/* ============================================
   Layout
   ============================================ */
.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px;
}

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

@media (min-width: 1024px) {
  .main-content {
    padding: 40px 32px;
  }
}

.content-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 300px;
    gap: 32px;
  }
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: none;
  list-style: none;
  gap: 4px;
}

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

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-links a.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-300);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Nav Overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  z-index: 99;
  padding: 24px 16px;
  animation: slideDown 0.3s ease;
}

.mobile-nav.open,
.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  margin-bottom: 4px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--bg-glass);
  color: var(--text-primary);
}

/* ============================================
   Cards & Glass Panels
   ============================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-default);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.glass-card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

/* ============================================
   Search Bars
   ============================================ */
.search-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  transition: all var(--transition-default);
}

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

.search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), var(--shadow-lg);
  background: var(--bg-secondary);
}

.search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
  font-size: 1.2rem;
}

.search-input:focus ~ .search-icon,
.search-input:focus + .search-icon {
  color: var(--primary-400);
}

.search-btn {
  position: absolute;
  right: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-btn:hover {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

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

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  animation: fadeSlideUp 0.2s ease;
}

.autocomplete-dropdown.visible {
  display: block;
}

.autocomplete-item {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-subtle);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: rgba(99, 102, 241, 0.1);
}

.autocomplete-item .code {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--primary-300);
  font-size: 0.9rem;
}

.autocomplete-item .label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================
   Result Tables
   ============================================ */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeSlideUp 0.3s ease;
}

.result-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.08));
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.result-header h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.result-body {
  padding: 0;
}

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

.result-table tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.result-table tr:last-child {
  border-bottom: none;
}

.result-table tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.result-table td {
  padding: 14px 24px;
  font-size: 0.925rem;
}

.result-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 40%;
  white-space: nowrap;
}

.result-table td:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.result-table .code-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--primary-300);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   Copy Button
   ============================================ */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  color: var(--primary-300);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-400);
}

.copy-btn .icon {
  font-size: 0.85rem;
}

/* ============================================
   Hub Cards (Homepage)
   ============================================ */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hub-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hub-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-default);
  overflow: hidden;
}

.hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hub-color-start), var(--hub-color-end));
  opacity: 0;
  transition: opacity var(--transition-default);
}

.hub-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.hub-card:hover::before {
  opacity: 1;
}

.hub-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: transform var(--transition-default);
}

.hub-card:hover .hub-card-icon {
  transform: scale(1.1);
}

.hub-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.hub-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Hub color variants */
.hub-financial {
  --hub-color-start: var(--primary-500);
  --hub-color-end: var(--primary-300);
}
.hub-financial .hub-card-icon {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-400);
}

.hub-postal {
  --hub-color-start: var(--accent-500);
  --hub-color-end: var(--accent-400);
}
.hub-postal .hub-card-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-400);
}

.hub-transport {
  --hub-color-start: var(--amber-500);
  --hub-color-end: var(--amber-400);
}
.hub-transport .hub-card-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-400);
}

.hub-telecom {
  --hub-color-start: var(--sky-500);
  --hub-color-end: var(--sky-400);
}
.hub-telecom .hub-card-icon {
  background: rgba(14, 165, 233, 0.12);
  color: var(--sky-400);
}

/* ============================================
   Ad Slots (CLS Protected)
   ============================================ */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  overflow: hidden;
}

.ad-slot-leaderboard {
  min-height: 90px;
  width: 100%;
  max-width: 728px;
  margin: 16px auto;
}

.ad-slot-sidebar {
  min-height: 250px;
  min-width: 250px;
  width: 100%;
}

.ad-slot-inline {
  min-height: 100px;
  width: 100%;
  margin: 16px 0;
}

.ad-slot-sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  z-index: 90;
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  display: none;
}

@media (max-width: 767px) {
  .ad-slot-sticky-footer.active {
    display: flex;
  }
  .app-wrapper {
    padding-bottom: 50px;
  }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 16px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  text-align: center;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.7;
  margin-top: 8px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Page Headers
   ============================================ */
.page-hero {
  text-align: center;
  padding: 48px 0 32px;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .page-hero h1 {
    font-size: 2.5rem;
  }
}

.page-hero .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Badges & Tags
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-300);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-400);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-400);
}

.badge-info {
  background: rgba(14, 165, 233, 0.15);
  color: var(--sky-400);
}

/* ============================================
   Skeleton Loaders
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(148, 163, 184, 0.08) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text:last-child {
  width: 60%;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: 0.875rem;
  color: var(--text-primary);
  animation: toastSlideIn 0.3s ease;
  max-width: 320px;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast.success .toast-icon {
  color: var(--accent-400);
}

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

/* ============================================
   Filter Chips
   ============================================ */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.filter-chip {
  padding: 8px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.filter-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--primary-300);
}

/* ============================================
   Quick Stats Bar
   ============================================ */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 20px 0;
}

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

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ============================================
   Policy Pages
   ============================================ */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 0;
}

.policy-content h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.policy-content .last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.policy-content h2 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.policy-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.policy-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.policy-content li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 4px;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--text-accent);
}

.breadcrumbs .separator {
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumbs .current {
  color: var(--text-secondary);
}

/* ============================================
   Empty / No Results State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

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

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   Browse / List Tables
   ============================================ */
.browse-table {
  width: 100%;
  border-collapse: collapse;
}

.browse-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  background: rgba(0, 0, 0, 0.2);
}

.browse-table td {
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.browse-table tr:hover td {
  background: rgba(99, 102, 241, 0.04);
  color: var(--text-primary);
}

.browse-table .link-cell {
  color: var(--primary-300);
  cursor: pointer;
  font-weight: 500;
}

.browse-table .link-cell:hover {
  text-decoration: underline;
}

/* ============================================
   Animations & Keyframes
   ============================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
  }
  50% {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.3);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--slate-700);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-600);
}

/* ============================================
   Utility Classes
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-400), var(--accent-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.animate-in {
  animation: fadeSlideUp 0.4s ease forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* Responsive table scroll */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
