:root {
  --color-bg-0: #060912;
  --color-bg-1: #0B1222;
  --color-bg-2: #111827;
  --color-bg-card: rgba(255, 255, 255, 0.06);
  --color-bg-card-hover: rgba(255, 255, 255, 0.09);
  --color-bg-elevated: rgba(255, 255, 255, 0.08);
  --color-bg-overlay: rgba(0, 0, 0, 0.75);

  --color-border: rgba(255, 255, 255, 0.12);
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.20);

  --color-text-primary: #EAF0FB;
  --color-text-secondary: rgba(234, 240, 251, 0.72);
  --color-text-muted: rgba(234, 240, 251, 0.52);
  --color-text-disabled: rgba(234, 240, 251, 0.32);

  --color-gold: #D8B25C;
  --color-gold-light: #F3D48B;
  --color-gold-bg: rgba(216, 178, 92, 0.12);
  --color-gold-border: rgba(216, 178, 92, 0.35);

  --color-emerald: #22C55E;
  --color-emerald-light: #4ADE80;
  --color-emerald-bg: rgba(34, 197, 94, 0.12);
  --color-emerald-border: rgba(34, 197, 94, 0.35);

  --color-amber: #F59E0B;
  --color-amber-light: #FBBF24;
  --color-amber-bg: rgba(245, 158, 11, 0.12);
  --color-amber-border: rgba(245, 158, 11, 0.35);

  --color-red: #EF4444;
  --color-red-light: #F87171;
  --color-red-bg: rgba(239, 68, 68, 0.12);
  --color-red-border: rgba(239, 68, 68, 0.35);

  --color-blue: #3B82F6;
  --color-blue-light: #60A5FA;
  --color-blue-bg: rgba(59, 130, 246, 0.12);
  --color-blue-border: rgba(59, 130, 246, 0.35);

  --color-purple: #A855F7;
  --color-purple-light: #C084FC;
  --color-purple-bg: rgba(168, 85, 247, 0.12);
  --color-purple-border: rgba(168, 85, 247, 0.35);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: ui-serif, Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;

  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 1.75rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --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.35), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  --shadow-glow-gold: 0 0 20px rgba(216, 178, 92, 0.15);
  --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);

  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 500;
  --z-tooltip: 600;
  --z-toast: 700;

  --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.5);
  --focus-ring-offset: 0 0 0 2px var(--color-bg-1), 0 0 0 4px rgba(59, 130, 246, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background: var(--body-gradient);
  background-attachment: fixed;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
}

@media (min-width: 768px) {
  .container {
    padding: var(--space-5) var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: var(--space-6) var(--space-8);
  }
}

.glass {
  background: var(--glass-gradient);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card {
  background: var(--glass-gradient);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-lg);
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out);
}

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

.card--interactive:hover {
  box-shadow: var(--shadow-xl);
  cursor: pointer;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.card__subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
}

.panel__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  min-height: 44px;
}

.btn:hover:not(:disabled) {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn--primary {
  background: linear-gradient(180deg, rgba(216, 178, 92, 0.25), rgba(216, 178, 92, 0.12));
  border-color: var(--color-gold-border);
  box-shadow: var(--shadow-glow-gold);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(216, 178, 92, 0.35), rgba(216, 178, 92, 0.18));
}

.btn--success {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.20), rgba(34, 197, 94, 0.10));
  border-color: var(--color-emerald-border);
}

.btn--danger {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
  border-color: var(--color-red-border);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
}

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

.btn--sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn--lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  min-height: 52px;
}

.btn--block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
}

.badge--gold {
  background: var(--color-gold-bg);
  border-color: var(--color-gold-border);
  color: var(--color-gold);
}

.badge--success {
  background: var(--color-emerald-bg);
  border-color: var(--color-emerald-border);
  color: var(--color-emerald);
}

.badge--warning {
  background: var(--color-amber-bg);
  border-color: var(--color-amber-border);
  color: var(--color-amber);
}

.badge--danger {
  background: var(--color-red-bg);
  border-color: var(--color-red-border);
  color: var(--color-red);
}

.badge--blue {
  background: var(--color-blue-bg);
  border-color: var(--color-blue-border);
  color: var(--color-blue);
}

.badge--purple {
  background: var(--color-purple-bg);
  border-color: var(--color-purple-border);
  color: var(--color-purple);
}

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out);
  min-height: 44px;
}

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

.input:hover:not(:disabled) {
  border-color: var(--color-border-strong);
}

.input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(216, 178, 92, 0.15);
}

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

.input--error {
  border-color: var(--color-red);
}

.input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

.label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.field {
  margin-bottom: var(--space-5);
}

