/* ============================================
   RESIAPP DESIGN SYSTEM - v6.0
   Liquid Glass UI — Dark Royal Blue · Blue · Silver
   ============================================ */

/* This file contains the complete design system used across ResiApp
   Import this file first, then page-specific styles */

/* ============================================
   DISPLAY TYPEFACE — Sora (self-hosted, latin subset)
   Used via --font-display on hero/display selectors
   ============================================ */

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Sora-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/Sora-ExtraBold.woff2') format('woff2');
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #0a0a0f;
  color: #ffffff;
  position: relative;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background orbs are now provided by app_layout.css via .bg-orbs div elements.
   The body pseudo-element orbs have been removed to avoid conflicts. */

/* ============================================
   COLOR SYSTEM
   ============================================ */

:root {
  /* Primary Accent — Blue */
  --da-gold: #3b82f6;
  --da-gold-light: #60a5fa;
  --da-gold-dark: #2563eb;
  --da-gold-rgb: 59, 130, 246;
  --da-silver: #5C6168;
  --da-silver-light: #7A7F85;
  --da-silver-dark: #3E4247;
  --da-silver-rgb: 92, 97, 104;
  --da-royal: #0F2A52;
  --da-royal-light: #1A3D6E;
  --da-royal-rgb: 15, 42, 82;

  /* Typography Fonts */
  --font-heading: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Sora', var(--font-heading);
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;

  /* Typography Scale — canonical font sizes
     All component CSS should reference these tokens.
     Map: 2xs→tiny counters, xs→labels/badges, sm→captions/hints,
          base→form labels/small buttons, md→tabs/table cells,
          lg→buttons/inputs/subtitles, xl→body text,
          2xl→section titles, 3xl→heading-4, 4xl→heading-3,
          5xl→heading-2, 6xl→heading-1, 7xl/8xl→display */
  --fs-2xs:  0.7rem;     /* 11.2px */
  --fs-xs:   0.75rem;    /* 12px */
  --fs-sm:   0.8rem;     /* 12.8px */
  --fs-base: 0.875rem;   /* 14px */
  --fs-md:   0.9rem;     /* 14.4px */
  --fs-lg:   0.95rem;    /* 15.2px */
  --fs-xl:   1rem;       /* 16px */
  --fs-2xl:  1.125rem;   /* 18px */
  --fs-3xl:  1.25rem;    /* 20px */
  --fs-4xl:  1.5rem;     /* 24px */
  --fs-5xl:  1.75rem;    /* 28px */
  --fs-6xl:  2rem;       /* 32px */
  --fs-7xl:  2.5rem;     /* 40px */
  --fs-8xl:  3rem;       /* 48px */

  /* Font Weight Scale */
  --fw-normal:    400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;
  --fw-black:     900;

  /* Primary Colors */
  --color-primary: var(--da-gold);
  --color-primary-light: var(--da-gold-light);
  --color-primary-dark: var(--da-gold-dark);

  /* Secondary Colors */
  --color-secondary: var(--da-silver);
  --color-secondary-light: var(--da-silver-light);
  --color-secondary-dark: var(--da-silver-dark);

  /* Accent Colors */
  --color-accent: var(--da-gold);
  --color-accent-light: var(--da-gold-light);
  --color-accent-dark: var(--da-gold-dark);

  /* Status Colors */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Neutral Colors */
  --color-white: #ffffff;
  --color-black: #0a0a0f;
  --color-gray-50: rgba(255, 255, 255, 0.95);
  --color-gray-100: rgba(255, 255, 255, 0.9);
  --color-gray-200: rgba(255, 255, 255, 0.8);
  --color-gray-300: rgba(255, 255, 255, 0.7);
  --color-gray-400: rgba(255, 255, 255, 0.6);
  --color-gray-500: rgba(255, 255, 255, 0.5);
  --color-gray-600: rgba(255, 255, 255, 0.4);
  --color-gray-700: rgba(255, 255, 255, 0.3);
  --color-gray-800: rgba(255, 255, 255, 0.2);
  --color-gray-900: rgba(255, 255, 255, 0.1);

  /* Contrast floor for tertiary text — ≈5.9:1 on #08080d (WCAG AA) */
  --color-text-faint: rgba(255, 255, 255, 0.55);

  /* Glass material */
  --glass-blur: 24px;
  --glass-saturate: 160%;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--da-royal) 0%, var(--da-silver) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--da-silver) 0%, var(--da-royal) 100%);
  --gradient-accent: linear-gradient(135deg, var(--da-gold) 0%, var(--da-gold-light) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  --gradient-text: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
  --gradient-btn: linear-gradient(135deg, #3b82f6 0%, #94a3b8 100%);
  --gradient-btn-hover: linear-gradient(135deg, #2563eb 0%, #7A7F85 100%);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(var(--da-gold-rgb), 0.3);
}

/* ============================================
   GLASS CARD COMPONENT
   ============================================ */

.glass-card {
  background: var(--gradient-glass);
  border: 1.5px solid var(--color-gray-900);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.glass-card::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.1), rgba(var(--da-royal-rgb), 0.08));
  border-radius: 40% 60% 70% 30% / 60% 40% 60% 30%;
  bottom: -80px;
  right: -80px;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(var(--da-gold-rgb), 0.25), 0 0 0 1px rgba(var(--da-gold-rgb), 0.2);
  border-color: var(--color-gray-700);
}

