/**
 * NetShow Design System
 * Version: 2.0.0 — Theme System (Gold / Silver × Dark / Light)
 * Created: 2026-02-07 | Updated: 2026-02-21
 * 
 * THEME SYSTEM:
 * - Color theme: data-ns-theme="gold" (default) or "silver" on <html>
 * - Mode: data-bs-theme="dark" (default) or "light" on <html>
 * - Persisted in localStorage: 'ns-color-theme' and 'theme'
 *
 * Usage: Include this file before other CSS files
 * <link rel="stylesheet" href="{{ asset('css/design-system.css') }}">
 *
 * CRISP STATES AND DEPTH (line 15165, 2026-09-29; rules R1-R13 in docs/design/POLISH-TOKENS.md):
 * - --ns-transition-base (200ms ease): the transition the cards below already read; it was undefined
 *   here, so pages loading only this file (layouts.landing, layouts.error) had no transition there.
 * - --ns-dur-press (80ms): how fast a control sinks when pressed. U2 instant response.
 * - --ns-dur-hover (120ms): how fast hover colours and borders change. U2 instant response.
 * - --ns-dur-ui (180ms) and --ns-dur-ui-out (140ms): a sheet, menu or panel opening and closing.
 * - --ns-ease-out: the one easing curve for all of the above: quick start, soft landing.
 *   Every --ns-dur-* is 0ms for people who ask their device for less motion. P10 reduced motion.
 * - --ns-focus-ring (the theme accent) and --ns-focus-ring-width (2px): the keyboard focus outline.
 *   P9 visible focus.
 * - --ns-elev-1 / -2 / -3: resting card, raised (hover, open menu), floating sheet. Defined per theme
 *   and mode; dark modes add a faint light edge so depth still reads on dark. U3 depth.
 * - --ns-tilt-x / --ns-tilt-y (0deg): the page sets these for .ns-tilt; capped at 4deg.
 * Opt-in classes (nothing on a page changes until it adds one): .ns-press, .ns-hover, .ns-focus,
 * .ns-lift, .ns-tilt, .ns-sheet-enter / .ns-sheet-leave, details.ns-disclosure. Hover, lift and tilt
 * apply only to a fine pointer that can hover; one reduced-motion block (just above the Mission 270 block) calms
 * them, scoped to these tokens and classes (the alive faces and the stage keep their own rules).
 */

/* ========================================
 * GOLD THEME — DARK MODE (Default)
 * Warm sunrise energy. Amber/gold accent.
 * ======================================== */
:root,
[data-ns-theme="gold"],
[data-ns-theme="gold"][data-bs-theme="dark"] {
  /* Background Colors */
  --ns-bg-primary: #1a1a1a;
  --ns-bg-secondary: #2d2d2d;
  --ns-bg-tertiary: #3d3d3d;
  --ns-bg-elevated: #424649;
  --ns-bg-surface: #2f3437;
  
  /* Text Colors */
  --ns-text-primary: #ffffff;
  --ns-text-secondary: #a0a0a0;
  --ns-text-muted: #6b7280;
  --ns-text-disabled: #4b5563;
  
  /* Accent Colors — GOLD */
  --ns-accent: #f59e0b;
  --ns-accent-hover: #d97706;
  --ns-accent-subtle: rgba(245, 158, 11, 0.1);
  --ns-accent-text: #000;         /* Text on accent background */
  --ns-accent-glow: rgba(245, 158, 11, 0.25);
  
  /* Theme Identity */
  --ns-theme-name: 'gold';
  --ns-theme-icon: '☀️';
  --ns-theme-gradient: linear-gradient(135deg, #f59e0b, #d97706);
  
  /* Semantic Colors */
  --ns-success: #10b981;
  --ns-success-bg: rgba(16, 185, 129, 0.1);
  --ns-warning: #f59e0b;
  --ns-warning-bg: rgba(245, 158, 11, 0.1);
  --ns-error: #ef4444;
  --ns-error-bg: rgba(239, 68, 68, 0.1);
  --ns-info: #64748b;             /* desaturated steel — semantic "info" without cold electric blue (S25) */
  --ns-info-bg: rgba(100, 116, 139, 0.1);
  
  /* Border Colors */
  --ns-border: #404040;
  --ns-border-subtle: #333333;
  --ns-border-strong: #525252;
  
  /* Shadows */
  --ns-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --ns-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --ns-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --ns-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);

  /* Elevation (U3): resting, raised, floating; a faint light edge keeps depth readable on dark */
  --ns-elev-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --ns-elev-2: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --ns-elev-3: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ========================================
 * GOLD THEME — LIGHT MODE
 * Warm whites with amber accents
 * ======================================== */
html[data-ns-theme="gold"][data-bs-theme="light"],
html[data-bs-theme="light"]:not([data-ns-theme="silver"]) {
  --ns-bg-primary: #fafaf9;
  --ns-bg-secondary: #ffffff;
  --ns-bg-tertiary: #f5f5f4;
  --ns-bg-elevated: #fafaf9;
  --ns-bg-surface: #ffffff;
  
  --ns-text-primary: #1c1917;
  --ns-text-secondary: #57534e;
  --ns-text-muted: #a8a29e;
  --ns-text-disabled: #d6d3d1;
  
  --ns-accent: #d97706;
  --ns-accent-hover: #b45309;
  --ns-accent-subtle: rgba(217, 119, 6, 0.08);
  --ns-accent-text: #ffffff;
  --ns-accent-glow: rgba(217, 119, 6, 0.15);
  
  --ns-border: #e7e5e4;
  --ns-border-subtle: #f5f5f4;
  --ns-border-strong: #d6d3d1;
  
  --ns-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --ns-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --ns-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --ns-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  --ns-elev-1: 0 1px 2px rgba(28, 25, 23, 0.06), 0 0 0 1px rgba(28, 25, 23, 0.04);
  --ns-elev-2: 0 4px 12px rgba(28, 25, 23, 0.1), 0 0 0 1px rgba(28, 25, 23, 0.05);
  --ns-elev-3: 0 12px 28px rgba(28, 25, 23, 0.14), 0 0 0 1px rgba(28, 25, 23, 0.06);
}

/* ========================================
 * SILVER THEME — DARK MODE
 * Cool moonlight elegance. Steel blue accent.
 * ======================================== */
html[data-ns-theme="silver"],
html[data-ns-theme="silver"][data-bs-theme="dark"] {
  --ns-bg-primary: #0f172a;
  --ns-bg-secondary: #1e293b;
  --ns-bg-tertiary: #334155;
  --ns-bg-elevated: #3b4a63;
  --ns-bg-surface: #1e293b;
  
  --ns-text-primary: #f1f5f9;
  --ns-text-secondary: #94a3b8;
  --ns-text-muted: #64748b;
  --ns-text-disabled: #475569;
  
  /* Accent Colors — SILVER with Steel Blue highlight */
  --ns-accent: #94a3b8;
  --ns-accent-hover: #cbd5e1;
  --ns-accent-subtle: rgba(148, 163, 184, 0.1);
  --ns-accent-text: #0f172a;
  --ns-accent-glow: rgba(148, 163, 184, 0.2);
  
  /* Steel blue for interactive highlights (links, active states) */
  --ns-highlight: #3b82f6;
  --ns-highlight-hover: #2563eb;
  --ns-highlight-subtle: rgba(59, 130, 246, 0.1);
  
  /* Theme Identity */
  --ns-theme-name: 'silver';
  --ns-theme-icon: '🌙';
  --ns-theme-gradient: linear-gradient(135deg, #94a3b8, #64748b);
  
  --ns-info: #60a5fa;
  --ns-info-bg: rgba(96, 165, 250, 0.1);
  
  --ns-border: #334155;
  --ns-border-subtle: #1e293b;
  --ns-border-strong: #475569;
  
  --ns-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --ns-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --ns-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
  --ns-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);

  --ns-elev-1: 0 1px 2px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.06);
  --ns-elev-2: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(148, 163, 184, 0.09);
  --ns-elev-3: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(148, 163, 184, 0.12);
}

