/* ==========================================================================
   UNIVERSAL IDENTITY & AUTHENTICATION BROKER DESIGN SYSTEM
   Modern, High-Performance CSS — Clean Light Theme Default with Dark Mode Support
   ========================================================================== */

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

:root {
  /* Clean Light Theme Palette (Default for Public & Logged-Out Views) */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --border-subtle: #E2E8F0;
  --border-focus: rgba(79, 70, 229, 0.4);
  --border-glow: 0 0 20px rgba(79, 70, 229, 0.12);
  
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-glow: rgba(79, 70, 229, 0.2);
  --accent: #7C3AED;
  --accent-cyan: #0891B2;
  --accent-emerald: #059669;
  --accent-rose: #E11D48;
  --accent-amber: #D97706;

  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dim: #64748B;

  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme for Operational Consoles (Admin / Portal) */
body.theme-dark, .theme-dark {
  --bg-primary: #07090E;
  --bg-secondary: #0D111C;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent: #8B5CF6;
  --accent-cyan: #06B6D4;
  --accent-emerald: #10B981;
  --accent-rose: #F43F5E;
  --accent-amber: #F59E0B;

  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.6);
}

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

/* Modern Subtle Scrollbars (Eliminating bulky native scrollbars) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glows */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.06), rgba(224, 231, 255, 0.4) 50%, transparent 80%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.05), transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

body.theme-dark::before {
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.05) 50%, transparent 80%);
}

body.theme-dark::after {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08), transparent 70%);
}

/* Typography */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

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

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

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
}

body.theme-dark .navbar {
  background: rgba(7, 9, 14, 0.75);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--primary-glow);
  color: #FFFFFF;
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

body.theme-dark .brand-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  color: #FFFFFF;
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-main);
  border-color: var(--border-subtle);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: #F8FAFC;
  color: var(--text-main);
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

body.theme-dark .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

body.theme-dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Main Layout Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Service Gateway Header */
.gateway-header {
  padding: 4rem 0 2.5rem;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 1.5rem;
}

body.theme-dark .status-pill {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6EE7B7;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.gateway-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.gateway-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.gateway-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Operational Telemetry Ribbon */
.telemetry-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-normal);
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Cards & Sections */
.features-section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.section-desc {
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

body.theme-dark .feature-icon-wrap {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #A5B4FC;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex-grow: 1;
}

/* Endpoints Table */
.endpoints-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.endpoints-table th {
  background: rgba(0, 0, 0, 0.02);
  padding: 1rem;
  color: var(--text-main);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
}

body.theme-dark .endpoints-table th {
  background: rgba(0, 0, 0, 0.4);
  color: #A5B4FC;
}

.endpoints-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.badge-method {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.badge-get {
  background: rgba(14, 165, 233, 0.1);
  color: #0284C7;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-post {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Diagnostic Handshake Console */
.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

body.theme-dark .demo-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(13, 17, 28, 0.95) 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.demo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  align-items: center;
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .demo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.demo-box {
  background: #F8FAFC;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

body.theme-dark .demo-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-box-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.demo-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
}

.code-block {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #E2E8F0;
  overflow-x: auto;
  margin: 1rem 0;
}

/* Status Grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

body.theme-dark .status-badge-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Sticky Impersonation Banner */
.impersonation-banner {
  background: linear-gradient(90deg, #F59E0B, #D97706);
  color: #111827;
  padding: 0.65rem 1.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.impersonation-exit {
  background: #111827;
  color: #FBBF24;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
}

.impersonation-exit:hover {
  background: #000000;
}

/* ==========================================================================
   MASCOT & BRAND IDENTITY
   ========================================================================== */
.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-mascot-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
  padding: 4rem 0 3rem;
}

@media (max-width: 992px) {
  .hero-mascot-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
}

.hero-mascot-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow-hover);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-mascot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-emerald));
}

.hero-mascot-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.mascot-caption {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mascot-subtext {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ==========================================================================
   PORTAL & ADMIN DASHBOARD NAVIGATION & DATA TABLES
   ========================================================================== */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.dashboard-title-group h1 {
  font-size: 2rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dashboard-title-group p {
  color: var(--text-muted);
  font-size: 0.925rem;
}

.dashboard-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 0.5rem;
}

.dashboard-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dashboard-tab:hover {
  color: var(--text-main);
  background: #F1F5F9;
}

.dashboard-tab.active {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.2);
  box-shadow: none;
}

.dashboard-tab .tab-count {
  background: #E2E8F0;
  color: var(--text-dim);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
}

.dashboard-tab.active .tab-count {
  background: var(--primary);
  color: #FFFFFF;
}

.dash-pane {
  display: none;
}

.dash-pane.active {
  display: block;
}

/* Data Tables */
.data-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  overflow-x: auto;
  margin-bottom: 2rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background: #F8FAFC;
  padding: 0.85rem 1.15rem;
  color: var(--text-main);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #F8FAFC;
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-primary {
  background: rgba(79, 70, 229, 0.08);
  color: #4F46E5;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.badge-admin {
  background: rgba(124, 58, 237, 0.08);
  color: #7C3AED;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.badge-warning {
  background: rgba(217, 119, 6, 0.08);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-neutral {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

/* Modal Dialogs */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