.glass-card:hover::after {
  transform: scale(1.3) rotate(45deg);
}

/* ============================================
   BUTTON SYSTEM
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(var(--da-gold-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(var(--da-gold-rgb), 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.9) 0%, rgba(var(--da-royal-rgb), 0.9) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--da-gold-rgb), 0.45), 0 0 40px rgba(var(--da-silver-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  background: var(--gradient-glass);
  color: var(--color-gray-50);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-gray-900);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
  border-color: var(--color-gray-700);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--color-gray-300);
  border: 1.5px solid var(--color-gray-800);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-gray-600);
  color: var(--color-gray-50);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--fs-base);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--fs-xl);
}

.btn:active {
  transform: translateY(-1px);
}

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

/* BEM Convention Aliases (Canonical) */
.btn--primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(var(--da-gold-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(var(--da-gold-rgb), 0.4);
}

.btn--primary:hover {
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.9) 0%, rgba(var(--da-royal-rgb), 0.9) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--da-gold-rgb), 0.45), 0 0 40px rgba(var(--da-silver-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn--secondary {
  background: var(--gradient-glass);
  color: var(--color-gray-50);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-gray-900);
}

.btn--secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
  border-color: var(--color-gray-700);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--color-gray-300);
  border: 1.5px solid var(--color-gray-800);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-gray-600);
  color: var(--color-gray-50);
}

.btn--outline {
  background: transparent;
  color: var(--color-gray-300);
  border: 1.5px solid var(--color-gray-800);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-gray-600);
  color: var(--color-gray-50);
}

.btn--small {
  padding: 0.625rem 1.25rem;
  font-size: var(--fs-base);
}