/* ========================================
 * SILVER THEME — LIGHT MODE
 * Clean platinum whites with cool blue
 * ======================================== */
html[data-ns-theme="silver"][data-bs-theme="light"] {
  --ns-bg-primary: #f8fafc;
  --ns-bg-secondary: #ffffff;
  --ns-bg-tertiary: #f1f5f9;
  --ns-bg-elevated: #f8fafc;
  --ns-bg-surface: #ffffff;
  
  --ns-text-primary: #0f172a;
  --ns-text-secondary: #475569;
  --ns-text-muted: #94a3b8;
  --ns-text-disabled: #cbd5e1;
  
  --ns-accent: #64748b;
  --ns-accent-hover: #475569;
  --ns-accent-subtle: rgba(100, 116, 139, 0.08);
  --ns-accent-text: #ffffff;
  --ns-accent-glow: rgba(100, 116, 139, 0.12);
  
  --ns-highlight: #2563eb;
  --ns-highlight-hover: #1d4ed8;
  --ns-highlight-subtle: rgba(37, 99, 235, 0.08);
  
  --ns-border: #e2e8f0;
  --ns-border-subtle: #f1f5f9;
  --ns-border-strong: #cbd5e1;
  
  --ns-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ns-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06);
  --ns-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
  --ns-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08);

  --ns-elev-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --ns-elev-2: 0 4px 12px rgba(15, 23, 42, 0.09), 0 0 0 1px rgba(15, 23, 42, 0.05);
  --ns-elev-3: 0 12px 28px rgba(15, 23, 42, 0.13), 0 0 0 1px rgba(15, 23, 42, 0.06);
}

/* ========================================
 * SHARED DESIGN TOKENS (all themes)
 * ======================================== */
:root {
  --ns-studio-preview-bg: #101726;
  
  /* ========================================
   * TYPOGRAPHY
   * ======================================== */
  
  --ns-font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ns-font-mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, monospace;
  
  /* Font Sizes */
  --ns-text-xs: 0.75rem;    /* 12px */
  --ns-text-sm: 0.875rem;   /* 14px */
  --ns-text-base: 1rem;     /* 16px */
  --ns-text-lg: 1.25rem;    /* 20px */
  --ns-text-xl: 1.5rem;     /* 24px */
  --ns-text-2xl: 2rem;      /* 32px */
  --ns-text-3xl: 3rem;      /* 48px */
  
  /* Font Weights */
  --ns-font-normal: 400;
  --ns-font-medium: 500;
  --ns-font-semibold: 600;
  --ns-font-bold: 700;
  
  /* Line Heights */
  --ns-leading-tight: 1.25;
  --ns-leading-normal: 1.5;
  --ns-leading-relaxed: 1.75;
  
  /* ========================================
   * SPACING
   * ======================================== */
  
  --ns-space-1: 0.25rem;    /* 4px */
  --ns-space-2: 0.5rem;     /* 8px */
  --ns-space-3: 0.75rem;    /* 12px */
  --ns-space-4: 1rem;       /* 16px */
  --ns-space-5: 1.5rem;     /* 24px */
  --ns-space-6: 2rem;       /* 32px */
  --ns-space-8: 3rem;       /* 48px */
  --ns-space-10: 4rem;      /* 64px */
  --ns-space-12: 6rem;      /* 96px */
  
  /* ========================================
   * BORDERS & RADIUS
   * ======================================== */
  
  --ns-radius-sm: 0.25rem;  /* 4px */
  --ns-radius-md: 0.5rem;   /* 8px */
  --ns-radius-lg: 0.75rem;  /* 12px */
  --ns-radius-xl: 1rem;     /* 16px */
  --ns-radius-full: 9999px;
  
  /* ========================================
   * SHADOWS
   * ======================================== */
  
  --ns-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --ns-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --ns-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --ns-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
  
  /* ========================================
   * TRANSITIONS
   * ======================================== */
  
  --ns-transition-fast: 150ms ease;
  --ns-transition-normal: 200ms ease;
  --ns-transition-slow: 300ms ease;
  --ns-transition-base: 200ms ease;

  /* Motion (U2 instant response; all 0ms under reduced motion, P10) */
  --ns-dur-press: 80ms;
  --ns-dur-hover: 120ms;
  --ns-dur-ui: 180ms;
  --ns-dur-ui-out: 140ms;
  --ns-ease-out: cubic-bezier(.2, .8, .2, 1);

  /* Focus (P9 visible focus) */
  --ns-focus-ring: var(--ns-accent);
  --ns-focus-ring-width: 2px;

  /* Tilt inputs for .ns-tilt; a page that wants pointer-follow sets them on the element */
  --ns-tilt-x: 0deg;
  --ns-tilt-y: 0deg;
  
  /* ========================================
   * Z-INDEX SCALE
   * ======================================== */
  
  --ns-z-dropdown: 100;
  --ns-z-sticky: 200;
  --ns-z-modal: 300;
  --ns-z-popover: 400;
  --ns-z-tooltip: 500;
}

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

/* Buttons */
.ns-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ns-space-2);
  padding: var(--ns-space-2) var(--ns-space-4);
  font-size: var(--ns-text-sm);
  font-weight: var(--ns-font-medium);
  border-radius: var(--ns-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--ns-transition-fast);
}

.ns-btn-primary {
  background: var(--ns-accent);
  color: #000;
}

.ns-btn-primary:hover {
  background: var(--ns-accent-hover);
}

.ns-btn-secondary {
  background: var(--ns-bg-tertiary);
  color: var(--ns-text-primary);
  border: 1px solid var(--ns-border);
}

.ns-btn-secondary:hover {
  background: var(--ns-bg-elevated);
}

.ns-btn-ghost {
  background: transparent;
  color: var(--ns-text-secondary);
}

.ns-btn-ghost:hover {
  background: var(--ns-bg-tertiary);
  color: var(--ns-text-primary);
}

/* Cards */
.ns-card {
  background: var(--ns-bg-secondary);
  border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius-lg);
  padding: var(--ns-space-4);
}

/* Status Badges */
.ns-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--ns-space-1) var(--ns-space-2);
  font-size: var(--ns-text-xs);
  font-weight: var(--ns-font-medium);
  border-radius: var(--ns-radius-full);
}

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

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

.ns-badge-error {
  background: var(--ns-error-bg);
  color: var(--ns-error);
}

.ns-badge-info {
  background: var(--ns-info-bg);
  color: var(--ns-info);
}

/* Loading States */
/* Card Extended */
.ns-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ns-bg-surface);
  padding: var(--ns-space-3) var(--ns-space-4);
  border-bottom: 1px solid var(--ns-border);
  border-radius: var(--ns-radius-lg) var(--ns-radius-lg) 0 0;
  margin: calc(var(--ns-space-4) * -1);
  margin-bottom: var(--ns-space-4);
}

.ns-card-header-left {
  display: flex;
  align-items: center;
  gap: var(--ns-space-3);
}

.ns-card-icon {
  font-size: var(--ns-text-lg);
  color: var(--ns-accent);
}

.ns-card-title {
  font-size: var(--ns-text-base);
  font-weight: var(--ns-font-semibold);
  color: var(--ns-text-primary);
  margin: 0;
}

.ns-card-subtitle {
  font-size: var(--ns-text-sm);
  color: var(--ns-text-muted);
  margin: 0;
}

.ns-card-body {
  padding: 0;
}

.ns-card-actions {
  display: flex;
  align-items: center;
  gap: var(--ns-space-2);
}

/* Badge Extended */
.ns-badge-default {
  background: var(--ns-bg-tertiary);
  color: var(--ns-text-secondary);
}

.ns-badge-sm {
  padding: 2px var(--ns-space-1);
  font-size: 10px;
}

.ns-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: var(--ns-space-1);
}

/* Empty State Extended */
.ns-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--ns-space-8);
  text-align: center;
}

.ns-empty-state-icon {
  font-size: 3rem;
  color: var(--ns-text-muted);
  opacity: 0.4;
  margin-bottom: var(--ns-space-4);
}

