/* ============================================================================
   WODPulse Design System — theme.css
   Single source of truth for colors, typography, glassmorphism, and utilities.
   Load this FIRST before any page-specific CSS.
   Version: 1.0.0
   ============================================================================ */

/* ── Fonts ─────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
  /* Background hierarchy */
  --bg-deep: #080808;
  --bg-base: #0c0c0c;
  --bg-surface: #101010;
  --bg-surface2: #1a1a1a;
  --bg-surface3: #222222;

  /* Glassmorphism */
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  --glass-bg-strong: rgba(16,16,16,0.75);
  --glass-border: rgba(255,255,255,0.06);
  --glass-border-hover: rgba(45,225,156,0.25);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.5);
  --glass-blur: 16px;

  /* Accent */
  --accent: #2DE19C;
  --accent-hover: #1effb2;
  --accent-glow: rgba(45,225,156,0.18);
  --accent-dim: rgba(45,225,156,0.07);

  /* Semantic colors */
  --orange: #FF9800;
  --red: #f44336;
  --blue: #2196F3;
  --gold: #FFD700;
  --silver: #C0C0C0;
  --bronze: #CD7F32;

  /* HR Zones */
  --zone-gray: #8e9eab;
  --zone-blue: #2196F3;
  --zone-green: #4CAF50;
  --zone-yellow: #FFEB3B;
  --zone-orange: #FF9800;
  --zone-red: #E53935;

  /* Text */
  --text: #f0f0f0;
  --text-dim: #888888;
  --text-muted: #555555;

  /* Borders */
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.04);
  --border-strong: rgba(255,255,255,0.12);

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

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Transitions */
  --ease-fast: 0.15s ease;
  --ease-normal: 0.25s ease;
  --ease-slow: 0.4s ease;

  /* Nav sizing (for app shell pages) */
  --nav-h: 64px;
  --header-h: 56px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Glassmorphism ─────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass-hover {
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast), transform var(--ease-fast);
}
.glass-hover:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 40px var(--accent-glow);
  transform: translateY(-1px);
}

/* Fallback for browsers without backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: var(--bg-surface); }
  .glass-strong { background: var(--bg-surface); }
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.text-heading { font-family: var(--font-heading); letter-spacing: 1px; text-transform: uppercase; }
.text-mono { font-family: var(--font-mono); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }

/* ── Links ─────────────────────────────────────────────────────────────────── */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease-fast);
}
a:hover { color: var(--accent-hover); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: none; border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: all var(--ease-fast);
  white-space: nowrap; user-select: none;
}

.btn-accent {
  background: var(--accent); color: #000;
}
.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--red); color: #fff;
}
.btn-danger:hover { opacity: 0.9; }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

.btn:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-accent-left {
  border-left: 3px solid var(--accent);
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.form-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg-surface2); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 0.9rem;
  transition: border-color var(--ease-fast);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
.form-input::placeholder { color: var(--text-muted); }

.form-label {
  display: block; font-size: 0.75rem; color: var(--text-dim);
  margin-bottom: 5px; font-weight: 500;
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 700; white-space: nowrap;
}
.badge-accent { background: rgba(45,225,156,0.12); color: var(--accent); }
.badge-red { background: rgba(244,67,54,0.12); color: var(--red); }
.badge-orange { background: rgba(255,152,0,0.12); color: var(--orange); }
.badge-blue { background: rgba(33,150,243,0.12); color: var(--blue); }
.badge-gold { background: rgba(255,215,0,0.12); color: var(--gold); }

/* ── Glow Effects ──────────────────────────────────────────────────────────── */
.glow { box-shadow: 0 0 20px var(--accent-glow); }
.glow-strong { box-shadow: 0 0 40px rgba(45,225,156,0.25); }

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Setup Toolbar ────────────────────────────────────────────────────────── */
.setup-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
}
.setup-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--accent);
  letter-spacing: 2px;
  margin: 0;
  white-space: nowrap;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.toolbar-sep {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
}