/* Blue-to-Silver gradient button — standard for action buttons */
.btn-gradient {
  background: var(--gradient-btn);
  color: var(--color-white);
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-gradient:hover {
  background: var(--gradient-btn-hover);
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* BEM alias */
.btn--gradient {
  background: var(--gradient-btn);
  color: var(--color-white);
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn--gradient:hover {
  background: var(--gradient-btn-hover);
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ============================================
   INPUT SYSTEM
   ============================================ */

.input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--gradient-glass);
  border: 1.5px solid var(--color-gray-900);
  border-radius: var(--radius-md);
  color: var(--color-gray-50);
  font-family: inherit;
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.input::placeholder {
  color: var(--color-gray-500);
}

.input:focus {
  outline: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(var(--da-gold-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--da-gold-rgb), 0.15), 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

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

.input-error:focus {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15), 0 8px 20px rgba(0, 0, 0, 0.2);
}

textarea.input {
  resize: vertical;
  min-height: 120px;
}

select.input {
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

/* ============================================
   BADGE SYSTEM
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1.5px solid;
  white-space: nowrap;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.badge-primary {
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.2) 0%, rgba(var(--da-royal-rgb), 0.15) 100%);
  border-color: rgba(var(--da-gold-rgb), 0.5);
  color: var(--da-gold-light);
}

.badge-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%);
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

.badge-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.15) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.badge-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.15) 100%);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.badge-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6,
.heading-1,
.heading-2,
.heading-3,
.heading-4 {
  font-family: var(--font-heading);
}

.heading-1 {
  font-family: var(--font-display);
  font-size: var(--fs-6xl);
  font-weight: var(--fw-extrabold);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.heading-2 {
  font-family: var(--font-display);
  font-size: var(--fs-5xl);
  font-weight: var(--fw-extrabold);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.heading-3 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  color: var(--color-gray-50);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.heading-4 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-gray-50);
  letter-spacing: -0.2px;
  line-height: 1.4;
}

.text-body {
  font-size: var(--fs-xl);
  color: var(--color-gray-300);
  line-height: 1.6;
}

.text-small {
  font-size: var(--fs-base);
  color: var(--color-gray-400);
  line-height: 1.5;
}

.text-gradient {
  background: linear-gradient(135deg, var(--da-gold) 0%, var(--da-gold-light) 50%, var(--da-royal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Font Size Utility Classes */
.text-2xs { font-size: var(--fs-2xs); }  /* 0.7rem — tiny counters/badges */
.text-xs  { font-size: var(--fs-xs); }   /* 0.75rem — labels, table headers */
.text-sm  { font-size: var(--fs-sm); }   /* 0.8rem — captions, hints */
.text-md  { font-size: var(--fs-md); }   /* 0.9rem — tabs, table cells */
.text-lg  { font-size: var(--fs-lg); }   /* 0.95rem — buttons, subtitles */
.text-xl  { font-size: var(--fs-xl); }   /* 1rem — body text */
.text-2xl { font-size: var(--fs-2xl); }  /* 1.125rem — section titles */
.text-3xl { font-size: var(--fs-3xl); }  /* 1.25rem — heading 4 */
.text-4xl { font-size: var(--fs-4xl); }  /* 1.5rem — heading 3 */
.text-5xl { font-size: var(--fs-5xl); }  /* 1.75rem — heading 2 */
.text-6xl { font-size: var(--fs-6xl); }  /* 2rem — heading 1 */

/* Font Weight Utility Classes */
.font-normal    { font-weight: var(--fw-normal); }    /* 400 */
.font-medium    { font-weight: var(--fw-medium); }    /* 500 */
.font-semibold  { font-weight: var(--fw-semibold); }  /* 600 */
.font-bold      { font-weight: var(--fw-bold); }      /* 700 */
.font-extrabold { font-weight: var(--fw-extrabold); } /* 800 */
.font-black     { font-weight: var(--fw-black); }     /* 900 */

/* Font Family Utility Classes */
.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  position: relative;
  z-index: 1;
  padding: var(--spacing-3xl) 0;
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

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

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

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.flex {
  display: flex;
}

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

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

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.gap-xl {
  gap: var(--spacing-xl);
}

/* ============================================
   ANIMATIONS — Keyframes & Classes
   ============================================ */

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

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

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

@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 scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease both;
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-up {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-scale-in {
  animation: scaleIn 0.2s ease both;
}

/* Staggered animation delays for lists */
.animate-stagger > *:nth-child(1) { animation-delay: 0ms; }
.animate-stagger > *:nth-child(2) { animation-delay: 50ms; }
.animate-stagger > *:nth-child(3) { animation-delay: 100ms; }
.animate-stagger > *:nth-child(4) { animation-delay: 150ms; }
.animate-stagger > *:nth-child(5) { animation-delay: 200ms; }
.animate-stagger > *:nth-child(6) { animation-delay: 250ms; }
.animate-stagger > *:nth-child(7) { animation-delay: 300ms; }
.animate-stagger > *:nth-child(8) { animation-delay: 350ms; }

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.6), rgba(var(--da-royal-rgb), 0.6));
  border-radius: 10px;
  transition: all var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.8), rgba(var(--da-royal-rgb), 0.8));
}

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

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  /* Re-allow essential loading indicators (state feedback, not decoration) */
  .spinner,
  .btn--loading::after,
  .btn-spinner,
  .upload-spinner {
    animation-duration: 0.6s !important;
    animation-iteration-count: infinite !important;
  }
}

.btn:focus,
.input:focus {
  outline: 2px solid rgba(var(--da-gold-rgb), 0.8);
  outline-offset: 4px;
}

@media (prefers-contrast: high) {
  .glass-card {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }

  .badge {
    border-width: 2px;
  }
}

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

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

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

@media (max-width: 768px) {
  .heading-1 {
    font-size: var(--fs-5xl);
  }

  .heading-2 {
    font-size: var(--fs-4xl);
  }

  .heading-3 {
    font-size: var(--fs-3xl);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }
}

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

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

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

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

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.z-0 {
  z-index: 0;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

.opacity-0 {
  opacity: 0;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-100 {
  opacity: 1;
}

.pointer-events-none {
  pointer-events: none;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-2xl {
  border-radius: var(--radius-2xl);
}

.rounded-full {
  border-radius: var(--radius-full);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

/* ============================================
   PAGE HEADER COMPONENT
   Unified header for all dashboard pages
   ============================================ */

.page-header-bar {
  position: relative;
  z-index: 10;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 2rem;
}

.page-header-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-5xl);
  font-weight: var(--fw-extrabold);
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.5px;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--da-royal), var(--da-silver));
  border-radius: 2px;
}