.ns-empty-state-title {
  font-size: var(--ns-text-lg);
  font-weight: var(--ns-font-semibold);
  color: var(--ns-text-secondary);
  margin: 0 0 var(--ns-space-2);
}

.ns-empty-state-message {
  font-size: var(--ns-text-sm);
  /* OPUS5-L10: was --ns-text-muted, which fails WCAG AA as body text in every
     estate theme — measured #6b7280 on --ns-bg-primary #1a1a1a = 3.60:1,
     #6b7280 on --ns-bg-secondary #2d2d2d = 2.85:1, and light-mode #a8a29e on
     #fafaf9 = 2.41:1 / on #ffffff = 2.52:1. --ns-text-secondary clears 4.5:1
     on all four beds (5.27 / 6.66 / 7.30 / 7.63). This is the sentence that
     tells someone why a list is empty and what to do about it; it is the last
     text on the page that should be the hardest to read.
     The sibling --ns-text-muted uses in this block are decorative (the icon
     sits at opacity 0.4 by design) and are left alone. */
  color: var(--ns-text-secondary);
  max-width: 520px;
  margin: 0 0 var(--ns-space-4);
}

.ns-empty-state-tips {
  margin: 0 0 var(--ns-space-4);
  padding-left: 1.1rem;
  text-align: left;
  color: var(--ns-text-secondary);
  font-size: var(--ns-text-sm);
  display: grid;
  gap: var(--ns-space-1);
  max-width: 560px;
}

.ns-empty-state-actions {
  display: flex;
  gap: var(--ns-space-2);
  flex-wrap: wrap;
  justify-content: center;
}

/* OPUS5-L10: opt-in card bed for an empty state that sits alone in a wide
   column (the marketplace shelf, a dashboard tab with no rows). Without it a
   centred block of text in a large empty area reads as an unfinished page
   rather than a deliberate state. Added here, on tokens, rather than in a page
   sheet: marketplace-agent-listings-v2.css already carries a .mp-empty-state
   bed hard-coded to #1a1a1a/#262626, which cannot follow the light or silver
   themes. Any surface can opt in; none has to. */
.ns-empty-state-card {
  background: var(--ns-bg-secondary);
  border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius-lg);
}

/* The estate tap-target floor, met by every empty-state CTA at every width. */
.ns-empty-state-actions .ns-btn {
  min-height: 2.75rem;
  padding-left: var(--ns-space-5);
  padding-right: var(--ns-space-5);
  font-size: var(--ns-text-base);
  text-decoration: none;
}

@media (max-width: 30rem) {
  .ns-empty-state {
    padding: var(--ns-space-6) var(--ns-space-4);
  }

  /* Two side-by-side CTAs at 375px leave each too narrow to read. */
  .ns-empty-state-actions {
    flex-direction: column;
    align-self: stretch;
    width: 100%;
  }

  .ns-empty-state-actions .ns-btn {
    width: 100%;
  }
}

/* Loading Extended */
.ns-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ns-space-3);
}

.ns-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--ns-border);
  border-top-color: var(--ns-accent);
  border-radius: 50%;
  animation: ns-spin 0.8s linear infinite;
}

.ns-loading-sm .ns-loading-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.ns-loading-lg .ns-loading-spinner {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.ns-loading-text {
  font-size: var(--ns-text-sm);
  color: var(--ns-text-muted);
  margin: 0;
}

/* Select / Model Selector */
.ns-select {
  appearance: none;
  background: var(--ns-bg-tertiary);
  border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius-md);
  padding: 10px 36px 10px 12px;
  color: var(--ns-text-primary);
  font-size: var(--ns-text-sm);
  width: 100%;
  cursor: pointer;
  transition: border-color var(--ns-transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.ns-select:focus {
  border-color: var(--ns-accent);
  outline: none;
}

.ns-select-sm {
  padding: 6px 28px 6px 8px;
  font-size: 12px;
}

/* Button System */
.ns-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ns-space-2);
  padding: 10px 20px;
  font-size: var(--ns-text-sm);
  font-weight: var(--ns-font-medium);
  border-radius: var(--ns-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--ns-transition-fast);
  text-decoration: none;
  line-height: 1;
}

.ns-btn:hover { opacity: 0.9; }
.ns-btn:active { transform: scale(0.98); }

.ns-btn-primary {
  background: var(--ns-accent);
  color: #000;
  border-color: var(--ns-accent);
}

.ns-btn-primary:hover {
  background: var(--ns-accent-hover);
  border-color: var(--ns-accent-hover);
  color: #000;
}

.ns-btn-secondary {
  background: var(--ns-bg-tertiary);
  color: var(--ns-text-primary);
  border-color: var(--ns-border);
}

.ns-btn-secondary:hover {
  background: var(--ns-bg-elevated);
}

.ns-btn-ghost {
  background: transparent;
  color: var(--ns-text-secondary);
}

.ns-btn-ghost:hover {
  background: var(--ns-bg-tertiary);
  color: var(--ns-text-primary);
}

.ns-btn-danger {
  background: var(--ns-error);
  color: #fff;
  border-color: var(--ns-error);
}

.ns-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.ns-btn-lg {
  padding: 14px 28px;
  font-size: var(--ns-text-base);
}

.ns-btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
}

/* Page Header */
.ns-page-header {
  padding: var(--ns-space-4) 0;
  margin-bottom: var(--ns-space-4);
}

.ns-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--ns-space-2);
  margin-bottom: var(--ns-space-2);
  font-size: var(--ns-text-sm);
}

.ns-breadcrumb-link {
  color: var(--ns-text-muted);
  text-decoration: none;
  transition: color var(--ns-transition-fast);
}

.ns-breadcrumb-link:hover {
  color: var(--ns-accent);
}

.ns-breadcrumb-sep {
  color: var(--ns-text-disabled);
}

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

.ns-page-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ns-space-3);
}

.ns-page-header-left {
  display: flex;
  align-items: center;
  gap: var(--ns-space-3);
}

.ns-page-header-icon {
  font-size: var(--ns-text-2xl);
  color: var(--ns-accent);
}

.ns-page-title {
  font-size: var(--ns-text-2xl);
  font-weight: var(--ns-font-bold);
  color: var(--ns-text-primary);
  margin: 0;
  line-height: 1.2;
}

.ns-page-subtitle {
  font-size: var(--ns-text-sm);
  color: var(--ns-text-muted);
  margin: var(--ns-space-1) 0 0;
}

.ns-page-header-actions {
  display: flex;
  align-items: center;
  gap: var(--ns-space-2);
}

/* Alerts */
.ns-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--ns-space-3);
  padding: var(--ns-space-3) var(--ns-space-4);
  border-radius: var(--ns-radius-md);
  font-size: var(--ns-text-sm);
}

.ns-alert-icon {
  margin-top: 2px;
  flex-shrink: 0;
}

.ns-alert-content {
  flex: 1;
}

.ns-alert-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
  color: inherit;
}

.ns-alert-dismiss:hover {
  opacity: 1;
}

.ns-alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.ns-alert-success {
  background: var(--ns-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--ns-success);
}

.ns-alert-warning {
  background: var(--ns-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--ns-warning);
}

.ns-alert-error {
  background: var(--ns-error-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--ns-error);
}

/* Text Utilities */
.ns-text-muted { color: var(--ns-text-muted); }
.ns-text-accent { color: var(--ns-accent); }
.ns-text-success { color: var(--ns-success); }
.ns-text-error { color: var(--ns-error); }

/* ========================================
 * SIDEBAR ENHANCEMENTS
 * ======================================== */

/* Sidebar Container */
.offcanvas.offcanvas-start {
  background: var(--ns-bg-primary) !important;
  border-right: 1px solid var(--ns-border) !important;
}

.offcanvas-header {
  background: var(--ns-bg-primary) !important;
  border-bottom: 1px solid var(--ns-border);
  padding: var(--ns-space-4) !important;
}

.offcanvas-body {
  background: var(--ns-bg-primary) !important;
  padding: var(--ns-space-3) !important;
}

/* Sidebar Logo/Title */
.sidebarTitle {
  color: var(--ns-text-primary);
  font-weight: var(--ns-font-medium);
}

