/* ============================================================
   M2M Data Center Digital Twin — Design System
   ============================================================ */

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

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

:root {
  /* Background palette */
  --bg-primary:    #06060c;
  --bg-surface:    rgba(12, 13, 22, 0.92);
  --bg-panel:      rgba(15, 16, 28, 0.88);
  --bg-card:       rgba(18, 20, 35, 0.72);
  --bg-card-hover: rgba(22, 25, 42, 0.82);
  --bg-input:      rgba(10, 12, 22, 0.6);

  /* Border palette */
  --border-subtle: rgba(0, 229, 204, 0.06);
  --border-medium: rgba(0, 229, 204, 0.12);
  --border-accent: rgba(0, 229, 204, 0.25);

  /* M2M accent colors */
  --accent-cyan:   #00e5cc;
  --accent-cyan-dim: rgba(0, 229, 204, 0.15);
  --accent-blue:   #3b82f6;
  --accent-blue-dim: rgba(59, 130, 246, 0.15);
  --accent-green:  #00d68f;
  --accent-green-dim: rgba(0, 214, 143, 0.15);
  --accent-orange: #ffaa00;
  --accent-orange-dim: rgba(255, 170, 0, 0.15);
  --accent-red:    #ff4757;
  --accent-red-dim: rgba(255, 71, 87, 0.15);
  --accent-purple: #a78bfa;
  --accent-purple-dim: rgba(167, 139, 250, 0.15);

  /* Text palette */
  --text-primary:   #e8eaf0;
  --text-secondary: rgba(232, 234, 240, 0.7);
  --text-muted:     rgba(232, 234, 240, 0.45);
  --text-disabled:  rgba(232, 234, 240, 0.25);

  /* Radii */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px rgba(0, 229, 204, 0.08);

  /* Glow shadows — directional */
  --shadow-glow-cyan:  0 0 16px rgba(0, 229, 204, 0.15), 0 0 4px rgba(0, 229, 204, 0.08);
  --shadow-glow-red:   0 0 16px rgba(255, 71, 87, 0.2),  0 0 4px rgba(255, 71, 87, 0.1);
  --shadow-glow-green: 0 0 16px rgba(0, 214, 143, 0.15), 0 0 4px rgba(0, 214, 143, 0.08);

  /* Glass edge highlights */
  --glass-edge-top:    inset 0 1px 0 rgba(255, 255, 255, 0.065);
  --glass-edge-bright: inset 0 1px 0 rgba(255, 255, 255, 0.10);

  /* Ambient body gradients */
  --bg-ambient-tl: radial-gradient(ellipse at 20% 0%, rgba(0, 20, 60, 0.4) 0%, transparent 60%);
  --bg-ambient-br: radial-gradient(ellipse at 80% 100%, rgba(0, 50, 40, 0.2) 0%, transparent 50%);

  /* Elevated card background */
  --bg-card-elevated: rgba(255, 255, 255, 0.035);

  /* Transitions */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Fonts */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image: var(--bg-ambient-tl), var(--bg-ambient-br);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Glassmorphism mixin utility */
.glass {
  background: var(--bg-panel);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--glass-edge-top), 0 4px 16px rgba(0,0,0,0.4);
}

.glass-heavy {
  background: var(--bg-surface);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(0,229,204,0.12);
  box-shadow: var(--glass-edge-top), 0 8px 32px rgba(0,0,0,0.5);
}

/* Mono font for data */
.mono {
  font-family: var(--font-mono);
}

/* Status colors */
.text-healthy { color: var(--accent-green); }
.text-warning { color: var(--accent-orange); }
.text-critical { color: var(--accent-red); }
.text-cyan { color: var(--accent-cyan); }
.text-blue { color: var(--accent-blue); }
.text-muted { color: var(--text-muted); }