.page-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.6);
  margin: 0.5rem 0 0 0;
  font-weight: var(--fw-medium);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Dashboard Header - Glassmorphic card variant */
.dashboard-header {
  position: relative;
  z-index: 10;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 2.5rem;
}

.dashboard-header .header-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header .header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dashboard-header .header-title,
.header-title {
  font-family: var(--font-display);
  font-size: var(--fs-6xl);
  font-weight: var(--fw-extrabold);
  background: linear-gradient(135deg, var(--da-gold) 0%, var(--da-gold-light) 50%, var(--da-royal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  position: relative;
  display: inline-block;
}

.dashboard-header .header-title::after,
.header-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--da-royal), var(--da-silver));
  border-radius: 2px;
}

.dashboard-header .header-subtitle,
.header-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.6);
  margin: 0.5rem 0 0 0;
  font-weight: var(--fw-medium);
}

.dashboard-header .header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Header Button */
.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.1), rgba(var(--da-royal-rgb), 0.1));
  border: 1.5px solid rgba(var(--da-gold-rgb), 0.3);
  border-radius: 14px;
  color: #ffffff;
  text-decoration: none;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(var(--da-gold-rgb), 0.1);
}

.header-btn:hover {
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.2), rgba(var(--da-royal-rgb), 0.2));
  border-color: rgba(var(--da-gold-rgb), 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--da-gold-rgb), 0.25);
}

/* Dashboard Button - for use in cards/sections */
.dashboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(var(--da-gold-rgb), 0.3);
}

/* ============================================
   PAGE CONTENT AREA
   ============================================ */

.page-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.page-content-narrow {
  max-width: 1050px;
}

/* ============================================
   STAT CARDS (Summary Cards)
   ============================================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  transform: translateY(-2px);
  border-color: rgba(var(--da-gold-rgb), 0.2);
}

.stat-card--purple {
  border-left: 3px solid var(--da-gold);
}

.stat-card--pink {
  border-left: 3px solid var(--da-silver);
}

.stat-card--green {
  border-left: 3px solid #22c55e;
}

.stat-card--red {
  border-left: 3px solid #ef4444;
}

.stat-card--yellow {
  border-left: 3px solid #f59e0b;
}

.stat-card--blue {
  border-left: 3px solid #3b82f6;
}

.stat-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.5px;
}

.stat-value--positive {
  color: #4ade80;
}

.stat-value--negative {
  color: #f87171;
}

/* ============================================
   TABS COMPONENT
   ============================================ */

.tabs {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.375rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.tab--active,
.tab.active {
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.2), rgba(var(--da-royal-rgb), 0.15));
  border-color: rgba(var(--da-gold-rgb), 0.35);
  color: rgba(255, 255, 255, 0.95);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.375rem;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  background: rgba(var(--da-gold-rgb), 0.3);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   CARD LIST COMPONENT
   ============================================ */

.card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(var(--da-gold-rgb), 0.3);
  transform: translateY(-2px);
}

.list-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.list-card-title,
.card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.list-card-meta {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.25rem;
}

.list-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.list-card-stat {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.list-card-stat-label {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
}

.list-card-stat-value {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.9);
}

.list-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.75rem;
}

/* ============================================
   EMPTY STATE COMPONENT
   ============================================ */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1.5px dashed rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.empty-state::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.1), rgba(var(--da-royal-rgb), 0.08));
  border-radius: 40% 60% 70% 30% / 60% 40% 60% 30%;
  bottom: -80px;
  right: -80px;
  filter: blur(40px);
  pointer-events: none;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.empty-state-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.5rem 0;
}