.sidebar-logo-img {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.offcanvas-header .sidebar-logo-link {
  min-height: 24px;
  overflow: hidden;
}

/* Navigation Links */
.offcanvas-body .nav-link {
  color: var(--ns-text-secondary) !important;
  padding: var(--ns-space-2) var(--ns-space-3) !important;
  margin: 2px 0;
  border-radius: var(--ns-radius-md) !important;
  font-size: var(--ns-text-sm) !important;
  transition: all var(--ns-transition-fast) !important;
}

.offcanvas-body .nav-link:hover {
  color: var(--ns-text-primary) !important;
  background: var(--ns-bg-tertiary) !important;
}

.offcanvas-body .nav-link.active {
  color: var(--ns-accent) !important;
  background: var(--ns-accent-subtle) !important;
  font-weight: var(--ns-font-medium);
}

/* Sidebar Icons */
.offcanvas-body .nav-link i {
  width: 20px;
  text-align: center;
  color: var(--ns-text-muted);
  transition: color var(--ns-transition-fast);
}

.offcanvas-body .nav-link:hover i,
.offcanvas-body .nav-link.active i {
  color: var(--ns-accent);
}

/* Sidebar Dividers */
.offcanvas-body hr {
  border-color: var(--ns-border) !important;
  opacity: 0.5;
  margin: var(--ns-space-3) 0 !important;
}

/* Submenu Items */
.offcanvas-body .nav-dropdown-subitem {
  font-size: var(--ns-text-xs) !important;
  padding-left: var(--ns-space-6) !important;
}

/* Collapse Arrow */
.offcanvas-body .dropdown-toggle::after {
  border-top-color: var(--ns-text-muted);
  transition: transform var(--ns-transition-fast);
}

.offcanvas-body .dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Scrollbar */
.offcanvas-body::-webkit-scrollbar {
  width: 6px;
}

.offcanvas-body::-webkit-scrollbar-track {
  background: transparent;
}

.offcanvas-body::-webkit-scrollbar-thumb {
  background: var(--ns-border);
  border-radius: var(--ns-radius-full);
}

.offcanvas-body::-webkit-scrollbar-thumb:hover {
  background: var(--ns-border-strong);
}

/* Sidebar Pin State */
body.sidebar-pinned .offcanvas-start {
  transform: none !important;
  visibility: visible !important;
}

/* ========================================
 * TOPBAR / HEADER ENHANCEMENTS
 * Modern, consumer-friendly navigation
 * ======================================== */

/* Main Navbar Container */
#navbar {
  background: linear-gradient(180deg, var(--ns-bg-secondary) 0%, rgba(24, 24, 27, 0.98) 100%) !important;
  border-bottom: 1px solid var(--ns-border) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 56px;
  transition: all var(--ns-transition-base);
}

/* Line 16098 (fix-ui-02-20260929-r1, F-0619): under the light theme the bar above faded from white to near-black, so
   its dark light-theme words sat on mid-grey. Light keeps both stops light (the theme's own surfaces); dark is unchanged. */
html[data-bs-theme="light"] #navbar {
  background: linear-gradient(180deg, var(--ns-bg-secondary, #ffffff) 0%, var(--ns-bg-primary, #fafaf9) 100%) !important;
}

/* Brand Section */
#navbar .offcanvas-header {
  background: transparent !important;
  padding: 0;
}

#navbar .sidebarTitle,
#navbar #nav_select {
  font-weight: var(--ns-font-semibold) !important;
  font-size: var(--ns-text-base) !important;
  letter-spacing: -0.01em;
  background: transparent !important;
  border: none !important;
  color: var(--ns-text-primary) !important;
  cursor: pointer;
  padding: var(--ns-space-2) var(--ns-space-3) !important;
  border-radius: var(--ns-radius-md);
  transition: all var(--ns-transition-fast);
}

#navbar #nav_select:hover,
#navbar #nav_select:focus {
  background: var(--ns-bg-tertiary) !important;
  outline: none;
}

#navbar #nav_select option {
  background: var(--ns-bg-secondary);
  color: var(--ns-text-primary);
  padding: var(--ns-space-2);
}

/* Hamburger Menu Button */
#sidebarToggleBtn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ns-radius-md);
  transition: all var(--ns-transition-fast);
  margin-right: var(--ns-space-2);
}

#sidebarToggleBtn:hover {
  background: var(--ns-bg-tertiary);
}

#sidebarToggleBtn i {
  font-size: 18px !important;
  color: var(--ns-text-secondary) !important;
  transition: color var(--ns-transition-fast);
}

#sidebarToggleBtn:hover i {
  color: var(--ns-text-primary) !important;
}

/* Nav Links */
#navbar .nav-link {
  color: var(--ns-text-secondary) !important;
  font-weight: var(--ns-font-medium);
  font-size: var(--ns-text-sm);
  padding: var(--ns-space-2) var(--ns-space-3) !important;
  border-radius: var(--ns-radius-md);
  transition: all var(--ns-transition-fast);
  display: flex;
  align-items: center;
  gap: var(--ns-space-2);
}

#navbar .nav-link:hover {
  color: var(--ns-text-primary) !important;
  background: var(--ns-bg-tertiary);
}

#navbar .nav-link i {
  font-size: 14px;
  opacity: 0.8;
}

/* User Avatar / Profile Section */
#navbar .nav-link.dropdown-toggle img,
#navbar .nav-link img {
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--ns-radius-full) !important;
  border: 2px solid var(--ns-border);
  object-fit: cover;
  transition: all var(--ns-transition-fast);
}

#navbar .nav-link.dropdown-toggle:hover img,
#navbar .nav-link:hover img {
  border-color: var(--ns-accent);
}

/* Dropdown Menus - Base setup (overridden by UNIFIED HEADER section below) */
/* Keeping minimal rules here for non-dropdown navbar elements */

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--ns-accent);
  color: #000;
  font-size: 10px;
  font-weight: var(--ns-font-bold);
  border-radius: var(--ns-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ns-bg-secondary);
}

/* Credits Display in Navbar */
.nav-credits {
  display: flex;
  align-items: center;
  gap: var(--ns-space-1);
  padding: var(--ns-space-1) var(--ns-space-3);
  background: var(--ns-bg-tertiary);
  border-radius: var(--ns-radius-full);
  font-size: var(--ns-text-xs);
  font-weight: var(--ns-font-semibold);
  color: var(--ns-accent);
}

/* Mobile Navbar Toggle */
#navbar .navbar-toggler {
  border: none !important;
  padding: var(--ns-space-2);
  border-radius: var(--ns-radius-md);
}

#navbar .navbar-toggler:focus {
  box-shadow: none;
}

#navbar .navbar-toggler i {
  color: var(--ns-text-secondary);
}

/* Guest Navigation Buttons */
#navbar .navbar-nav .nav-item .nav-link[href*="login"],
#navbar .navbar-nav .nav-item .nav-link[href*="register"] {
  border: 1px solid var(--ns-border);
  margin-left: var(--ns-space-2);
}

#navbar .navbar-nav .nav-item .nav-link[href*="register"] {
  background: var(--ns-accent) !important;
  color: #000 !important;
  border-color: var(--ns-accent);
}

#navbar .navbar-nav .nav-item .nav-link[href*="register"]:hover {
  background: var(--ns-accent-hover) !important;
}

/* ========================================
 * FOOTER ENHANCEMENTS  
 * ======================================== */

footer, .app-footer {
  background: var(--ns-bg-secondary);
  border-top: 1px solid var(--ns-border);
  padding: var(--ns-space-6) var(--ns-space-4);
  color: var(--ns-text-muted);
  font-size: var(--ns-text-sm);
}

.app-footer a {
  color: var(--ns-text-secondary);
  text-decoration: none;
  transition: color var(--ns-transition-fast);
}

.app-footer a:hover {
  color: var(--ns-accent);
}

.app-footer .footer-brand {
  font-weight: var(--ns-font-bold);
  color: var(--ns-text-primary);
  font-size: var(--ns-text-lg);
}

.app-footer .footer-links {
  display: flex;
  gap: var(--ns-space-4);
  flex-wrap: wrap;
}