/* Toolbar buttons */
.tb-btn {
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}
.tb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Button color variants */
.tb-accent {
  background: rgba(45,225,156,0.15);
  border-color: rgba(45,225,156,0.3);
  color: var(--accent);
}
.tb-accent:hover { background: rgba(45,225,156,0.25); box-shadow: 0 4px 16px var(--accent-glow); }

.tb-placar {
  background: rgba(255,107,53,0.12);
  border-color: rgba(255,107,53,0.25);
  color: #FF6B35;
}
.tb-placar:hover { background: rgba(255,107,53,0.2); }

.tb-whatsapp {
  background: rgba(37,211,102,0.12);
  border-color: rgba(37,211,102,0.25);
  color: #25D366;
}
.tb-whatsapp:hover { background: rgba(37,211,102,0.2); }

.tb-emocao {
  background: rgba(255,0,153,0.1);
  border-color: rgba(255,0,153,0.25);
  color: #FF0099;
}
.tb-emocao:hover { background: rgba(255,0,153,0.2); }

.tb-financeiro {
  background: rgba(255,152,0,0.12);
  border-color: rgba(255,152,0,0.25);
  color: #FF9800;
}
.tb-financeiro:hover { background: rgba(255,152,0,0.2); }

.tb-admin {
  background: rgba(244,67,54,0.1);
  border-color: rgba(244,67,54,0.25);
  color: #E63946;
  display: none;
}
.tb-admin:hover { background: rgba(244,67,54,0.2); }

.tb-gestao {
  background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.25);
  color: #7c3aed;
  display: none;
}
.tb-gestao:hover { background: rgba(124,58,237,0.2); }

.tb-logout {
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: var(--text-dim);
  font-weight: 500;
}
.tb-logout:hover { background: rgba(244,67,54,0.1); border-color: rgba(244,67,54,0.3); color: var(--red); }

/* ── Setup Page — Two-Column Layout ──────────────────────────────────────── */
.setup-columns-container {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
}

/* Column proportions */
.form-column {
  flex: 0 0 30%;
  min-width: 260px;
}
.list-column {
  flex: 0 0 68%;
  min-width: 400px;
}

.setup-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 16px;
  box-sizing: border-box;
}
.setup-card h3 {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1rem;
  margin: 0;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.form-grid input, .form-grid select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px;
  border-radius: 6px;
  color: white;
  font-family: var(--font-body);
  font-size: 0.8rem;
  width: 100%;
  box-sizing: border-box;
}
.form-grid input:focus, .form-grid select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ANT+ field */
.ant-field {
  display: flex; align-items: center; gap: 6px;
  background: rgba(45,225,156,0.08);
  border: 1px solid rgba(45,225,156,0.25);
  border-radius: 6px; padding: 6px 10px; margin-bottom: 8px;
}
.ant-field span { font-size: 1rem; }
.ant-field select {
  flex: 1; background: transparent; color: #fff; border: none;
  outline: none; font-size: 0.8rem; cursor: pointer; font-family: var(--font-body);
}
.ant-field button {
  background: none; border: 1px solid rgba(45,225,156,0.4);
  color: var(--accent); cursor: pointer; font-size: 0.9rem;
  padding: 3px 7px; border-radius: 4px;
}

/* Checkbox row */
.form-row-checkbox {
  margin-bottom: 8px;
  font-size: 0.8rem; color: var(--text-dim);
}

/* Photo upload */
.photo-upload-box {
  text-align: center; margin-bottom: 10px;
}
.custom-file-upload {
  display: inline-block; padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 6px; cursor: pointer;
  font-size: 0.8rem; color: var(--text-dim);
  transition: border-color 0.2s;
}
.custom-file-upload:hover { border-color: var(--accent); }