.empty-state-text {
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   MODAL COMPONENT
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

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

.modal {
  background: linear-gradient(135deg, rgba(13, 16, 24, 0.97) 0%, rgba(10, 12, 18, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(var(--da-gold-rgb), 0.2);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal,
.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
}

.modal--large {
  max-width: 700px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   FORM COMPONENTS (Unified)
   ============================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-hint {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.375rem;
}

.form-error {
  font-size: var(--fs-sm);
  color: #f87171;
  margin-top: 0.375rem;
}

/* ============================================
   FLASH/ALERT MESSAGES (Unified)
   ============================================ */

.flash,
.alert {
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: rgba(255, 255, 255, 0.9);
  font-weight: var(--fw-medium);
  margin-bottom: 1rem;
}

.flash-success,
.alert-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.flash-error,
.flash-danger,
.alert-error,
.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.flash-warning,
.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.flash-info,
.alert-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #60a5fa;
}

/* ============================================
   SECTION COMPONENT
   ============================================ */

.section-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   REAL GLASS MATERIAL — shared card treatment
   Backdrop blur + top specular edge for the card family.
   Placed after all four base definitions so border-top-color
   survives the border shorthands above.
   ============================================ */

.glass-card,
.section-card,
.stat-card,
.list-card {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-top-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-md);
}

/* High-contrast users keep the stronger edge (this rule must follow
   the glass treatment above to win in source order) */
@media (prefers-contrast: high) {
  .glass-card,
  .section-card,
  .stat-card,
  .list-card {
    border-top-color: rgba(255, 255, 255, 0.35);
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.section-actions {
  display: flex;
  gap: 0.75rem;
}

/* ============================================
   TABLE COMPONENT
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.table th,
.table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table th {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.03);
}

.table td {
  font-size: var(--fs-md);
  color: rgba(255, 255, 255, 0.85);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--da-royal), var(--da-silver));
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar--success {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.progress-bar--warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-bar--error {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS FOR PAGE COMPONENTS
   ============================================ */

@media (max-width: 768px) {
  .page-header-bar {
    padding: 1rem;
  }

  .page-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    font-size: var(--fs-4xl);
  }

  .page-content {
    padding: 1rem;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }

  .list-card-body {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   SKELETON LOADER — Content Placeholders
   Shimmer effect while data loads
   ============================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.04) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  pointer-events: none;
  user-select: none;
}

.skeleton-text {
  height: 1em;
  width: 100%;
  margin-bottom: 0.5rem;
}

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

.skeleton-heading {
  height: 1.5em;
  width: 40%;
  margin-bottom: 1rem;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-lg);
}

.skeleton-stat {
  height: 80px;
  border-radius: var(--radius-lg);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

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

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

.spinner--xl {
  width: 48px;
  height: 48px;
  border-width: 3px;
}

/* Full-page loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 9999;
}

.loading-text {
  font-size: var(--fs-lg);
  color: var(--color-gray-400);
  font-weight: var(--fw-medium);
}

/* Button loading state */
.btn--loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn--loading .btn-text {
  visibility: hidden;
}

.btn--loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

/* ============================================
   TOAST NOTIFICATIONS
   Slide-in notifications from top-right
   ============================================ */

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(20, 22, 30, 0.97) 0%, rgba(15, 17, 25, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  color: var(--color-gray-50);
  font-size: var(--fs-md);
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.toast--exiting {
  animation: slideOutRight 0.2s ease both;
}

.toast--success {
  border-left: 3px solid var(--color-success);
}

.toast--error {
  border-left: 3px solid var(--color-error);
}

.toast--warning {
  border-left: 3px solid var(--color-warning);
}

.toast--info {
  border-left: 3px solid var(--color-info);
}

.toast-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: var(--fw-semibold);
  margin-bottom: 0.125rem;
}

.toast-message {
  color: var(--color-gray-400);
  font-size: var(--fs-sm);
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-gray-600);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.toast-close:hover {
  color: var(--color-gray-200);
}

@media (max-width: 480px) {
  .toast-container {
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
  }
}

/* ============================================
   BREADCRUMB COMPONENT
   ============================================ */

.breadcrumbs {
  padding: 1rem 2rem 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: var(--fs-md);
  font-family: var(--font-heading);
}

.breadcrumbs a {
  color: var(--color-gray-500);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--color-gray-200);
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 0.25rem;
  color: var(--color-gray-700);
  user-select: none;
}

.breadcrumb-current {
  color: var(--color-gray-100);
  font-weight: var(--fw-medium);
}

@media (max-width: 768px) {
  .breadcrumbs {
    padding: 0.75rem 1rem 0.25rem;
    font-size: var(--fs-sm);
  }
}

/* ============================================
   TOOLTIP COMPONENT
   ============================================ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  padding: 0.5rem 0.75rem;
  background: rgba(20, 22, 30, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-gray-100);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}

[data-tooltip]:hover::before,
[data-tooltip]:focus::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ============================================
   DROPDOWN COMPONENT
   ============================================ */

.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: linear-gradient(135deg, rgba(20, 22, 30, 0.97) 0%, rgba(15, 17, 25, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  padding: 0.375rem;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transition: all 0.15s ease;
}

.dropdown-menu.open,
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--color-gray-300);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-gray-50);
}

