/* ============================================
   CSS VARIABLES & THEME SYSTEM
   ============================================ */

:root {
  /* ===== DARK THEME ===== */
  /* Core backgrounds */
  --dark-bg-primary: #0F0817;           /* Deep purple-black base */
  --dark-bg-secondary: #1A0F2E;         /* Slightly lighter purple */
  --dark-bg-elevated: #251838;          /* Elevated surfaces */
  --dark-bg-glass: rgba(37, 24, 56, 0.7); /* Glassmorphism */
  
  /* Surface colors */
  --dark-surface: rgba(42, 28, 66, 0.5);
  --dark-surface-hover: rgba(56, 38, 85, 0.7);
  --dark-surface-active: rgba(70, 48, 104, 0.8);
  
  /* Borders */
  --dark-border: rgba(0, 229, 255, 0.15);
  --dark-border-hover: rgba(0, 229, 255, 0.35);
  --dark-border-strong: rgba(0, 229, 255, 0.5);
  
  /* Text colors */
  --dark-text-primary: #FFFFFF;
  --dark-text-secondary: #B8B4C8;
  --dark-text-muted: #7A7690;
  
  /* Accent colors */
  --dark-accent-primary: #a569ff;       /* Electric cyan */
  --dark-accent-secondary: #9D4EDD;     /* Bright purple */
  --dark-accent-tertiary: #FF006E;      /* Hot pink */
  
  /* ===== LIGHT THEME ===== */
  /* Core backgrounds */
  --light-bg-primary: #F5F4F8;          /* Soft lavender-grey */
  --light-bg-secondary: #E8E6F0;        /* Slightly darker */
  --light-bg-elevated: #FFFFFF;         /* Pure white elevated */
  --light-bg-glass: rgba(255, 255, 255, 0.9);
  
  /* Surface colors */
  --light-surface: rgba(255, 255, 255, 0.8);
  --light-surface-hover: rgba(232, 230, 240, 0.9);
  --light-surface-active: rgba(210, 205, 225, 0.9);
  
  /* Borders */
  --light-border: rgba(0, 96, 100, 0.15);
  --light-border-hover: rgba(0, 96, 100, 0.3);
  --light-border-strong: rgba(0, 96, 100, 0.5);
  
  /* Text colors */
  --light-text-primary: #1A0F2E;
  --light-text-secondary: #4A4458;
  --light-text-muted: #6E677D;
  
  /* Accent colors */
  --light-accent-primary: #006064;      /* Deep teal */
  --light-accent-secondary: #7B2CBF;    /* Rich purple */
  --light-accent-tertiary: #D00060;     /* Deep pink */
  
  /* ===== STATUS COLORS (shared) ===== */
  --status-success: #10B981;
  --status-warning: #F59E0B;
  --status-error: #EF4444;
  --status-info: #06B6D4;
  
  /* ===== SHADOWS ===== */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
  
  /* Glow effects */
  --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.4);
  --glow-purple: 0 0 20px rgba(157, 78, 221, 0.4);
  
  /* ===== SPACING ===== */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 0.75rem;   /* 12px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  
  /* ===== BORDER RADIUS ===== */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* ===== TYPOGRAPHY ===== */
  --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  /* ===== DEFAULT TO DARK THEME ===== */
  --bg-primary: var(--dark-bg-primary);
  --bg-secondary: var(--dark-bg-secondary);
  --bg-elevated: var(--dark-bg-elevated);
  --bg-glass: var(--dark-bg-glass);
  --surface: var(--dark-surface);
  --surface-hover: var(--dark-surface-hover);
  --surface-active: var(--dark-surface-active);
  --border: var(--dark-border);
  --border-hover: var(--dark-border-hover);
  --border-strong: var(--dark-border-strong);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --text-muted: var(--dark-text-muted);
  --accent-primary: var(--dark-accent-primary);
  --accent-secondary: var(--dark-accent-secondary);
  --accent-tertiary: var(--dark-accent-tertiary);
}