.field__error {
  font-size: var(--text-xs);
  color: var(--color-red);
  margin-top: var(--space-2);
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--space-2);
}

.table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.table td {
  padding: var(--space-3) var(--space-3);
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.table tr td:first-child {
  border-left: 1px solid var(--color-border);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.table tr td:last-child {
  border-right: 1px solid var(--color-border);
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.table tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
}

.table tbody tr:hover td {
  background: var(--color-bg-card-hover);
}

.table--clickable tbody tr {
  cursor: pointer;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
}

.kpi {
  background: var(--panel-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
}

.kpi__label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
}

.kpi__value {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-top: var(--space-2);
  color: var(--color-text-primary);
}

.kpi__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.lane-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.lane-dot--red { background: var(--color-red); }
.lane-dot--yellow { background: var(--color-amber); }
.lane-dot--green { background: var(--color-emerald); }

.toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  max-width: 400px;
  padding: var(--space-4);
  background: var(--color-bg-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  z-index: var(--z-toast);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast__title {
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.toast__message {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal) var(--ease-out);
}

.modal-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  transform: scale(0.95);
  transition: transform var(--duration-normal) var(--ease-out);
}

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

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.modal__title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.modal__body {
  padding: var(--space-5);
}

.modal__footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  z-index: var(--z-tooltip);
  transition: opacity var(--duration-fast) var(--ease-out),
              visibility var(--duration-fast) var(--ease-out);
  pointer-events: none;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  opacity: 1;
  visibility: visible;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

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

.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

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

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }

.w-full { width: 100%; }

.hidden { display: none; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none; }
  .sm\:block { display: block; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:block { display: block; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:block { display: block; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[role="button"], button, a {
  touch-action: manipulation;
}

@media (hover: none) {
  [data-tooltip]::after {
    display: none;
  }
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  :root {
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.9);
    --color-text-muted: rgba(255, 255, 255, 0.7);
    --color-border: rgba(255, 255, 255, 0.4);
  }
}

.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg-1);
  border: 1px solid var(--color-gold-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  animation: toastSlide 0.25s ease-out;
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loading-skeleton {
  background: var(--skeleton-gradient, linear-gradient(90deg, var(--color-bg-card) 25%, var(--color-bg-card-hover) 50%, var(--color-bg-card) 75%));
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}

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

/* ========================================
   EMPTY STATES
   ======================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-10) var(--space-6);
  min-height: 300px;
}

.empty-state__icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-4);
  opacity: 0.6;
}

.empty-state__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-state__description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  max-width: 400px;
  margin-bottom: var(--space-5);
  line-height: var(--leading-relaxed);
}

.empty-state__action {
  margin-top: var(--space-2);
}

/* ========================================
   LOADING STATES
   ======================================== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner--sm {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
}

.loading-spinner--lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

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

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-overlay);
  border-radius: inherit;
  z-index: 10;
}

.loading-dots {
  display: flex;
  gap: var(--space-2);
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 50%;
  animation: dots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dots {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ========================================
   GLOBAL NAVIGATION HEADER
   ======================================== */
.global-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--topbar-bg, rgba(6, 9, 18, 0.95));
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .global-nav {
    padding: var(--space-3) var(--space-6);
  }
}

.global-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.global-nav__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.global-nav__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.global-nav__subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.global-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.global-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.global-nav__link:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-card);
}

.global-nav__link--active {
  color: var(--color-gold);
  background: var(--color-gold-bg);
}

.global-nav__link svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.global-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Hide text on mobile, show icons only */
@media (max-width: 767px) {
  .global-nav__link span {
    display: none;
  }
  .global-nav__link {
    padding: var(--space-2);
  }
  .global-nav__link svg {
    width: 20px;
    height: 20px;
    opacity: 1;
  }
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
  margin-bottom: var(--space-6);
}

.page-header__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.page-header__back:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-card-hover);
}

.page-header__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.page-header__description {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: var(--leading-relaxed);
}

/* ========================================
   STATUS INDICATORS
   ======================================== */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--success {
  background: var(--color-emerald);
  box-shadow: 0 0 8px var(--color-emerald);
}

.status-dot--warning {
  background: var(--color-amber);
  box-shadow: 0 0 8px var(--color-amber);
}

.status-dot--error {
  background: var(--color-red);
  box-shadow: 0 0 8px var(--color-red);
}

.status-dot--neutral {
  background: var(--color-text-muted);
}

.status-dot--pulse {
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* ========================================
   STAT CARDS (KPI Cards)
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

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

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: all var(--duration-fast) var(--ease-out);
}

