/* ============================================================
   GateControl Pro Theme CSS
   Clean Corporate Light — Royal Blue Accent (#2563EB), Inter font
   ============================================================ */

/* ============================================================
   SECTION 1: CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Colors — Core */
  --bg-body: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-topbar: #FFFFFF;
  --bg-input: #F8FAFC;
  --bg-input-focus: #FFFFFF;
  --bg-hover: #F1F5F9;
  --bg-active: #EFF6FF;
  --bg-code: #F1F5F9;
  --bg-overlay: rgba(15, 23, 42, 0.45);
  --bg-badge: #F1F5F9;

  /* Colors — Borders */
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --border-focus: #2563EB;
  --border-input: #CBD5E1;

  /* Colors — Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;
  --text-link: #2563EB;

  /* Colors — Accent (Royal Blue) */
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #EFF6FF;
  --accent-lighter: #DBEAFE;
  --accent-border: #BFDBFE;
  --accent-text: #1E40AF;

  /* Colors — Status */
  --green: #10B981;
  --green-light: #ECFDF5;
  --green-border: #A7F3D0;
  --green-text: #065F46;

  --red: #EF4444;
  --red-light: #FEF2F2;
  --red-border: #FECACA;
  --red-text: #991B1B;

  --amber: #F59E0B;
  --amber-light: #FFFBEB;
  --amber-border: #FDE68A;
  --amber-text: #92400E;

  --blue: #3B82F6;
  --blue-light: #EFF6FF;
  --blue-border: #BFDBFE;
  --blue-text: #1E40AF;

  --purple: #8B5CF6;
  --purple-light: #F5F3FF;
  --purple-border: #DDD6FE;
  --purple-text: #5B21B6;

  --cyan: #06B6D4;
  --cyan-light: #ECFEFF;

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

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-lg: 1rem;
  --text-xl: 1.125rem;
  --text-2xl: 1.375rem;
  --text-3xl: 1.75rem;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

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

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

  /* Layout */
  --sidebar-w: 252px;
  --sidebar-collapsed: 68px;
  --topbar-h: 60px;
  --nav-h: 60px;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition: 180ms ease;
  --transition-slow: 280ms ease;

  /* Legacy alias variables — map old default theme vars to Pro vars */
  --bg-base: var(--bg-body);
  --bg-panel: var(--bg-card);
  --bg-hover: #F1F5F9;
  --bg-input: #F8FAFC;
  --border-hi: var(--border-input);
  --text-1: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-3: var(--text-muted);
  --font-ui: var(--font-sans);
  --font-display: var(--font-sans);
  --accent-lt: var(--accent-light);
  --accent-md: var(--accent-lighter);
  --green-lt: var(--green-light);
  --green-bd: var(--green-border);
  --red-lt: var(--red-light);
  --red-bd: var(--red-border);
  --amber-lt: var(--amber-light);
  --amber-bd: var(--amber-border);
  --blue-lt: var(--blue-light);
  --blue-bd: var(--blue-border);
  --purple-lt: var(--purple-light);
  --purple-bd: var(--purple-border);
}

/* ============================================================
   SECTION 2: RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-body);
  min-height: 100vh;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-input); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selection */
::selection { background: var(--accent-lighter); color: var(--accent-text); }

/* ============================================================
   SECTION 3: APP SHELL
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.shell {
  flex: 1;
  display: flex;
}

/* ============================================================
   SECTION 4: SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
  overflow-y: auto;
  padding: 0;
  flex-shrink: 0;
}

.sidebar-header {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  border-bottom: 1px solid var(--border);
  gap: var(--space-3);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar-brand span {
  color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-3);
}

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

.nav-group-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 var(--space-3);
  margin-bottom: var(--space-2);
}

/* nav-section-label: alias for old default theme class */
.nav-section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-4) var(--space-4) var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  margin: 1px 0;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: var(--weight-semibold);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  background: var(--bg-badge);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

.nav-badge.green {
  background: var(--green-light);
  border-color: var(--green-border);
  color: var(--green-text);
}