/* Save button */
#addBtn {
  width: 100%; padding: 10px;
  background: var(--accent); color: #000;
  border: none; border-radius: 8px;
  font-weight: 700; font-size: 0.9rem; cursor: pointer;
  font-family: var(--font-body);
}
#addBtn:hover { background: var(--accent-hover); }

/* List header: heading + search inline */
.list-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}
.list-header-inline h3 { flex-shrink: 0; }

/* Search bar — inline version */
.list-header-inline .search-bar-wrapper {
  position: relative;
  flex: 1;
  max-width: 280px;
  margin-bottom: 0;
}
.list-header-inline .search-bar-wrapper input {
  width: 100%;
  padding: 7px 7px 7px 30px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: white;
  box-sizing: border-box;
  font-size: 0.8rem;
  font-family: var(--font-body);
}
.list-header-inline .search-bar-wrapper input:focus { outline: none; }
.list-header-inline .search-bar-wrapper .search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  font-size: 0.8rem;
}

.list-subtext {
  font-size: 0.68rem; color: var(--text-dim);
  margin: 0 0 8px 0;
}

/* Ready to start section */
.ready-section {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: rgba(45,225,156,0.06);
  border: 1px solid rgba(45,225,156,0.2);
  border-radius: 10px;
  animation: fadeIn 0.25s ease;
}
.ready-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  font-family: var(--font-heading);
  letter-spacing: 1px;
}
.ready-label span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0;
  margin-left: 4px;
}
.ready-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ready-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  background: rgba(45,225,156,0.12);
  border: 1px solid rgba(45,225,156,0.25);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s ease;
  animation: fadeSlideIn 0.25s ease;
}
.ready-chip:hover {
  background: rgba(244,67,54,0.15);
  border-color: rgba(244,67,54,0.35);
  color: var(--red);
}
.ready-chip img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(45,225,156,0.3);
}
.ready-chip .chip-x {
  font-size: 0.65rem;
  opacity: 0.5;
  margin-left: 2px;
}
.ready-chip:hover .chip-x { opacity: 1; }

/* Scrollable list area */
.scrollable-list-box {
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 4px;
}

/* Student list items */
.student-row-info {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.student-row-info strong {
  font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px; display: block;
}
.student-row-actions {
  display: flex; gap: 4px; flex-shrink: 0;
}

/* Start class button footer */
.actions-footer {
  text-align: center;
  margin-top: 24px;
}
#start-class-btn {
  background: linear-gradient(135deg, var(--accent), #1a9c6b);
  color: #000;
  padding: 18px 48px;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(45,225,156,0.3);
  font-family: var(--font-body);
  letter-spacing: 1px;
  display: inline-flex; align-items: center; gap: 10px;
}
#start-class-btn:hover {
  box-shadow: 0 6px 28px rgba(45,225,156,0.45);
  transform: translateY(-1px);
}

/* ── Live Ranking Panel (Placar ao Vivo) ─────────────────────────────────── */
.live-ranking-panel {
  width: 320px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 16px;
  margin: 8px 16px 8px 0;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: fadeSlideIn 0.3s ease;
}
.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ranking-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 1px;
}
.ranking-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ranking-close:hover { background: rgba(244,67,54,0.2); color: var(--red); }

/* Ranking item */
.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s ease;
}
.rank-item:hover { background: rgba(255,255,255,0.05); }
.rank-item.top-1 { background: rgba(255,215,0,0.08); border-color: rgba(255,215,0,0.2); }
.rank-item.top-2 { background: rgba(192,192,192,0.06); border-color: rgba(192,192,192,0.15); }
.rank-item.top-3 { background: rgba(205,127,50,0.06); border-color: rgba(205,127,50,0.15); }

.rank-pos {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.rank-pos.gold { color: var(--gold); }
.rank-pos.silver { color: var(--silver); }
.rank-pos.bronze { color: var(--bronze); }

.rank-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
}
.rank-item.top-1 .rank-avatar { border-color: var(--gold); }
.rank-item.top-2 .rank-avatar { border-color: var(--silver); }
.rank-item.top-3 .rank-avatar { border-color: var(--bronze); }