.dropdown-item--danger {
  color: var(--color-error);
}

.dropdown-item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
  height: 1px;
  margin: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
}

/* ============================================
   AVATAR COMPONENT
   ============================================ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(var(--da-royal-rgb), 0.3), rgba(var(--da-royal-rgb), 0.2));
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: var(--color-gray-200);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar--sm {
  width: 28px;
  height: 28px;
  font-size: var(--fs-2xs);
}

.avatar--md {
  width: 36px;
  height: 36px;
  font-size: var(--fs-sm);
}

.avatar--lg {
  width: 48px;
  height: 48px;
  font-size: var(--fs-lg);
}

.avatar--xl {
  width: 64px;
  height: 64px;
  font-size: var(--fs-2xl);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   CHIP / TAG COMPONENT
   ============================================ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-gray-300);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-gray-500);
  border: none;
  cursor: pointer;
  font-size: 0.625rem;
  line-height: 1;
  transition: all 0.15s ease;
}

.chip-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-error);
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: var(--spacing-md) 0;
  border: none;
}

.divider--thick {
  height: 2px;
}

.divider--spaced {
  margin: var(--spacing-xl) 0;
}

/* ============================================
   ADDITIONAL DISPLAY & LAYOUT UTILITIES
   ============================================ */

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.contents { display: contents; }

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

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

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Gap utilities */
.gap-xs { gap: var(--spacing-xs); }
.gap-2xl { gap: var(--spacing-2xl); }

/* Spacing utilities */
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.ml-sm { margin-left: var(--spacing-sm); }
.ml-md { margin-left: var(--spacing-md); }
.ml-lg { margin-left: var(--spacing-lg); }
.mr-sm { margin-right: var(--spacing-sm); }
.mr-md { margin-right: var(--spacing-md); }
.mr-lg { margin-right: var(--spacing-lg); }

.p-0 { padding: 0; }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

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

.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;
}

.whitespace-nowrap { white-space: nowrap; }
.break-words { word-wrap: break-word; overflow-wrap: break-word; }

/* Color utilities */
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-info { color: var(--color-info); }
.text-muted { color: var(--color-gray-500); }
.text-white { color: var(--color-white); }

/* Monospace for financial data */
.font-tabular {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

/* ============================================
   ACCESSIBILITY — Enhanced
   ============================================ */

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

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10001;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus-visible for keyboard users only */
.btn:focus-visible,
.input:focus-visible,
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(var(--da-gold-rgb), 0.8);
  outline-offset: 2px;
}

/* Remove outline for mouse clicks */
.btn:focus:not(:focus-visible),
.input:focus:not(:focus-visible),
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Also cover selects and textareas */
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(var(--da-gold-rgb), 0.8);
  outline-offset: 2px;
}

select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

/* Visually hidden — accessible to screen readers 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;
}

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

  .badge {
    border: 1px solid ButtonText;
  }
}

/* Required field indicator */
.form-label[data-required]::after {
  content: ' *';
  color: var(--color-error);
}

/* ============================================
   SEMANTIC COLOR ALIASES
   Maps legacy names to semantic meanings.
   Use these in new code going forward.
   ============================================ */

:root {
  /* Brand — the primary blue used throughout */
  --color-brand: var(--da-gold);
  --color-brand-light: var(--da-gold-light);
  --color-brand-dark: var(--da-gold-dark);
  --color-brand-rgb: var(--da-gold-rgb);

  /* Surface colors — for backgrounds */
  --color-surface-0: #0a0a0f;
  --color-surface-1: rgba(255, 255, 255, 0.03);
  --color-surface-2: rgba(255, 255, 255, 0.05);
  --color-surface-3: rgba(255, 255, 255, 0.08);
  --color-surface-hover: rgba(255, 255, 255, 0.1);

  /* Border colors */
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-default: rgba(255, 255, 255, 0.1);
  --color-border-strong: rgba(255, 255, 255, 0.2);
  --color-border-brand: rgba(var(--da-gold-rgb), 0.3);

  /* Text colors with WCAG-safe contrast */
  --color-text-primary: rgba(255, 255, 255, 0.95);
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-tertiary: rgba(255, 255, 255, 0.5);
  --color-text-disabled: rgba(255, 255, 255, 0.3);

  /* Status — semantic aliases with RGB values for composability */
  --color-success-rgb: 34, 197, 94;
  --color-warning-rgb: 245, 158, 11;
  --color-error-rgb: 239, 68, 68;
  --color-info-rgb: 59, 130, 246;
}