.nav-item.active .nav-badge {
  background: var(--accent-lighter);
  color: var(--accent-text);
}

.sidebar-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-footer-card,
.sidebar-gateway-info {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}

.sidebar-footer-card strong {
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
}

.gw-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.gw-host {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: var(--weight-semibold);
}

.gw-wg {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* ============================================================
   SECTION 5: TOPBAR
   ============================================================ */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
}

.main {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.topbar {
  height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-8);
  gap: var(--space-4);
  position: sticky;
  top: 0;
  z-index: 90;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: white;
}

.logo-icon svg { width: 16px; height: 16px; }

.logo-wordmark {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.topbar-spacer { flex: 1; }

.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.topbar-hamburger:hover {
  background: var(--bg-hover);
}

.topbar-hamburger svg {
  width: 22px;
  height: 22px;
}

.topbar-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.topbar-search {
  margin-left: auto;
  position: relative;
  width: 260px;
}

.topbar-search input {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-4) 0 36px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition);
  outline: none;
  font-family: var(--font-sans);
}

.topbar-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--bg-card);
}

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

.topbar-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

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

.topbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.topbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.topbar-btn svg { width: 20px; height: 20px; }

.topbar-btn .badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-topbar);
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 var(--space-2);
}

/* Topbar language switcher */
.topbar-lang {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
}

.lang-btn {
  padding: 3px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  cursor: pointer;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

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

.lang-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* Topbar status pill */
.topbar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green-text);
  font-weight: var(--weight-medium);
}

.topbar-status.inactive {
  background: var(--red-light);
  border-color: var(--red-border);
  color: var(--red-text);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 2.5s ease infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Topbar profile dropdown */
.topbar-profile { position: relative; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-1);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.topbar-user:hover { background: var(--bg-hover); }

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-lighter);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}

.topbar-username {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.topbar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: fadeIn 120ms ease;
  overflow: hidden;
}

.topbar-dropdown.open { display: block; }

.topbar-dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-body);
}

.topbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font-sans);
  transition: background var(--transition-fast);
}

.topbar-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.topbar-dropdown-item svg { width: 15px; height: 15px; flex-shrink: 0; }

.topbar-dropdown-logout { color: var(--red); }
.topbar-dropdown-logout:hover { background: var(--red-light); color: var(--red); }

.topbar-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.warning { background: var(--amber); }
.status-dot.error { background: var(--red); }

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

/* ============================================================
   SECTION 6: PAGE CONTENT & HEADERS
   ============================================================ */
.page-content {
  flex: 1;
  padding: var(--space-8);
  max-width: 1400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

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

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

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

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
}

.page-sub,
.page-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: var(--weight-normal);
}

/* ============================================================
   SECTION 7: CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}

.card-head,
.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-body);
  justify-content: space-between;
}

.card-title,
.card-header-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
  font-family: var(--font-mono);
}

.card-body {
  padding: var(--space-5) var(--space-6);
}

.card-body.no-pad { padding: 0; }

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.35s ease backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }

.stat-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

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

.stat-card-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
}

.stat-card-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  font-family: var(--font-mono);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon svg { width: 18px; height: 18px; }

.stat-card-icon.blue { background: var(--blue-light); color: var(--blue-text); }
.stat-card-icon.green { background: var(--green-light); color: var(--green-text); }
.stat-card-icon.amber { background: var(--amber-light); color: var(--amber-text); }
.stat-card-icon.red { background: var(--red-light); color: var(--red-text); }
.stat-card-icon.purple { background: var(--purple-light); color: var(--purple-text); }

.stat-card-change {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stat-card-change.positive { color: var(--green-text); }
.stat-card-change.negative { color: var(--red-text); }

/* Legacy stat classes from default theme */
.stat-card-stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.stat-icon svg { width: 14px; height: 14px; }

.stat-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: var(--weight-medium);
}

.stat-delta {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: var(--weight-semibold);
}