/* Light theme application */
[data-theme="light"] {
  --bg-primary: var(--light-bg-primary);
  --bg-secondary: var(--light-bg-secondary);
  --bg-elevated: var(--light-bg-elevated);
  --bg-glass: var(--light-bg-glass);
  --surface: var(--light-surface);
  --surface-hover: var(--light-surface-hover);
  --surface-active: var(--light-surface-active);
  --border: var(--light-border);
  --border-hover: var(--light-border-hover);
  --border-strong: var(--light-border-strong);
  --text-primary: var(--light-text-primary);
  --text-secondary: var(--light-text-secondary);
  --text-muted: var(--light-text-muted);
  --accent-primary: var(--light-accent-primary);
  --accent-secondary: var(--light-accent-secondary);
  --accent-tertiary: var(--light-accent-tertiary);
  
  --shadow-sm: 0 2px 8px rgba(26, 15, 46, 0.08);
  --shadow-md: 0 4px 16px rgba(26, 15, 46, 0.12);
  --shadow-lg: 0 8px 32px rgba(26, 15, 46, 0.16);
  --shadow-xl: 0 16px 48px rgba(26, 15, 46, 0.2);
  
  --glow-cyan: 0 0 20px rgba(0, 96, 100, 0.3);
  --glow-purple: 0 0 20px rgba(123, 44, 191, 0.3);
}

/* ============================================
   GLOBAL RESETS & BASE STYLES
   ============================================ */

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

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

body {
  font-family: var(--font-primary);
  background: url(./bg-lVkVDJ9y.png) no-repeat center/cover;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* Utilities */
.hidden { 
  display: none !important; 
}

/* ============================================
   TOP NAVIGATION BAR
   ============================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background-color: #150524;
}

.topbar-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

/* Brand Section */
.brand-section {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 2;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: rgb(222, 210, 255);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 2px;
      width: 8.5645rem;
    height: 2.25rem;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Topbar Actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-warning);
  animation: pulse-dot 2s ease-in-out infinite;
}

.connection-status.connected .status-indicator {
  background: var(--status-success);
}

.connection-status.error .status-indicator {
  background: var(--status-error);
}

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

.status-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Icon Button */
.icon-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.icon-btn:active {
  transform: translateY(0);
}

.icon-btn i {
  transition: transform var(--transition-normal);
}

.icon-btn:hover i {
  transform: rotate(20deg);
}

/* Primary Button */
.btn-primary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(272deg,#9a23e6,#5519ee);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--glow-cyan);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-wrapper {
  flex: 1;
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  gap: var(--space-xl);
  padding: var(--space-xl);
}



.form-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.form-grid {
  display: grid;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-field label i {
  color: var(--accent-primary);
  font-size: 0.875rem;
}

.form-field input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.form-field input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

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

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--space-sm);
}

.btn-success,
.btn-danger {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-success {
  background: var(--status-success);
  color: white;
}

.btn-success:hover {
  background: #0EA574;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--status-error);
  color: white;
}

.btn-danger:hover {
  background: #DC2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.form-message {
  min-height: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.form-message.ok {
  color: var(--status-success);
  background: rgba(16, 185, 129, 0.1);
}

.form-message.err {
  color: var(--status-error);
  background: rgba(239, 68, 68, 0.1);
}

.settings-hint {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
}

.settings-hint i {
  color: var(--accent-primary);
  margin-top: 2px;
}

/* Main Content */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

/* Section Headers */
.section-header {
  margin-bottom: var(--space-lg);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-title i {
  color: var(--accent-primary);
}

/* ============================================
   METRICS GRID
   ============================================ */

.metrics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.metric-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 0;
  border-radius: 20px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  background-color: #302b4433;
  color: var(--c-white);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, var(--surface-hover) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-icon {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.metric-icon.cyan {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-primary);
}

.metric-icon.purple {
  background: rgba(157, 78, 221, 0.15);
  color: var(--accent-secondary);
}

.metric-icon.orange {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-warning);
}

.metric-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-success);
}

.metric-icon.blue {
  background: rgba(6, 182, 212, 0.15);
  color: var(--status-info);
}

.metric-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
}

/* ============================================
   CHARTS SECTION
   ============================================ */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--space-lg);
}

.chart-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 0;
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
    background-color: #302b4433;
  color: var(--c-white);
}

.chart-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-xl);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.chart-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-title i {
  color: var(--accent-primary);
}

.chart-badge {
  padding: 4px 12px;
  background: var(--accent-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: var(--radius-full);
}

.chart-wrapper {
  position: relative;
  height: 240px;
  width: 100%;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Chart tooltip */
.chart-tip {
  position: fixed;
  z-index: 1000;
  background: var(--bg-elevated);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  box-shadow: var(--shadow-xl);
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.chart-tip .k {
  color: var(--text-muted);
  margin-right: var(--space-sm);
  font-weight: 500;
}

.chart-tip strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================
   NODES TABLE
   ============================================ */

.nodes-table-wrapper {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.nodes-table {
  width: 100%;
}

/* Table Header */
.list-head {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-elevated);
  border-bottom: 2px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Table Row */
.nodes-table .row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-fast);
}

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

.nodes-table .row:hover {
  background: var(--surface-hover);
}

.nodes-table .name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.nodes-table .latest {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.nodes-table .latency {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* Status Pills */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pill.ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-success);
  border-color: var(--status-success);
}

.pill.warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-warning);
  border-color: var(--status-warning);
}