/* ============================================
   RESPONSIVE VISIBILITY HELPERS
   ============================================ */

@media (max-width: 768px) {
  .hide-mobile { display: none; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none; }
}

@media (max-width: 1024px) {
  .hide-tablet { display: none; }
}

/* ============================================
   ADMIN TABLE COMPONENT
   Glass-styled tables for admin pages
   ============================================ */

.admin-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-default);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-md);
}

.admin-table th,
.admin-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-subtle);
}

.admin-table th {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-surface-1);
  white-space: nowrap;
}

.admin-table td {
  color: var(--color-text-primary);
}

.admin-table tbody tr {
  transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.admin-table td.text-center,
.admin-table th.text-center {
  text-align: center;
}

.admin-table td.text-right,
.admin-table th.text-right {
  text-align: right;
}

.admin-table td.text-muted {
  color: var(--color-text-tertiary);
}

.admin-table td.font-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.admin-table td.truncate-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   STAT BOX COMPONENT
   Summary metric boxes for dashboards
   ============================================ */

.stat-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--color-surface-2) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-box:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  transform: translateY(-2px);
  border-color: rgba(var(--da-gold-rgb), 0.2);
}

.stat-box--blue    { border-left: 3px solid #3b82f6; }
.stat-box--green   { border-left: 3px solid #22c55e; }
.stat-box--red     { border-left: 3px solid #ef4444; }
.stat-box--yellow  { border-left: 3px solid #f59e0b; }
.stat-box--purple  { border-left: 3px solid #a855f7; }
.stat-box--pink    { border-left: 3px solid var(--da-silver); }

.stat-box__icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  flex-shrink: 0;
}

.stat-box__content {
  flex: 1;
  min-width: 0;
}

.stat-box__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-box__value {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.stat-box__value--positive { color: #4ade80; }
.stat-box__value--negative { color: #f87171; }
.stat-box__value--mono {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   FILTER BAR COMPONENT
   Search/filter sections for admin pages
   ============================================ */

.filter-bar {
  background: var(--color-surface-1);
  border: 1px solid var(--color-border-default);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}

@media (max-width: 768px) {
  .filter-row {
    grid-template-columns: 1fr;
  }

  .stat-box-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   ADMIN PAGE SECTION
   Wrapper for admin content blocks
   ============================================ */

.admin-section {
  background: linear-gradient(135deg, var(--color-surface-2) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-section__title {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.admin-section__subtitle {
  font-size: var(--fs-md);
  color: var(--color-text-tertiary);
  margin: 0.25rem 0 0 0;
}

/* ============================================
   PAGINATION COMPONENT
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-subtle);
}

.pagination__info {
  color: var(--color-text-tertiary);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
}

/* ============================================
   ADMIN EMPTY STATE
   ============================================ */

.admin-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--color-text-tertiary);
}

.admin-empty__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.admin-empty__title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.admin-empty__text {
  font-size: var(--fs-lg);
  color: var(--color-text-tertiary);
}

/* ============================================
   ERROR PAGE COMPONENT
   Shared styles for standalone error pages
   ============================================ */

.error-page-body {
  font-family: var(--font-body);
  background: #08080d;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.error-page-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.error-page-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-page-code {
  font-size: 3rem;
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.error-page-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
}

.error-page-message {
  font-size: var(--fs-lg);
  color: var(--color-text-tertiary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.error-page-notice {
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-page-notice--info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.error-page-notice--info p {
  font-size: var(--fs-md);
  color: rgba(96, 165, 250, 0.9);
  margin: 0;
}

.error-page-notice--warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  text-align: left;
}

.error-page-notice--warning p {
  font-size: var(--fs-md);
  color: rgba(245, 158, 11, 0.9);
  margin: 0 0 0.5rem 0;
  font-weight: var(--fw-semibold);
}

.error-page-notice--warning ul {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(245, 158, 11, 0.75);
  font-size: var(--fs-sm);
}

.error-page-notice--warning li {
  margin-bottom: 0.25rem;
}

.error-page-notice--danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.error-page-notice--danger p {
  font-size: var(--fs-md);
  color: rgba(239, 68, 68, 0.9);
  margin: 0;
}

.error-page-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.error-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: var(--fw-semibold);
  text-decoration: none;
  font-size: var(--fs-lg);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.error-page-btn--primary {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #fff;
}

.error-page-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.error-page-btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.error-page-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.error-page-footer {
  margin-top: 1.5rem;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.35);
}

/* ============================================
   MILESTONE / CELEBRATION KIT
   Badge: <span class="milestone__badge"><svg viewBox="0 0 24 24">
            <path d="M20 6 9 17l-5-5"/></svg></span>
   ============================================ */

@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes celebratePop {
  0% { transform: scale(0.5); opacity: 0; }
  65% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes burstRing {
  from { transform: scale(0.4); opacity: 0.8; }
  to { transform: scale(1.6); opacity: 0; }
}

.milestone {
  text-align: center;
}

.milestone__badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 32px rgba(34, 197, 94, 0.25);
  animation: celebratePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.milestone__badge::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.45);
  animation: burstRing 0.7s ease-out 0.15s both;
  pointer-events: none;
}

.milestone__badge svg {
  width: 36px;
  height: 36px;
  stroke: var(--color-success);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.milestone__badge svg path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkDraw 0.45s ease-out 0.25s both;
}

/* ============================================
   JOURNEY PROGRESS — unified onboarding stepper
   Markup via macro: app/templates/partials/_journey.html
   <ol class="journey"><li class="journey__step" data-state="done|active|todo">
     <span class="journey__dot">1 | check-svg</span>
     <span class="journey__label">Conta</span></li>...</ol>
   ============================================ */

.journey {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.journey__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 64px;
  max-width: 140px;
}

/* 2px connector between consecutive dots */
.journey__step + .journey__step::before {
  content: '';
  position: absolute;
  top: 13px;
  left: calc(-50% + 20px);
  right: calc(50% + 20px);
  height: 2px;
  border-radius: 1px;
  background: var(--color-gray-800);
}

.journey__dot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--color-gray-800);
  color: var(--color-gray-500);
  transition: all var(--transition-base);
}

.journey__dot svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-success);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journey__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-gray-500);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Done — success ring + drawn check */
.journey__step[data-state="done"] .journey__dot {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.12);
}

.journey__step[data-state="done"] .journey__dot svg path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkDraw 0.4s ease-out 0.15s both;
}

.journey__step[data-state="done"] .journey__label {
  color: var(--color-gray-300);
}

.journey__step[data-state="done"] + .journey__step::before {
  background: rgba(34, 197, 94, 0.45);
}

/* Active — blue ring glow */
.journey__step[data-state="active"] .journey__dot {
  border-color: var(--da-gold);
  background: rgba(var(--da-gold-rgb), 0.12);
  color: var(--color-white);
  box-shadow: 0 0 0 4px rgba(var(--da-gold-rgb), 0.15);
}

.journey__step[data-state="active"] .journey__label {
  color: var(--color-gray-100);
}

/* Compact variant — tight headers */
.journey--sm .journey__dot {
  width: 22px;
  height: 22px;
  border-width: 1.5px;
  font-size: var(--fs-2xs);
}

.journey--sm .journey__dot svg {
  width: 11px;
  height: 11px;
}

.journey--sm .journey__step + .journey__step::before {
  top: 10px;
  left: calc(-50% + 16px);
  right: calc(50% + 16px);
}

.journey--sm .journey__label {
  font-size: var(--fs-2xs);
}

/* ============================================
   PAGE ENTRANCE ANIMATION
   Subtle fade-in-up on page load for polish
   ============================================ */

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

.liquid-glass-shell {
  animation: pageEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-header-bar {
  animation: pageEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

/* Flash messages slide down */
@keyframes flashSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash-stack .flash {
  animation: flashSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.flash-stack .flash:nth-child(2) {
  animation-delay: 0.05s;
}

.flash-stack .flash:nth-child(3) {
  animation-delay: 0.1s;
}

/* Stagger cards within glass-card containers */
.liquid-glass-shell > .glass-card {
  animation: pageEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.liquid-glass-shell > .glass-card:nth-child(2) {
  animation-delay: 0.08s;
}

.liquid-glass-shell > .glass-card:nth-child(3) {
  animation-delay: 0.16s;
}

.liquid-glass-shell > .glass-card:nth-child(4) {
  animation-delay: 0.24s;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .liquid-glass-shell,
  .page-header-bar,
  .flash-stack .flash,
  .liquid-glass-shell > .glass-card {
    animation: none;
  }
}