/* stat dot indicators */
.stat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.stat-dot-green { background: var(--green); }
.stat-dot-red { background: var(--red); }
.stat-dot-amber { background: var(--amber); }
.stat-dot-blue { background: var(--blue); }
.stat-dot-purple { background: var(--purple); }

/* ============================================================
   SECTION 9: LAYOUT GRIDS
   ============================================================ */
.two-col   { display: grid; grid-template-columns: 1fr 360px; gap: var(--space-5); }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-5); }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-6);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }

/* ============================================================
   SECTION 10: BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 16px; height: 16px; }

.btn.is-loading {
  pointer-events: none;
  opacity: 0.65;
  position: relative;
}

.btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btnSpin 0.5s linear infinite;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

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

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

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

.btn-link {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.btn-amber {
  background: var(--amber-light);
  color: var(--amber-text);
  border-color: var(--amber-border);
}

.btn-amber:hover {
  background: var(--amber);
  color: #fff;
  border-color: var(--amber);
}

.btn-green {
  background: var(--green-light);
  color: var(--green-text);
  border-color: var(--green-border);
}

.btn-green:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.btn-danger {
  background: var(--red);
  color: var(--text-inverse);
  border-color: var(--red);
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
}

.btn-green {
  background: var(--green);
  color: var(--text-inverse);
  border-color: var(--green);
}

.btn-green:hover { opacity: 0.9; }

.btn-sm {
  height: 30px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

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

.btn-icon {
  width: 36px;
  padding: 0;
}

.btn-icon.btn-sm { width: 30px; }

/* Icon button (small square) */
.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-input); }
.icon-btn svg { width: 12px; height: 12px; }

/* ============================================================
   SECTION 11: TAGS & BADGES
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-medium);
  background: var(--bg-body);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.tag-green  { background: var(--green-light);  color: var(--green-text);  border: 1px solid var(--green-border); }
.tag-red    { background: var(--red-light);    color: var(--red-text);    border: 1px solid var(--red-border); }
.tag-amber  { background: var(--amber-light);  color: var(--amber-text);  border: 1px solid var(--amber-border); }
.tag-blue   { background: var(--blue-light);   color: var(--blue-text);   border: 1px solid var(--blue-border); }
.tag-grey   { background: var(--bg-body);      color: var(--text-secondary); border: 1px solid var(--border); }
.tag-info   { background: var(--bg-hover);     color: var(--text-secondary); border: 1px solid var(--border); margin-left: 4px; }
.tag-purple { background: var(--purple-light); color: var(--purple-text); border: 1px solid var(--purple-border); }
.tag-neutral { background: var(--bg-body);     color: var(--text-secondary); border: 1px solid var(--border); }

.tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-green  { background: var(--green-light);  color: var(--green-text); }
.badge-red    { background: var(--red-light);    color: var(--red-text); }
.badge-amber  { background: var(--amber-light);  color: var(--amber-text); }
.badge-blue   { background: var(--blue-light);   color: var(--blue-text); }
.badge-purple { background: var(--purple-light); color: var(--purple-text); }
.badge-gray   { background: var(--bg-badge);     color: var(--text-secondary); }

/* ============================================================
   SECTION 12: FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: 14px;
}

.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  display: block;
  margin-bottom: 5px;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-row > .form-group {
  flex: 1;
  min-width: 0;
}

.form-input,
.form-select,
.form-textarea {
  height: 38px;
  padding: 0 var(--space-3);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: all var(--transition);
  outline: none;
  width: 100%;
}

.form-textarea {
  height: auto;
  min-height: 80px;
  padding: var(--space-3);
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--bg-input-focus);
}

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

.form-error {
  font-size: var(--text-xs);
  color: var(--red);
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--red-light);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
}

.field-error {
  font-size: 11px;
  color: var(--red);
  margin-top: 4px;
}

.field-invalid { border-color: var(--red) !important; }

/* Native input fallback */
input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], select {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type=search] { padding-left: 32px; }

input[type=text]:focus,
input[type=search]:focus,
input[type=password]:focus,
input[type=email]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="file"] {
  font-size: 12px;
  padding: 6px 0;
  color: var(--text-secondary);
}