.rank-info { flex: 1; min-width: 0; }
.rank-name {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-points {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}
.rank-bpm-mini {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
  text-align: right;
}
.rank-bpm-mini strong {
  color: var(--text);
  font-size: 0.9rem;
}

/* Empty ranking state */
.ranking-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 20px;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .setup-columns-container { flex-direction: column; }
  .form-column, .list-column { flex: auto; width: 100%; min-width: 0; }
  .live-ranking-panel { width: 100%; margin: 8px 0; }
}

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.animate-fade-in { animation: fadeIn 0.3s var(--ease-normal); }
.animate-fade-slide { animation: fadeSlideIn 0.4s cubic-bezier(0.16,1,0.3,1); }

/* ── Circular Gauge (BPM) ─────────────────────────────────────────────────── */
.gauge-container {
  float: right;
  width: 55%;
  text-align: center;
  position: relative;
  padding: 0;
}
.gauge-svg {
  width: 180px; height: 180px;
}
.gauge-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
}
.gauge-arc {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease, stroke 0.5s ease;
}
.gauge-arc.glow {
  filter: drop-shadow(0px 0px 8px var(--current-color, #4CAF50));
  transition: stroke-dashoffset 0.4s ease, filter 0.4s ease, stroke 0.4s ease;
}

/* ── Tile Header (profile + gauge side by side) ───────────────────────────── */
.tile-header-wrapper {
  width: 100%;
}
.tile-header-wrapper::after {
  content: ""; display: table; clear: both;
}

/* ── Zone Label ──────────────────────────────────────────────────────────── */
.tile .zone-label {
  clear: both;
  text-align: right;
  padding-right: 15px;
  font-size: 0.82rem;
  margin-top: 2px;
  margin-bottom: 10px;
  font-weight: 500;
}

/* ── Dots Bar (intensity) ─────────────────────────────────────────────────── */
.dots-bar {
  float: left;
  display: flex; gap: 3px;
  padding: 0; margin-top: 2px;
}
.dots-bar .dot {
  width: 6px; height: 14px; border-radius: 3px;
  background: rgba(255,255,255,0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.dots-bar .dot.low { background: var(--zone-green); }
.dots-bar .dot.mid { background: var(--zone-yellow); }
.dots-bar .dot.high { background: var(--zone-red); }

/* ── Stat Grid ────────────────────────────────────────────────────────────── */
.stats-grid {
  clear: both;
  width: 100%;
  margin-bottom: 10px;
}
.stats-grid::after { content: ""; display: table; clear: both; }
.stat-card {
  float: left;
  width: 48%;
  margin-right: 4%;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px; padding: 10px;
  box-sizing: border-box;
}
.stat-card:last-child { margin-right: 0; }
.stat-card .stat-label {
  font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px;
}
.stat-card .stat-value {
  font-size: 1.3rem; font-weight: 800;
}
.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-value.orange { color: var(--orange); }
.stat-card .stat-value.blue { color: var(--blue); }

/* ── Tile Footer Bar ──────────────────────────────────────────────────────── */
.tile-footer-bar {
  clear: both;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
}
.tile-footer-bar::after { content: ""; display: table; clear: both; }

/* ── Zone Text ─────────────────────────────────────────────────────────────── */
.zone-label {
  font-weight: 700; text-transform: uppercase;
  font-size: 0.85rem; letter-spacing: 1px;
  margin-top: 6px;
}

/* ── Signal Status ─────────────────────────────────────────────────────────── */
.signal-status {
  float: right;
  display: flex; align-items: center; gap: 4px;
  font-size: 0.7rem; color: var(--text-dim);
  font-weight: 500;
}
.signal-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
}
.signal-dot.live { background: var(--accent); animation: pulse 2s infinite; }