.app-footer .footer-social {
  display: flex;
  gap: var(--ns-space-3);
}

.app-footer .footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ns-bg-tertiary);
  border-radius: var(--ns-radius-full);
  transition: all var(--ns-transition-fast);
}

.app-footer .footer-social a:hover {
  background: var(--ns-accent);
  color: #000;
}

/* ========================================
 * NETSHOW NAV DROPDOWN (Topbar)
 * Matches sidebar aesthetic - clean, dark, consistent
 * ======================================== */

.netshow-nav-dropdown {
  position: relative;
  z-index: 1050;
}

.netshow-nav-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--ns-bg-secondary, #2d2d2d);
  border: 1px solid var(--ns-border, #404040);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.netshow-nav-trigger:hover {
  background: var(--ns-bg-tertiary, #3d3d3d);
  border-color: var(--ns-border-strong, #525252);
}

.netshow-nav-trigger:focus {
  outline: none;
  border-color: var(--ns-accent, #f59e0b);
}

.netshow-nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.netshow-nav-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ns-text-primary, #ffffff);
  letter-spacing: 0.3px;
}

.netshow-nav-chevron {
  color: var(--ns-text-muted, #6b7280);
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.netshow-nav-dropdown.open .netshow-nav-chevron {
  transform: rotate(180deg);
}

.netshow-nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--ns-bg-primary, #1a1a1a);
  border: 1px solid var(--ns-border, #404040);
  border-radius: 12px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.15s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.netshow-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ns-text-secondary, #a0a0a0);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.netshow-nav-item:hover {
  background: var(--ns-bg-tertiary, #3d3d3d);
  color: var(--ns-text-primary, #ffffff);
}

.netshow-nav-item.active {
  background: var(--ns-accent-subtle, rgba(245, 158, 11, 0.1));
  color: var(--ns-accent, #f59e0b);
}

.netshow-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--ns-text-muted, #6b7280);
  transition: color 0.15s ease;
}

.netshow-nav-item:hover i {
  color: var(--ns-accent, #f59e0b);
}

.netshow-nav-item.active i {
  color: var(--ns-accent, #f59e0b);
}

.netshow-nav-item span {
  flex: 1;
}

/* ========================================
 * FOOTER
 * ======================================== */

.netshow-footer {
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 64px 0 0;
  margin-top: auto;
  width: 100%;
  position: relative;
}

/* Subtle top glow line */
.netshow-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.netshow-footer .container {
  max-width: 1200px;
}

/* Footer Grid Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 64px;
  padding: 48px 0 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

/* Brand Section */
.footer-brand-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-logo-link:hover {
  transform: translateX(4px);
}

.footer-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.footer-logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.45);
  font-size: 15px;
  margin: 0;
  max-width: 260px;
  line-height: 1.5;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Links Section */
.footer-links-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 576px) {
  .footer-links-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

.footer-links-col h6.footer-heading {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 20px 0;
  position: relative;
  display: inline-block;
}

.footer-links-col h6.footer-heading::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, transparent);
  border-radius: 1px;
}

.footer-links-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-col ul li {
  margin-bottom: 14px;
}

.footer-links-col ul li:last-child {
  margin-bottom: 0;
}

.footer-links-col ul li a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links-col ul li a::before {
  content: '';
  width: 0;
  height: 1px;
  background: #60a5fa;
  transition: width 0.2s ease;
}

.footer-links-col ul li a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-links-col ul li a:hover::before {
  width: 8px;
}

/* Bottom Bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0;
  gap: 32px;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 28px 0;
  }
}

.footer-bottom-left {
  flex: 1;
}

.footer-og-logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: all 0.3s ease;
}

.footer-og-logo:hover {
  filter: drop-shadow(0 4px 16px rgba(59, 130, 246, 0.3));
  transform: scale(1.05);
}

.footer-bottom-center {
  flex: 1;
  text-align: center;
}

.footer-bottom-center span {
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.footer-bottom-right {
  flex: 1;
  text-align: right;
}

@media (max-width: 768px) {
  .footer-bottom-left,
  .footer-bottom-center,
  .footer-bottom-right {
    flex: none;
    text-align: center;
  }
}

.footer-phone {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.footer-phone:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.footer-phone i {
  color: #3b82f6;
  font-size: 13px;
}

/* OG Logo link wrapper */
.footer-og-logo-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.footer-og-logo-link:hover {
  transform: scale(1.05);
}

.footer-og-logo-link:hover .footer-og-logo {
  filter: drop-shadow(0 4px 20px rgba(59, 130, 246, 0.25));
}

/* Make phone number a proper link */
a.footer-phone {
  text-decoration: none;
}

/* ========================================
 * UNIFIED HEADER DROPDOWNS
 * Matches sidebar aesthetic - clean, dark, consistent
 * ======================================== */

/* Main dropdown container - matches sidebar style */
#navbar .dropdown-menu,
#navbar .dropdown-menu.bg-dark {
  background: var(--ns-bg-primary, #1a1a1a) !important;
  border: 1px solid var(--ns-border, #404040) !important;
  border-radius: 12px !important;
  padding: 8px !important;
  min-width: 220px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  animation: unifiedDropdownFade 0.15s ease-out !important;
}

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

/* Dropdown items - sidebar-consistent styling */
#navbar .dropdown-menu li {
  margin: 0;
}

#navbar .dropdown-menu .nav-link,
#navbar .dropdown-menu .dropdown-item,
#navbar .dropdown-menu.bg-dark .nav-link,
#navbar .dropdown-menu.bg-dark .dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  color: var(--ns-text-secondary, #a0a0a0) !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
}

#navbar .dropdown-menu .nav-link i,
#navbar .dropdown-menu .dropdown-item i,
#navbar .dropdown-menu.bg-dark .nav-link i,
#navbar .dropdown-menu.bg-dark .dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--ns-text-muted, #6b7280) !important;
  transition: color 0.15s ease;
}

#navbar .dropdown-menu .nav-link:hover,
#navbar .dropdown-menu .dropdown-item:hover,
#navbar .dropdown-menu.bg-dark .nav-link:hover,
#navbar .dropdown-menu.bg-dark .dropdown-item:hover {
  background: var(--ns-bg-tertiary, #3d3d3d) !important;
  color: var(--ns-text-primary, #ffffff) !important;
}

#navbar .dropdown-menu .nav-link:hover i,
#navbar .dropdown-menu .dropdown-item:hover i,
#navbar .dropdown-menu.bg-dark .nav-link:hover i,
#navbar .dropdown-menu.bg-dark .dropdown-item:hover i {
  color: var(--ns-accent, #f59e0b) !important;
}

#navbar .dropdown-menu .nav-link.active,
#navbar .dropdown-menu .dropdown-item.active,
#navbar .dropdown-menu.bg-dark .nav-link.active,
#navbar .dropdown-menu.bg-dark .dropdown-item.active {
  background: var(--ns-accent-subtle, rgba(245, 158, 11, 0.1)) !important;
  color: var(--ns-accent, #f59e0b) !important;
}

#navbar .dropdown-menu .nav-link.active i,
#navbar .dropdown-menu .dropdown-item.active i {
  color: var(--ns-accent, #f59e0b) !important;
}

/* Dividers */
#navbar .dropdown-menu hr,
#navbar .dropdown-menu.bg-dark hr {
  border-color: var(--ns-border, #404040) !important;
  margin: 6px 8px !important;
  opacity: 0.5 !important;
}

/* Dropdown toggle arrow for submenus */
#navbar .dropdown-menu .dropdown-toggle::after {
  color: var(--ns-text-muted, #6b7280);
  margin-left: auto;
}

/* Submenu styling - matches main dropdown */
#navbar .dropdown-menu .dropdown-submenu,
#navbar .dropdown-submenu {
  background: var(--ns-bg-primary, #1a1a1a) !important;
  border: 1px solid var(--ns-border, #404040) !important;
  border-radius: 10px !important;
  padding: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

/* Theme toggle in dropdown */
#navbar .dropdown-menu .toggle {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* Credits display */
#navbar .dropdown-menu #user_credits a {
  padding: 10px 12px !important;
}

#navbar .dropdown-menu #user_credits h4 {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--ns-text-secondary, #a0a0a0) !important;
  margin: 0 !important;
}

#navbar .dropdown-menu #user_credits span {
  color: var(--ns-success, #10b981) !important;
  font-weight: 600 !important;
}

/* User name row */
#navbar .dropdown-menu .row .dropdown-item {
  padding: 10px 12px !important;
}

/* Avatar trigger button */
#navbar .dropdown > .nav-link.dropdown-toggle {
  padding: 4px !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

#navbar .dropdown > .nav-link.dropdown-toggle:hover {
  transform: scale(1.05);
}

#navbar .dropdown > .nav-link.dropdown-toggle img {
  border: 2px solid var(--ns-border, #404040) !important;
  transition: border-color 0.2s ease !important;
}

#navbar .dropdown > .nav-link.dropdown-toggle:hover img {
  border-color: var(--ns-accent, #f59e0b) !important;
}

/* Remove default dropdown arrow from avatar */
#navbar .dropdown > .nav-link.dropdown-toggle::after {
  display: none !important;
}

/* ============================================
   Global Input Normalization
   Override legacy border-radius: 25px pill shapes
   ============================================ */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
    border-radius: var(--ns-radius-md, 8px) !important;
}