.input-wrap { position: relative; }
.input-wrap svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-input);
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  accent-color: var(--accent);
}

.checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8l3 3 5-5'/%3E%3C/svg%3E");
}

/* ============================================================
   SECTION 13: TOGGLE SWITCHES
   ============================================================ */
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--border-input);
  border-radius: var(--radius-full);
  transition: background var(--transition);
}

/* CSS-class-based toggle (used by app.js — .toggle.on) */
.toggle.on { background: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.toggle.on::after { transform: translateX(18px); }

/* Input-based toggle (label.toggle > input + .toggle-slider) */
.toggle:has(input) {
  background: transparent;
}

.toggle:has(input)::after {
  display: none;
}

.toggle input { display: none; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-input);
  border-radius: var(--radius-full);
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-xs);
}

.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Toggle button group */
.toggle-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-body);
}

.toggle-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  outline: none;
}

.toggle-btn:not(:last-child) { border-right: 1px solid var(--border); }
.toggle-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.toggle-btn.on,
.toggle-btn.active {
  background: var(--accent);
  color: var(--text-inverse);
}

/* ============================================================
   SECTION 14: TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
}

.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-sans);
  white-space: nowrap;
  border-radius: 0;
}

.tab:hover { color: var(--text-primary); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: var(--weight-semibold);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   SECTION 15: TABLES
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

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

table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-body);
}

table tbody td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

table tbody tr { transition: background var(--transition-fast); }
table tbody tr:hover { background: var(--bg-hover); }
table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   SECTION 16: PEER TABLE
   ============================================================ */
.peer-table {
  width: 100%;
  border-collapse: collapse;
}

.peer-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--bg-body);
}

.peer-table td {
  padding: 12px var(--space-5);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.peer-table tr:last-child td { border-bottom: none; }
.peer-table tr:hover td { background: var(--bg-hover); }

.peer-row { transition: background var(--transition-fast); }

.peers-desktop { display: block; }
.peers-mobile { display: none; }

.peer-name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.peer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.peer-actions { display: flex; gap: 4px; align-items: center; }

/* Peer mobile cards */
.peer-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.peer-card:last-child { border-bottom: none; }
.peer-card:hover { background: var(--bg-hover); }

.peer-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.peer-card-info { flex: 1; min-width: 0; }

.peer-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.peer-card-meta span { white-space: nowrap; }

.peer-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* User actions */
.user-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* ============================================================
   SECTION 17: ROUTE ITEMS
   ============================================================ */
.route-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

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

.route-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: all var(--transition-fast);
}

.route-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.route-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.route-row:last-child { border-bottom: none; }

.route-icon {
  width: 34px;
  height: 34px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.route-icon svg { width: 15px; height: 15px; }
.route-domain { font-family: var(--font-mono); font-size: 12.5px; font-weight: var(--weight-semibold); color: var(--accent); }
.route-target { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.route-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-basis: 100%; padding-left: 46px; order: 1; }
.route-actions { margin-left: auto; display: flex; gap: 5px; flex-shrink: 0; }

/* ============================================================
   SECTION 18: ACTIVITY FEED
   ============================================================ */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

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

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: var(--accent);
}

.activity-text {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  flex: 1;
}

.activity-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* ============================================================
   SECTION 19: MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  animation: fadeIn 180ms ease;
}

/* default theme uses display:none + no flex; Pro uses .open to show */
/* Support both patterns */
.modal-overlay[style*="display:none"],
.modal-overlay[style*="display: none"] {
  display: none !important;
}

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

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.modal-sm { max-width: 380px; }
.modal.modal-wide { max-width: 780px; }
.modal.modal-wide .modal-body { min-height: 420px; }
.modal.modal-xl { max-width: 960px; }

.modal-head,
.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-size: 20px;
}

.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-foot,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-body);
  flex-shrink: 0;
}

/* ============================================================
   SECTION 20: FLASH MESSAGES
   ============================================================ */