.pill.err {
  background: rgba(239, 68, 68, 0.15);
  color: var(--status-error);
  border-color: var(--status-error);
}

/* Empty State */
.nodes-table .empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
  min-height: 240px;
}

.empty .icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty .title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.empty .hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   SKELETON LOADING STATES
   ============================================ */

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

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

.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-hover) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
}

/* Metrics loading state */
#net-stats.is-loading .metric-icon {
  animation: skeleton-pulse 2s ease-in-out infinite;
}

#net-stats.is-loading .metric-value {
  display: inline-block;
  width: 100px;
  height: 1.75rem;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-hover) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Nodes table loading state */
.nodes-table.is-loading .row {
  animation: skeleton-pulse 2s ease-in-out infinite;
}

.nodes-table.is-loading .skeleton-line {
  display: inline-block;
  height: 1rem;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-hover) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Chart loading state */
.chart-card[data-loading="1"] canvas {
  opacity: 0;
}

.chart-card[data-loading="1"]::after {
  content: '';
  position: absolute;
  bottom: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
  height: 180px;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-hover) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
  border-radius: var(--radius-md);
}

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

.app-footer {
  margin-top: auto;
  padding: var(--space-xl);
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

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

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

/* Large tablets and small desktops */
@media (max-width: 1200px) {
  .dashboard-wrapper {
    flex-direction: column;
  }
  
  .settings-panel {
    width: 100%;
    position: static;
  }
  
  .metrics-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .charts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Tablets */
@media (max-width: 900px) {
  .topbar-content {
    padding: var(--space-md) var(--space-lg);
  }
  
  .brand-subtitle {
    display: none;
  }
  
  .dashboard-wrapper {
    padding: var(--space-lg);
    gap: var(--space-lg);
  }
  
  .settings-panel {
    padding: var(--space-lg);
  }
  
  .dashboard-main {
    gap: var(--space-xl);
  }
  
  .list-head {
    display: none;
  }
  
  .nodes-table .row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    padding: var(--space-lg);
  }
  
  /* Mobile labels for each field */
  .nodes-table .row > div:not(.name) {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-md);
    align-items: center;
  }
  
  .nodes-table .row > div:not(.name)::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }
  
  /* Name field special styling */
  .nodes-table .name {
    font-size: 1.125rem;
    font-weight: 700;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
    color: var(--accent-primary);
  }
}

/* Mobile phones */
@media (max-width: 640px) {
  .topbar-content {
    padding: var(--space-md);
    gap: var(--space-md);
  }
  
  .brand-title {
    font-size: 1.25rem;
  }
  
  .logo-wrapper {
    width: 36px;
    height: 36px;
  }
  
  .logo {
    width: 32px;
    height: 32px;
  }
  
  .btn-primary span {
    display: none;
  }
  
  .dashboard-wrapper {
    padding: var(--space-md);
    gap: var(--space-md);
  }
  
  .settings-panel {
    padding: var(--space-md);
  }
  
  .dashboard-main {
    gap: var(--space-lg);
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .metrics-container {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .metric-card {
    padding: var(--space-md);
  }
  
  .metric-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .metric-value {
    font-size: 1.5rem;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .chart-card {
    padding: var(--space-md);
  }
  
  .chart-wrapper {
    height: 200px;
  }
  
  .nodes-table .row {
    padding: var(--space-md);
  }
  
  /* Adjust label width for smaller screens */
  .nodes-table .row > div:not(.name) {
    grid-template-columns: 100px 1fr;
    gap: var(--space-sm);
  }
  
  .nodes-table .name {
    font-size: 1rem;
  }
}

/* Very small phones */
@media (max-width: 400px) {
  .connection-status {
    display: none;
  }
  
  .topbar-actions {
    gap: var(--space-sm);
  }
  
  /* Even smaller labels for very small phones */
  .nodes-table .row > div:not(.name) {
    grid-template-columns: 85px 1fr;
    font-size: 0.875rem;
  }
  
  .nodes-table .row > div:not(.name)::before {
    font-size: 0.7rem;
  }
}

/* ============================================
   ACCESSIBILITY & MOTION
   ============================================ */

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

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Selection color */
::selection {
  background: var(--accent-primary);
  color: white;
}