.form-control,
.form-select {
    border-radius: var(--ns-radius-md, 8px) !important;
}

/* ========================================
 * THEME SWITCHER UI
 * ======================================== */

/* Active swatch ring */
.ns-theme-swatch.active,
.ns-theme-swatch[data-theme="gold"][data-active="true"],
.ns-theme-swatch[data-theme="silver"][data-active="true"] {
  border-color: var(--ns-text-primary) !important;
  box-shadow: 0 0 0 2px var(--ns-bg-primary), 0 0 0 4px var(--ns-text-primary);
  transform: scale(1.1);
}

.ns-theme-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Theme transition — smooth color changes */
*, *::before, *::after {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: 0s; /* Normally instant */
}

html.ns-theme-transitioning *,
html.ns-theme-transitioning *::before,
html.ns-theme-transitioning *::after {
  transition-duration: 0.3s !important;
}

/* Silver theme accent overrides for interactive elements */
[data-ns-theme="silver"] .ns-btn-primary {
  background: var(--ns-highlight, var(--ns-accent));
  border-color: var(--ns-highlight, var(--ns-accent));
  color: #fff;
}

[data-ns-theme="silver"] .ns-btn-primary:hover {
  background: var(--ns-highlight-hover, var(--ns-accent-hover));
  border-color: var(--ns-highlight-hover, var(--ns-accent-hover));
}

[data-ns-theme="silver"] .offcanvas-body .nav-link.active {
  color: var(--ns-highlight, var(--ns-accent)) !important;
  background: var(--ns-highlight-subtle, var(--ns-accent-subtle)) !important;
}

[data-ns-theme="silver"] .offcanvas-body .nav-link:hover i,
[data-ns-theme="silver"] .offcanvas-body .nav-link.active i {
  color: var(--ns-highlight, var(--ns-accent)) !important;
}

[data-ns-theme="silver"] .ns-loading-spinner {
  border-top-color: var(--ns-highlight, var(--ns-accent));
}

[data-ns-theme="silver"] .notification-badge {
  background: var(--ns-highlight, var(--ns-accent));
  color: #fff;
}

/* Fix: Ensure navbar spans full width regardless of sidebar state */
#navbar {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  position: sticky !important;
  top: 0;
  z-index: 1030;
}

body.sidebar-pinned #navbar {
  width: 100% !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Fix: Header full-width — remove sidebar gap */
#navbar.ns-navbar-v2 {
  width: 100vw !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  left: 0 !important;
}

/* ========================================
 * CRISP STATES AND DEPTH (line 15165) — opt-in; nothing applies these until a page adds the class.
 * ======================================== */

/* U2 press: a quick 1px sink. Transitions only transform and box-shadow, never `all`. */
.ns-press {
  transition: transform var(--ns-dur-press) var(--ns-ease-out),
              box-shadow var(--ns-dur-press) var(--ns-ease-out);
}
.ns-press:active {
  transform: translateY(1px) scale(.98);
}

/* P9 focus: one visible outline for keyboard focus; mouse and touch clicks show none. */
.ns-focus:focus-visible {
  outline: var(--ns-focus-ring-width) solid var(--ns-focus-ring);
  outline-offset: 2px;
}

/* U2 / U3 hover, lift and tilt: only where a fine pointer can hover, so phones never stick. */
@media (hover: hover) and (pointer: fine) {
  /* Pairs the element's own :hover colours with a 120ms change. */
  .ns-hover {
    transition: background-color var(--ns-dur-hover) var(--ns-ease-out),
                border-color var(--ns-dur-hover) var(--ns-ease-out),
                color var(--ns-dur-hover) var(--ns-ease-out);
  }
  .ns-lift {
    transition: transform var(--ns-dur-hover) var(--ns-ease-out),
                box-shadow var(--ns-dur-hover) var(--ns-ease-out);
  }
  .ns-lift:hover,
  .ns-lift:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--ns-elev-2);
  }
  /* Classes combined on one element keep every transition instead of the last one winning. */
  .ns-hover.ns-press,
  .ns-hover.ns-lift {
    transition: background-color var(--ns-dur-hover) var(--ns-ease-out),
                border-color var(--ns-dur-hover) var(--ns-ease-out),
                color var(--ns-dur-hover) var(--ns-ease-out),
                transform var(--ns-dur-hover) var(--ns-ease-out),
                box-shadow var(--ns-dur-hover) var(--ns-ease-out);
  }
  /* Tilt reads --ns-tilt-x / --ns-tilt-y (degrees) and never passes 4deg either way. */
  .ns-tilt {
    transform: perspective(800px) rotateX(clamp(-4deg, var(--ns-tilt-x), 4deg)) rotateY(clamp(-4deg, var(--ns-tilt-y), 4deg));
    transition: transform var(--ns-dur-hover) var(--ns-ease-out);
  }
}

/* Sheets, menus and panels: in over 180ms, out over 140ms. */
.ns-sheet-enter {
  animation: ns-sheet-in var(--ns-dur-ui) var(--ns-ease-out) both;
}
.ns-sheet-leave {
  animation: ns-sheet-out var(--ns-dur-ui-out) var(--ns-ease-out) both;
}
@keyframes ns-sheet-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes ns-sheet-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(8px) scale(.98); }
}

/* Phone disclosure row (R9): <details class="ns-disclosure"><summary>Label</summary>
   <div class="ns-disclosure__body"><div>content</div></div></details>. 48px row, chevron turns 90deg. */
details.ns-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ns-space-3);
  min-height: 48px;
  padding: 0 var(--ns-space-4);
  cursor: pointer;
  list-style: none;
}
details.ns-disclosure > summary::-webkit-details-marker {
  display: none;
}
details.ns-disclosure > summary::after {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--ns-dur-hover) var(--ns-ease-out);
}
details.ns-disclosure[open] > summary::after {
  transform: rotate(45deg);
}
details.ns-disclosure > summary:focus-visible {
  outline: var(--ns-focus-ring-width) solid var(--ns-focus-ring);
  outline-offset: 2px;
}
.ns-disclosure__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--ns-dur-ui) var(--ns-ease-out);
}
.ns-disclosure__body > * {
  min-height: 0;
  overflow: hidden;
}
details.ns-disclosure[open] > .ns-disclosure__body {
  grid-template-rows: 1fr;
}
@starting-style {
  details.ns-disclosure[open] > .ns-disclosure__body {
    grid-template-rows: 0fr;
  }
}