.flash {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  z-index: 10000;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid transparent;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.flash.toast-visible,
.flash.flash-visible {
  opacity: 1;
  transform: translateY(0);
}

.flash-success {
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-left-color: var(--green);
  color: var(--green-text);
}

.flash-error {
  background: var(--red-light);
  border: 1px solid var(--red-border);
  border-left-color: var(--red);
  color: var(--red-text);
}

/* Also support inline flash (non-toast) */
.flash-inline {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  position: static;
  opacity: 1;
  transform: none;
  box-shadow: none;
  min-width: unset;
  max-width: unset;
}

/* ============================================================
   SECTION 21: TOAST NOTIFICATIONS (explicit toast class)
   ============================================================ */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  min-width: 300px;
  animation: slideInRight 250ms cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 400px;
}

.toast.success,
.toast-success { background: var(--green-light); color: var(--green-text); border: 1px solid var(--green-border); border-left: 3px solid var(--green); }
.toast.error,
.toast-error   { background: var(--red-light);   color: var(--red-text);   border: 1px solid var(--red-border);   border-left: 3px solid var(--red); }
.toast.warning { border-left: 3px solid var(--amber); }
.toast.info    { border-left: 3px solid var(--blue); }

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

/* ============================================================
   SECTION 22: SIDEBAR TOGGLE & OVERLAY (mobile)
   ============================================================ */
.sidebar-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.sidebar-toggle:hover { background: var(--bg-hover); }

.sidebar-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-toggle svg { color: var(--text-primary); }
.sidebar-toggle[aria-expanded="true"] .hamburger-icon { display: none; }
.sidebar-toggle[aria-expanded="true"] .hamburger-close { display: block !important; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 59;
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.visible {
  display: block;
  opacity: 1;
}

/* ============================================================
   SECTION 23: BOTTOM NAV (mobile)
   ============================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
}

.bottom-nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  min-width: 60px;
  text-decoration: none;
}

.bn-item.active { color: var(--accent); }
.bn-item svg { width: 20px; height: 20px; }

/* ============================================================
   SECTION 24: FAB SPEED DIAL (mobile)
   ============================================================ */
.fab-wrap {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 18px;
  z-index: 102;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.fab {
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: white;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  display: grid;
  place-items: center;
  transition: transform 0.2s, box-shadow 0.15s;
}

.fab:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45); }
.fab svg { width: 22px; height: 22px; }
.fab .fab-icon-close { display: none; }

.fab-wrap.open .fab { background: var(--text-secondary); }
.fab-wrap.open .fab .fab-icon-plus { display: none; }
.fab-wrap.open .fab .fab-icon-close { display: block; }

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.fab-wrap.open .fab-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fab-option {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.fab-option-label {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.fab-option-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.fab-option-icon svg { width: 18px; height: 18px; }
.fab-option:hover .fab-option-label { background: var(--bg-hover); }

.fab-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 101;
}

.fab-backdrop.open { display: block; }

/* ============================================================
   SECTION 25: BATCH BAR
   ============================================================ */
.batch-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  max-width: calc(100vw - 24px);
  /* JS controls visibility via inline style.display — do NOT set display:none here */
}
.batch-bar span { white-space: nowrap; }

.batch-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

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

/* ============================================================
   SECTION 26: FEATURE LOCKED
   ============================================================ */
.feature-locked {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.feature-locked .lock-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.limit-badge {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
}

.limit-badge.at-limit {
  color: var(--amber-text);
  font-weight: var(--weight-semibold);
}

/* ============================================================
   SECTION 27: SETTINGS TABS (extracted from settings.njk)
   ============================================================ */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow: visible;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
  flex-shrink: 0;
}

.settings-tabs .tab {
  padding: 10px 18px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  border-radius: 0;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.settings-tabs .tab:hover { color: var(--text-primary); }

.settings-tabs .tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: none;
  box-shadow: none;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-tab-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--font-sans);
}

.settings-tab-toggle svg {
  flex-shrink: 0;
  transition: transform 0.2s;
  margin-left: auto;
}

.settings-tab-toggle.open svg { transform: rotate(180deg); }