.stat-card:hover {
  border-color: var(--color-border-strong);
}

.stat-card__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.stat-card__value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
}

.stat-card__change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-2);
}

.stat-card__change--positive {
  color: var(--color-emerald);
}

.stat-card__change--negative {
  color: var(--color-red);
}

/* ========================================
   PROGRESS STEPS (Wizard)
   ======================================== */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.progress-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.progress-step__dot {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--duration-normal) var(--ease-out);
}

.progress-step--active .progress-step__dot {
  background: var(--color-gold-bg);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.progress-step--completed .progress-step__dot {
  background: var(--color-emerald);
  border-color: var(--color-emerald);
  color: white;
}

.progress-step__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: none;
}

@media (min-width: 768px) {
  .progress-step__label {
    display: block;
  }
  .progress-step--active .progress-step__label {
    color: var(--color-text-primary);
    font-weight: 600;
  }
}

.progress-step__line {
  width: 40px;
  height: 2px;
  background: var(--color-border);
}

.progress-step--completed + .progress-step .progress-step__line,
.progress-step--completed .progress-step__line {
  background: var(--color-emerald);
}

/* ========================================
   ALERT BANNERS
   ======================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.alert__icon {
  flex-shrink: 0;
  font-size: var(--text-xl);
}

.alert__content {
  flex: 1;
}

.alert__title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.alert__message {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.alert--info {
  background: var(--color-blue-bg);
  border-color: var(--color-blue-border);
}

.alert--info .alert__title { color: var(--color-blue); }

.alert--success {
  background: var(--color-emerald-bg);
  border-color: var(--color-emerald-border);
}

.alert--success .alert__title { color: var(--color-emerald); }

.alert--warning {
  background: var(--color-amber-bg);
  border-color: var(--color-amber-border);
}

.alert--warning .alert__title { color: var(--color-amber); }

.alert--error {
  background: var(--color-red-bg);
  border-color: var(--color-red-border);
}

.alert--error .alert__title { color: var(--color-red); }

/* ========================================
   DIVIDERS
   ======================================== */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-5) 0;
}

.divider--subtle {
  background: var(--color-border-subtle);
}

/* ========================================
   ACCESSIBILITY SKIP LINK
   ======================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-gold);
  color: var(--color-bg-0);
  font-weight: 600;
  border-radius: var(--radius-md);
  z-index: 9999;
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Margin utilities */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

/* Padding utilities */
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }

/* Gap utilities */
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* Display utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }

/* Flex utilities */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-gold { color: var(--color-gold); }
.text-emerald { color: var(--color-emerald); }
.text-amber { color: var(--color-amber); }
.text-red { color: var(--color-red); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Size utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Border radius utilities */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Opacity utilities */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Pointer events */
.pointer-events-none { pointer-events: none; }

/* Truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================================================
   RESPONSIVE UTILITIES
   ============================================================================= */

/* Mobile-first responsive containers */
.container-responsive {
  width: 100%;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .container-responsive {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container-responsive {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Responsive grid */
.grid-responsive {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

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

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

/* Hide on mobile */
.hidden-mobile {
  display: none !important;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: block !important;
  }
}

/* Show only on mobile */
.show-mobile {
  display: block !important;
}

@media (min-width: 768px) {
  .show-mobile {
    display: none !important;
  }
}

/* Responsive text */
.text-responsive-sm {
  font-size: var(--text-xs);
}

@media (min-width: 768px) {
  .text-responsive-sm {
    font-size: var(--text-sm);
  }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-gold);
  color: var(--color-bg-0);
  padding: var(--space-2) var(--space-4);
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible styles */
*:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* NEW Badge System - Global styles for highlighting new features */
.new-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--color-emerald), #16a34a);
  color: white;
  border-radius: 4px;
  margin-left: 0.5rem;
  animation: newBadgePulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  vertical-align: middle;
}

.new-badge-glow {
  position: relative;
}

.new-badge-glow::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--color-emerald);
  border-radius: 50%;
  animation: newDotPulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--color-emerald);
}

@keyframes newBadgePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 16px rgba(34, 197, 94, 0.7); }
}

@keyframes newDotPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 8px var(--color-emerald);
  }
  50% { 
    transform: scale(1.2);
    box-shadow: 0 0 16px var(--color-emerald);
  }
}

/* Compact version for navigation */
.new-badge-sm {
  padding: 0.1rem 0.35rem;
  font-size: 0.55rem;
  margin-left: 0.35rem;
}

/* High contrast mode support */
@media (forced-colors: active) {
  .btn,
  .card,
  .badge {
    border: 1px solid currentColor;
  }
}