/* P10: one reduced-motion rule, scoped to these tokens and classes only. The alive faces and the
   stage keep their own reduced-motion rules, so there is no global `*` reset here. Sheets keep a
   0ms animation (not `none`) so animationend still fires for pages that wait on it. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --ns-dur-press: 0ms;
    --ns-dur-hover: 0ms;
    --ns-dur-ui: 0ms;
    --ns-dur-ui-out: 0ms;
  }
  .ns-press:active,
  .ns-lift:hover,
  .ns-lift:focus-within,
  .ns-tilt {
    transform: none;
  }
  .ns-sheet-enter,
  .ns-sheet-leave {
    animation-duration: 0ms;
  }
}

/* Mission 270: shared owner/admin presentation. Existing controls keep their hooks. */
.ns-design-system-page { min-width:0; color:var(--ns-text-primary); font-family:var(--ns-font-sans); line-height:var(--ns-leading-normal, 1.5); }
.ns-design-system-page .ns-page-title { color:var(--ns-text-primary); font-size:var(--ns-text-xl, 1.5rem); font-weight:var(--ns-font-bold, 700); line-height:var(--ns-leading-tight, 1.25); overflow-wrap:anywhere; }
.ns-design-system-page h2, .ns-design-system-page h3 { color:var(--ns-text-primary); }
.ns-design-system-page .ns-card { color:var(--ns-text-primary); background:var(--ns-bg-secondary); border:1px solid var(--ns-border); border-radius:var(--ns-radius-lg); }
.ns-design-system-page .ns-btn { border-radius:var(--ns-radius-md); font:inherit; font-weight:var(--ns-font-semibold, 600); min-height:2.5rem; }
.ns-design-system-page .ns-btn:focus-visible, .ns-design-system-page input:focus-visible, .ns-design-system-page select:focus-visible { outline:2px solid var(--ns-accent); outline-offset:2px; }
.ns-design-system-page .form-control, .ns-design-system-page .form-select { color:var(--ns-text-primary); background-color:var(--ns-bg-primary); border-color:var(--ns-border); border-radius:var(--ns-radius-md); }
.ns-design-system-page .ns-table { color:var(--ns-text-primary); --bs-table-color:var(--ns-text-primary); --bs-table-bg:var(--ns-bg-secondary); --bs-table-border-color:var(--ns-border); --bs-table-hover-bg:var(--ns-bg-tertiary); --bs-table-hover-color:var(--ns-text-primary); }
.ns-design-system-page .ns-receipts-table { width:100%; border-collapse:collapse; }
.ns-design-system-page .ns-receipts-table th, .ns-design-system-page .ns-receipts-table td { padding:var(--ns-space-3, .75rem); border-bottom:1px solid var(--ns-border-subtle); vertical-align:top; }
.ns-capability-row { color:inherit; }
.ns-state-chip, .ns-ceiling-pill { display:inline-flex; align-items:center; gap:var(--ns-space-1, .25rem); padding:var(--ns-space-1, .25rem) var(--ns-space-2, .5rem); border:1px solid var(--ns-border); border-radius:var(--ns-radius-full, 9999px); font-size:var(--ns-text-xs, .75rem); font-weight:var(--ns-font-bold, 700); line-height:var(--ns-leading-tight, 1.25); overflow-wrap:anywhere; }
.ns-state-chip--on { color:var(--ns-success); background:var(--ns-success-bg); border-color:var(--ns-success); }
.ns-state-chip--off { color:var(--ns-text-secondary); background:var(--ns-bg-tertiary); }
.ns-state-chip--held, .ns-ceiling-pill { color:var(--ns-warning); background:var(--ns-warning-bg); border-color:var(--ns-warning); }
.ns-state-chip--value { color:var(--ns-info); background:var(--ns-info-bg); }
.ns-state-chip--unknown { color:var(--ns-text-secondary); background:var(--ns-bg-tertiary); }
.ns-page-breadcrumb ol { display:flex; flex-wrap:wrap; gap:var(--ns-space-2, .5rem); padding:0; list-style:none; }
.ns-page-primary-action { display:inline-flex; align-items:center; padding:var(--ns-space-2, .5rem) var(--ns-space-3, .75rem); color:var(--ns-accent-text, var(--ns-bg-primary)); background:var(--ns-accent); text-decoration:none; }
@media (max-width:767.98px) { .ns-design-system-page .hc-head { flex-wrap:wrap; } .ns-design-system-page .hc-readonly { white-space:normal; } .ns-design-system-page .ns-btn { min-height:2.75rem; } }

/* Desk layout rules, using the shared palette. */
/* 375px law: below md the capability rows stack (one card per key) instead of scrolling sideways. */
    @media (max-width: 767.98px) {
        .switchboard-table thead { display: none; }
        .switchboard-table tbody tr { display: block; border-bottom: 1px solid var(--ns-border); padding: .5rem 0; }
        .switchboard-table tbody td { display: block; border: 0; padding: .2rem .75rem; text-align: left !important; min-width: 0 !important; }
        .switchboard-table tbody td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ns-text-secondary); font-size: .8125rem; }
        .switchboard-table tbody td.text-end form { justify-content: flex-start !important; align-items: center; vertical-align: middle; }
        .switchboard-table tbody td code { word-break: break-all; }
    }