.settings-tab-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 20;
  flex-direction: column;
}

.settings-tab-dropdown.open { display: flex; }

.settings-tab-dropdown .tab {
  padding: 12px 16px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  margin-bottom: 0;
}

.settings-tab-dropdown .tab:last-child { border-bottom: none; }
.settings-tab-dropdown .tab:hover { background: var(--bg-hover); color: var(--text-primary); }

.settings-tab-dropdown .tab.active {
  color: var(--accent);
  background: none;
  font-weight: var(--weight-semibold);
  border-left: 3px solid var(--accent);
  box-shadow: none;
}

/* ============================================================
   SECTION 28: USER WIZARD STEPS (users.njk tw-step)
   ============================================================ */
.tw-step {
  animation: fadeUp 0.25s ease both;
}

.tw-preset-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-card);
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
}

.tw-preset-label:hover { border-color: var(--accent-border); background: var(--accent-light); }

.tw-preset-label input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   SECTION 29: METERS & PROGRESS
   ============================================================ */
.meter {
  height: 6px;
  background: var(--bg-body);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.meter-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.meter-bar.blue   { background: var(--accent); }
.meter-bar.green  { background: var(--green); }
.meter-bar.amber  { background: var(--amber); }
.meter-bar.red    { background: var(--red); }

/* ============================================================
   SECTION 30: CHARTS
   ============================================================ */
.chart-wrap {
  height: 120px;
  position: relative;
  margin-top: 10px;
}

.chart-svg { width: 100%; height: 100%; }

.chart-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-muted);
}

.chart-area {
  width: 100%;
  height: 260px;
  background: linear-gradient(180deg, var(--accent-light) 0%, transparent 100%);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.chart-area svg { width: 100%; height: 100%; }

/* ============================================================
   SECTION 31: FEATURE GRID
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.feature-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.feature-cell:nth-child(odd) { border-right: 1px solid var(--border); }
.feature-cell:nth-last-child(1),
.feature-cell:nth-last-child(2) { border-bottom: none; }

/* ============================================================
   SECTION 32: WG CONFIG
   ============================================================ */
.wg-config {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--text-secondary);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  white-space: pre-wrap;
  word-break: break-all;
}

.wg-section { color: var(--accent); font-weight: var(--weight-bold); }
.wg-key     { color: var(--blue); }
.wg-val     { color: var(--text-primary); }
.wg-comment { color: var(--text-muted); font-style: italic; }

/* ============================================================
   SECTION 33: EMPTY STATE & TOOLBAR
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

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

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.toolbar-search input {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-4) 0 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.toolbar-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.toolbar-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.toolbar-filter {
  display: flex;
  gap: var(--space-1);
  background: var(--bg-body);
  border-radius: var(--radius);
  padding: 2px;
  border: 1px solid var(--border);
}

.toolbar-filter button {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.toolbar-filter button.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   SECTION 34: VM GRID (RDP)
   ============================================================ */