.hc-shell { --hc-lit:var(--ns-success); --hc-next:var(--ns-accent); --hc-dark:var(--ns-text-secondary); --hc-dial:var(--ns-info); --hc-bad:var(--ns-error); }
        .hc-shell [x-cloak] { display:none !important; }
        .hc-eyebrow { margin:0 0 5px; color:var(--ns-accent); font-size:.72rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
        .hc-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin:0 0 18px; }
        .hc-head h1 { margin:0; color:var(--ns-text-primary); font-size:1.35rem; }
        .hc-head p { max-width:72ch; margin:6px 0 0; color:var(--ns-text-secondary); font-size:.82rem; }
        .hc-readonly { display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border:1px solid var(--ns-border); border-radius:999px; color:var(--ns-text-secondary); font-size:.76rem; white-space:nowrap; }
        .hc-readonly i { color:var(--ns-success); }
        .hc-section { margin:0 0 26px; }
        .hc-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:0 0 11px; padding:0 0 10px; border-bottom:1px solid var(--ns-border-subtle); }
        .hc-section-head h2 { margin:0; color:var(--ns-text-primary); font-size:1.08rem; }
        .hc-section-head p { max-width:72ch; margin:4px 0 0; color:var(--ns-text-secondary); font-size:.78rem; }
        .hc-count { flex:0 0 auto; padding:4px 8px; border:1px solid var(--ns-border); border-radius:999px; color:var(--ns-text-secondary); font-size:.7rem; white-space:nowrap; }
        .hc-note { display:flex; align-items:flex-start; gap:10px; margin:0 0 14px; padding:12px 14px; border:1px solid color-mix(in srgb,var(--ns-accent) 32%,var(--ns-border)); border-radius:var(--ns-radius-md,8px); background:var(--ns-accent-subtle); color:var(--ns-text-secondary); font-size:.82rem; }
        .hc-note i { margin-top:2px; color:var(--ns-accent); }
        .hc-note.bad { border-color:color-mix(in srgb,var(--hc-bad) 45%,var(--ns-border)); background:color-mix(in srgb,var(--hc-bad) 8%,transparent); }
        .hc-note.bad i { color:var(--hc-bad); }
        .hc-ladder { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; margin:0; padding:0; list-style:none; }
        .hc-rung { position:relative; min-width:0; padding:14px 14px 14px 58px; border:1px solid var(--ns-border); border-radius:var(--ns-radius-lg,12px); background:var(--ns-bg-secondary); }
        .hc-rung-n { position:absolute; left:14px; top:14px; width:32px; height:32px; display:flex; align-items:center; justify-content:center; border:1px solid var(--ns-border); border-radius:50%; color:var(--ns-text-secondary); font-size:.8rem; font-weight:800; }
        .hc-rung[data-rung-lit="1"] { border-color:color-mix(in srgb,var(--hc-lit) 45%,transparent); }
        .hc-rung[data-rung-lit="1"] .hc-rung-n { color:var(--hc-lit); border-color:var(--hc-lit); }
        .hc-rung[data-rung-next="1"] { border-color:var(--hc-next); box-shadow:0 0 0 3px var(--ns-accent-subtle); }
        .hc-rung[data-rung-next="1"] .hc-rung-n { color:var(--ns-accent-text, var(--ns-bg-primary)); background:var(--hc-next); border-color:var(--hc-next); }
        .hc-rung[data-rung-out-of-order="1"] { border-color:var(--hc-bad); }
        .hc-rung-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; flex-wrap:wrap; }
        .hc-flag { min-width:0; margin:0; color:var(--ns-text-primary); font-family:var(--ns-font-mono,ui-monospace,SFMono-Regular,monospace); font-size:.82rem; overflow-wrap:anywhere; }
        .hc-badges { display:flex; gap:6px; flex-wrap:wrap; }
        .hc-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border:1px solid var(--ns-border); border-radius:999px; font-size:.67rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--hc-dark); }
        .hc-badge::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
        .hc-badge.lit { color:var(--hc-lit); border-color:color-mix(in srgb,var(--hc-lit) 45%,transparent); background:color-mix(in srgb,var(--hc-lit) 10%,transparent); }
        .hc-badge.next { color:var(--ns-accent-text, var(--ns-bg-primary)); background:var(--hc-next); border-color:var(--hc-next); }
        .hc-badge.receipt { color:var(--hc-lit); }
        .hc-badge.bad { color:var(--hc-bad); border-color:color-mix(in srgb,var(--hc-bad) 45%,transparent); }
        .hc-change { margin:9px 0 10px; color:var(--ns-text-secondary); font-size:.8rem; line-height:1.5; }
        .hc-facts { display:grid; grid-template-columns:1fr; gap:8px; margin:0; }
        .hc-fact dt { margin:0 0 2px; color:var(--ns-text-secondary); font-size:.65rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
        .hc-fact dd { margin:0; color:var(--ns-text-secondary); font-size:.74rem; overflow-wrap:anywhere; }
        .hc-fact code { color:var(--ns-accent); background:transparent; font-size:.72rem; }
        .hc-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 14px; }
        .hc-stat { min-width:0; padding:13px 14px; border:1px solid var(--ns-border); border-radius:var(--ns-radius-lg,12px); background:var(--ns-bg-secondary); }
        .hc-stat strong { display:block; color:var(--ns-text-primary); font-size:1.35rem; line-height:1.1; }
        .hc-stat span { display:block; margin-top:4px; color:var(--ns-text-secondary); font-size:.72rem; }
        .hc-controls { display:grid; grid-template-columns:1fr; gap:10px; margin:0 0 12px; }
        .hc-control label { display:block; margin:0 0 5px; color:var(--ns-text-secondary); font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
        .hc-control .form-control,.hc-control .form-select { min-height:44px; color:var(--ns-text-primary); border-color:var(--ns-border); background-color:var(--ns-bg-primary); }
        .hc-table-wrap { overflow-x:auto; border:1px solid var(--ns-border); border-radius:var(--ns-radius-lg,12px); background:var(--ns-bg-secondary); }
        .hc-table { width:100%; min-width:760px; margin:0; border-collapse:collapse; font-size:.76rem; }
        .hc-table th { position:sticky; top:0; padding:10px 12px; text-align:left; color:var(--ns-text-secondary); font-size:.65rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; background:var(--ns-bg-secondary); border-bottom:1px solid var(--ns-border); white-space:nowrap; }
        .hc-table td { padding:9px 12px; color:var(--ns-text-secondary); border-bottom:1px solid var(--ns-border-subtle); vertical-align:top; }
        .hc-table tr:last-child td { border-bottom:0; }
        .hc-table td.key { color:var(--ns-text-primary); font-family:var(--ns-font-mono,ui-monospace,SFMono-Regular,monospace); overflow-wrap:anywhere; }
        .hc-table td.stitch { font-family:var(--ns-font-mono,ui-monospace,SFMono-Regular,monospace); font-size:.7rem; overflow-wrap:anywhere; max-width:34ch; }
        .hc-status { display:inline-flex; align-items:center; gap:6px; font-weight:800; font-size:.67rem; letter-spacing:.04em; text-transform:uppercase; color:var(--hc-dark); }
        .hc-status::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
        .hc-status.lit { color:var(--hc-lit); }
        .hc-status.dial { color:var(--hc-dial); }
        .hc-status.unknown { color:var(--hc-bad); }
        .hc-empty { padding:24px 16px; text-align:center; color:var(--ns-text-muted); }
        @media (min-width:768px) {
            .hc-summary { grid-template-columns:repeat(5,minmax(0,1fr)); }
            .hc-controls { grid-template-columns:minmax(220px,1.4fr) repeat(2,minmax(150px,.7fr)); }
            .hc-facts { grid-template-columns:repeat(3,minmax(0,1fr)); }
        }
.m23-summary{display:flex;flex-wrap:wrap;gap:.6rem 1.3rem;margin:1rem 0}.m23-table-wrap{overflow:auto}.m23-table{width:100%;border-collapse:collapse;font-size:.9rem}.m23-table th,.m23-table td{padding:.8rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--ns-border-subtle)}.m23-table th{white-space:nowrap}.m23-table code{overflow-wrap:anywhere}.m23-table td:first-child{min-width:16rem;max-width:30rem}.m23-muted{opacity:.75}.m23-actions{display:grid;gap:.55rem;min-width:12rem}.m23-value{font-weight:700}.m23-family{margin:1.5rem 0}.m23-conflict{border-left:3px solid var(--ns-warning);padding-left:.6rem}.m23-table p{margin:.3rem 0}.m23-probe-result{min-width:13rem;white-space:pre-line;overflow-wrap:anywhere}
/* Mission 270: keep the existing workflow engine usable on narrow screens. */
.ns-design-system-page #workflow-builder-app { color:var(--ns-text-primary); background:var(--ns-bg-primary); }
.ns-design-system-page #workflow-builder-app .workflow-header,
.ns-design-system-page #workflow-builder-app .node-library,
.ns-design-system-page #workflow-builder-app .properties-panel { color:var(--ns-text-primary); background:var(--ns-bg-secondary); border-color:var(--ns-border); }
.ns-design-system-page #workflow-builder-app .canvas-container { background-color:var(--ns-bg-primary); }
.ns-design-system-page #workflow-builder-app .node-item { color:var(--ns-text-primary); background:var(--ns-bg-tertiary); border-radius:var(--ns-radius-md); }
.ns-design-system-page #workflow-builder-app .node-category-title,
.ns-design-system-page #workflow-builder-app .node-item-info p { color:var(--ns-text-secondary); }
.ns-design-system-page #workflow-builder-app .workflow-name-input,
.ns-design-system-page #workflow-builder-app .back-button { color:var(--ns-text-primary); }
@media (max-width:767.98px) {
  .ns-design-system-page #workflow-builder-app * { box-sizing:border-box; }
  .ns-design-system-page #workflow-builder-app .header-container,
  .ns-design-system-page #workflow-builder-app .workflow-title,
  .ns-design-system-page #workflow-builder-app .workflow-actions { min-width:0; flex-wrap:wrap; gap:var(--ns-space-2); }
  .ns-design-system-page #workflow-builder-app .workflow-title { flex-basis:100%; }
  .ns-design-system-page #workflow-builder-app .workflow-name-input { width:100%; max-width:100%; min-width:0; }
  .ns-design-system-page #workflow-builder-app .workflow-actions { margin-right:0; }
  .ns-design-system-page #workflow-builder-app button { min-height:44px; white-space:normal; }
  .ns-design-system-page #workflow-builder-app .workflow-builder { flex-direction:column; height:auto; overflow:visible; }
  .ns-design-system-page #workflow-builder-app .node-library,
  .ns-design-system-page #workflow-builder-app .properties-panel { width:100%; min-width:0; max-width:none; flex:none; max-height:16rem; overflow:auto; border:1px solid var(--ns-border); }
  .ns-design-system-page #workflow-builder-app .canvas-container { flex:none; width:100%; height:28rem; min-height:28rem; }
  .ns-design-system-page #workflow-builder-app .variables-panel-button,
  .ns-design-system-page #workflow-builder-app .execution-history-button { position:static; order:-1; padding:var(--ns-space-2) var(--ns-space-4); }
}