.vm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vm-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-xs); position: relative; transition: border-color var(--transition-fast); }
.vm-card:hover { border-color: var(--accent-border); }
.vm-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.vm-name { font-size: 14px; font-weight: var(--weight-bold); color: var(--text-primary); }
.vm-host { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 2px; }
.vm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.vm-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-secondary); }
.vm-meta-row { display: flex; justify-content: space-between; align-items: center; }
.vm-actions { display: flex; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.vm-fav { position: absolute; top: 14px; right: 16px; cursor: pointer; font-size: 16px; color: var(--text-muted); background: none; border: none; padding: 0; }
.vm-fav.active { color: var(--amber-text); }

.history-table { width: 100%; border-collapse: collapse; }
.history-table th { text-align: left; font-size: 11px; font-weight: var(--weight-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; padding: 8px 12px; border-bottom: 2px solid var(--border); }
.history-table td { padding: 10px 12px; font-size: 12px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover { background: var(--bg-hover); }

/* ============================================================
   SECTION 35: UTILITY CLASSES
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.ml-auto { margin-left: auto; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.font-medium { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   SECTION 36: ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

/* ============================================================
   SECTION 37: RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .vm-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .main-wrap {
    margin-left: 0;
  }
  .topbar-hamburger {
    display: flex;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  /* Show sidebar toggle button */
  .sidebar-toggle { display: flex; }

  /* Sidebar: off-screen by default, slides in */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  .bottom-nav  { display: flex; }
  .fab-wrap    { display: flex; }
  .main        { padding: 16px; padding-bottom: 80px; }
  .page-header { flex-direction: column; }
  .page-header .btn { align-self: flex-start; }
  .three-col   { grid-template-columns: 1fr; }
  .peers-desktop { display: none; }
  .peers-mobile  { display: block; }
  .card        { overflow: visible; }
  .topbar-lang { display: none; }

  .modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); margin: 8px; }
  .modal-overlay { align-items: flex-start; padding: 8px 0; overflow-y: auto; }
  .modal-head  { padding: 12px 16px; position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
  .modal-foot  { padding: 10px 16px; position: sticky; bottom: 0; background: var(--bg-card); z-index: 1; }
  .modal-body  { padding: 16px; }

  .route-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    position: relative;
    padding-right: 100px;
  }

  .route-tags {
    width: 100%;
    padding-left: 46px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .route-tags::-webkit-scrollbar { display: none; }

  .route-actions {
    position: absolute;
    right: 0;
    top: 12px;
  }

  .feature-grid { grid-template-columns: 1fr; }
  .feature-cell:nth-child(odd) { border-right: none; }

  .batch-bar {
    bottom: 76px;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    width: calc(100vw - 24px);
  }

  .batch-bar > div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
  .batch-bar .btn  { font-size: 12px; padding: 6px 10px; }

  /* Settings tabs: hamburger dropdown mode */
  .settings-tabs {
    position: relative;
    border-bottom: none;
    margin-bottom: 16px;
  }
  .settings-tabs > .tab { display: none; }
  .settings-tab-toggle  { display: flex; }
}

@media (max-width: 768px) {
  #users-table thead { display: none !important; }
  #users-table { display: block !important; }
  #users-table tbody { display: block !important; }
  #users-table tr { display: block !important; padding: 14px 16px !important; border-bottom: 1px solid var(--border) !important; margin-bottom: 0 !important; }
  #users-table td { display: block !important; padding: 2px 0 !important; border: none !important; font-size: 13px !important; background: none !important; width: 100% !important; }
  #users-table td:first-child { font-size: 15px !important; font-weight: var(--weight-semibold) !important; margin-bottom: 4px !important; }
  #users-table td:empty { display: none !important; }
  #users-table .user-actions { justify-content: flex-start !important; margin-top: 8px !important; padding-top: 8px !important; border-top: 1px solid var(--border) !important; }
  .form-row { flex-direction: column; gap: 0; grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-content  { padding: var(--space-4); }
  .page-header   { flex-direction: column; align-items: flex-start; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .grid-2        { grid-template-columns: 1fr; }
  .grid-3        { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar-status span { display: none; }
  .topbar-divider { display: none; }
}

@media (max-width: 800px) {
  .vm-grid { grid-template-columns: 1fr; }
}

/* ─── JS-Rendered Component Compatibility ───────────────── */

/* Alert banners (routes.js hint banner) */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.alert-info {
  background: var(--blue-light);
  color: var(--blue-text);
  border-color: var(--blue-border);
  border-left: 3px solid var(--blue);
}

.alert-success {
  background: var(--green-light);
  color: var(--green-text);
  border-color: var(--green-border);
  border-left: 3px solid var(--green);
}

.alert-error {
  background: var(--red-light);
  color: var(--red-text);
  border-color: var(--red-border);
  border-left: 3px solid var(--red);
}

/* Route trace entries (routes.js) */
.trace-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border);
}

.trace-entry:last-child { border-bottom: none; }

/* Checkbox helpers — RDP user picker & TailWire scope picker */
.rdp-user-cb,
.tw-scope-cb {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
