/* ============================================
   SAR W3W — Search & Rescue Grid Planner
   Design: Tactical Dark / Midnight Galaxy
   ============================================ */

:root {
  --bg-base:       #080d14;
  --bg-panel:      #0d1520;
  --bg-card:       #111d2e;
  --bg-hover:      #162236;
  --bg-input:      #0a1422;
  --border:        #1e3050;
  --border-light:  #243d5e;

  --text-primary:  #e8f4f8;
  --text-secondary:#7a9bb5;
  --text-muted:    #3d5a78;

  --accent:        #00d4aa;
  --accent-dim:    rgba(0,212,170,0.12);
  --accent-glow:   rgba(0,212,170,0.3);

  --tier1:         #ff6b35;
  --tier1-dim:     rgba(255,107,53,0.15);
  --tier2:         #f7ce68;
  --tier2-dim:     rgba(247,206,104,0.15);
  --tier3:         #4fc3f7;
  --tier3-dim:     rgba(79,195,247,0.15);
  --elim:          #3d5a78;
  --elim-dim:      rgba(61,90,120,0.2);

  --danger:        #ff4757;
  --success:       #00d4aa;
  --warning:       #f7ce68;

  --font-main:     'Space Grotesk', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.6);

  --header-h:      56px;
  --panel-w:       300px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input, button, select { font-family: var(--font-main); }

/* ============================================
   HEADER
   ============================================ */
.app-header {
  height: var(--header-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-left { display: flex; align-items: center; gap: 12px; }

.logo-mark {
  width: 36px; height: 36px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.logo-mark svg { width: 18px; height: 18px; }

.header-titles h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}
.header-titles h1 .accent { color: var(--accent); }
.header-titles p {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-right { display: flex; align-items: center; gap: 10px; }

.status-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-dot.demo { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.status-dot.live { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.btn-icon {
  width: 34px; height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon svg { width: 15px; height: 15px; }

/* ============================================
   LAYOUT
   ============================================ */
.app-layout {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr var(--panel-w);
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}

/* ============================================
   PANELS
   ============================================ */
.left-panel, .right-panel {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.right-panel { border-right: none; border-left: 1px solid var(--border); }

/* Scrollbar */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar { width: 4px; }
.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track { background: transparent; }
.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.panel-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.step-badge {
  min-width: 28px; height: 28px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.step-badge.green {
  background: rgba(0,212,170,0.1);
  border-color: var(--accent);
  color: var(--accent);
}
.step-badge svg { width: 14px; height: 14px; }

.step-header h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.step-header p {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   INPUTS
   ============================================ */
.input-group { display: flex; flex-direction: column; gap: 8px; }

.input-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.w3w-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.w3w-input-wrap:focus-within { border-color: var(--accent); }

.w3w-prefix {
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border-right: 1px solid var(--border);
  height: 36px;
  display: flex; align-items: center;
}

.w3w-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 10px;
  height: 36px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}
.w3w-input-wrap input::placeholder { color: var(--text-muted); }

.input-divider {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
}
.input-divider::before, .input-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.coord-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

input[type="number"], input[type="text"] {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  height: 36px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
input[type="number"]:focus, input[type="text"]:focus { border-color: var(--accent); }
input[type="number"]::placeholder, input[type="text"]::placeholder { color: var(--text-muted); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: var(--accent);
  color: #080d14;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 36px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}
.btn-primary:hover { background: #00f0c0; box-shadow: 0 0 16px var(--accent-glow); }
.btn-primary svg { width: 14px; height: 14px; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 36px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--border-light); color: var(--text-primary); }

.btn-run {
  margin: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #00a882 100%);
  color: #080d14;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-run:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-run:disabled {
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-run svg { width: 18px; height: 18px; }

/* ============================================
   LKP DISPLAY
   ============================================ */
.lkp-display {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 4px;
}
.lkp-w3w {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.lkp-coords {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ============================================
   SLIDERS
   ============================================ */
.slider-wrap { display: flex; flex-direction: column; gap: 4px; }

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}
.slider-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent) !important;
}

/* ============================================
   RADIO GROUP
   ============================================ */
.radio-group { display: flex; flex-direction: column; gap: 6px; }
.radio-opt {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s;
}
.radio-opt:hover { background: var(--bg-hover); border-color: var(--border); }
.radio-opt input[type="radio"] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ============================================
   FILTER TOGGLES
   ============================================ */
.filter-list { display: flex; flex-direction: column; gap: 4px; }

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-item:hover { border-color: var(--border-light); background: var(--bg-hover); }

.filter-info {
  display: flex; align-items: center; gap: 10px;
}
.filter-info svg { width: 15px; height: 15px; color: var(--text-secondary); }
.filter-info span { font-size: 12px; font-weight: 500; color: var(--text-primary); display: block; }
.filter-info small { font-size: 10px; color: var(--text-muted); }

.toggle-wrap { position: relative; }
.toggle-wrap input[type="checkbox"] { display: none; }
.toggle {
  display: block;
  width: 34px; height: 18px;
  background: var(--border);
  border-radius: 9px;
  position: relative;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.2s;
}
.toggle-wrap input:checked + .toggle { background: var(--accent); }
.toggle-wrap input:checked + .toggle::after {
  left: 19px;
  background: #080d14;
}

/* ============================================
   MAP AREA
   ============================================ */
.map-area {
  position: relative;
  overflow: hidden;
}
#map {
  width: 100%;
  height: 100%;
  background: var(--bg-base);
}

/* Leaflet overrides */
.leaflet-container { background: #0a1422; }
.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}
.leaflet-control-zoom a {
  background: var(--bg-panel) !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid var(--border) !important;
  width: 30px !important; height: 30px !important;
  line-height: 30px !important;
  font-size: 16px !important;
}
.leaflet-control-zoom a:hover { background: var(--bg-hover) !important; color: var(--accent) !important; }
.leaflet-control-attribution { display: none !important; }

/* MAP CONTROLS */
.map-controls {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-md);
}
.map-ctrl-btn {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.map-ctrl-btn:hover, .map-ctrl-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.map-ctrl-btn svg { width: 15px; height: 15px; }
.map-ctrl-divider { height: 1px; background: var(--border); margin: 2px 0; }

/* MAP LEGEND */
.map-legend {
  position: absolute;
  bottom: 20px; left: 12px;
  z-index: 500;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
  min-width: 200px;
}
.legend-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.legend-dot.t1 { background: var(--tier1); }
.legend-dot.t2 { background: var(--tier2); }
.legend-dot.t3 { background: var(--tier3); }
.legend-dot.elim { background: var(--elim); }
.legend-dot.lkp { background: var(--accent); border-radius: 50%; }

/* MAP HINT */
.map-hint {
  position: absolute;
  bottom: 20px; right: 60px;
  z-index: 500;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  animation: fadeInUp 0.4s ease;
}
.map-hint svg { width: 14px; height: 14px; color: var(--accent); }

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

/* ============================================
   RIGHT PANEL — STATS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.stat-card.tier1 { border-color: rgba(255,107,53,0.3); background: var(--tier1-dim); }
.stat-card.tier2 { border-color: rgba(247,206,104,0.3); background: var(--tier2-dim); }
.stat-card.tier3 { border-color: rgba(79,195,247,0.3); background: var(--tier3-dim); }
.stat-card.eliminated { border-color: rgba(61,90,120,0.4); }
.stat-card.coverage { border-color: rgba(0,212,170,0.3); background: var(--accent-dim); }

.stat-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card.tier1 .stat-val { color: var(--tier1); }
.stat-card.tier2 .stat-val { color: var(--tier2); }
.stat-card.tier3 .stat-val { color: var(--tier3); }
.stat-card.coverage .stat-val { color: var(--accent); }

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ELIMINATION BREAKDOWN */
.elim-breakdown { display: flex; flex-direction: column; gap: 6px; }
.elim-row {
  display: flex; align-items: center; gap: 8px;
}
.elim-row-label {
  font-size: 11px;
  color: var(--text-secondary);
  width: 110px;
  flex-shrink: 0;
}
.elim-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.elim-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--elim);
  transition: width 0.6s ease;
}
.elim-bar-fill.water { background: #4fc3f7; }
.elim-bar-fill.terrain { background: #a78bfa; }
.elim-bar-fill.weather { background: #f7ce68; }
.elim-bar-fill.movement { background: var(--accent); }
.elim-bar-fill.urban { background: #ff6b35; }

.elim-row-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  width: 32px;
  text-align: right;
}

/* ============================================
   TIER TABS & LIST
   ============================================ */
.tier-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.tier-tab {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: all 0.15s;
}
.tier-tab:hover { border-color: var(--border-light); color: var(--text-secondary); }
.tier-tab.active[data-tier="1"] { background: var(--tier1-dim); border-color: var(--tier1); color: var(--tier1); }
.tier-tab.active[data-tier="2"] { background: var(--tier2-dim); border-color: var(--tier2); color: var(--tier2); }
.tier-tab.active[data-tier="3"] { background: var(--tier3-dim); border-color: var(--tier3); color: var(--tier3); }

.tier-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tier-dot.t1 { background: var(--tier1); }
.tier-dot.t2 { background: var(--tier2); }
.tier-dot.t3 { background: var(--tier3); }

.tier-count {
  background: var(--bg-base);
  border-radius: 10px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: var(--font-mono);
}

.tier-list-wrap {
  height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  margin-bottom: 10px;
}
.tier-list-wrap::-webkit-scrollbar { width: 4px; }
.tier-list-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.tier-list { padding: 4px; }

.tier-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.tier-item:last-child { border-bottom: none; }
.tier-item:hover { background: var(--bg-hover); }
.tier-item.highlighted { background: var(--accent-dim); }

.tier-item-w3w {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.tier-item-w3w .w3w-slash { color: var(--accent); }

.tier-item-meta {
  display: flex; align-items: center; gap: 6px;
}
.tier-item-dist {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.tier-item-priority {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.priority-high { background: var(--tier1-dim); color: var(--tier1); }
.priority-med  { background: var(--tier2-dim); color: var(--tier2); }
.priority-low  { background: var(--tier3-dim); color: var(--tier3); }

/* EXPORT BAR */
.export-bar {
  display: flex; gap: 6px;
}
.btn-export {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: all 0.15s;
}
.btn-export:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.btn-export svg { width: 12px; height: 12px; }

/* RIGHT EMPTY STATE */
.right-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
}
.right-empty svg { width: 40px; height: 40px; opacity: 0.3; }
.right-empty p { font-size: 12px; line-height: 1.6; }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 420px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
.modal-wide { width: 600px; }

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-primary);
}
.modal-header h3 svg { width: 16px; height: 16px; color: var(--accent); }

.modal-close {
  width: 28px; height: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); }
.modal-close svg { width: 13px; height: 13px; }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-body label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.modal-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn-primary { flex: 1; }
.modal-actions .btn-secondary { flex: 1; }

/* TEAM ASSIGNMENT */
.team-config { display: flex; flex-direction: column; gap: 8px; }
.team-count-row { display: flex; gap: 8px; }
.team-count-row input { width: 80px; flex-shrink: 0; }
.team-count-row .btn-primary { flex: 1; }

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
}
.team-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.team-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
}
.team-badge {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.team-squares {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.team-w3w-list {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.team-w3w-tag {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,13,20,0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.loading-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.loading-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #00a882);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ============================================
   ANALYSIS TIMESTAMP
   ============================================ */
#analysisTimestamp {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  :root { --panel-w: 260px; }
}
@media (max-width: 900px) {
  .app-layout { grid-template-columns: 260px 1fr; }
  .right-panel { display: none; }
}
/* ============================================
   COLLABORATION UI
   ============================================ */
.btn-collab {
  display: flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: var(--radius-sm);
  padding: 0 12px; height: 34px;
  font-size: 12px; font-weight: 600; color: #ef4444;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-main);
}
.btn-collab:hover { background: rgba(239,68,68,0.2); border-color: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.25); }
.btn-collab.live { background: rgba(239,68,68,0.2); border-color: #ef4444; animation: liveGlow 2s infinite; }
.btn-collab svg { width: 14px; height: 14px; }
@keyframes liveGlow {
  0%,100% { box-shadow: 0 0 6px rgba(239,68,68,0.3); }
  50%      { box-shadow: 0 0 16px rgba(239,68,68,0.6); }
}
.incident-tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.incident-tab {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px; font-size: 12px;
  font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: all 0.15s; font-family: var(--font-main);
}
.incident-tab.active { background: rgba(239,68,68,0.12); border-color: #ef4444; color: #ef4444; }
.color-picker { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.color-swatch { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; flex-shrink: 0; }
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.4); transform: scale(1.15); }
.incident-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: #ef4444; }
.incident-id-box { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3); border-radius: var(--radius-md); padding: 16px; text-align: center; margin: 4px 0; }
.incident-id-code { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: #ef4444; letter-spacing: 0.15em; margin-bottom: 6px; }
.incident-id-hint { font-size: 11px; color: var(--text-muted); }
.square-status-w3w { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.square-status-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; font-family: var(--font-mono); }
.status-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.status-btn {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s; font-family: var(--font-main);
}
.status-btn[data-status="assigned"]:hover    { border-color: #a78bfa; color: #a78bfa; background: rgba(167,139,250,0.1); }
.status-btn[data-status="in_progress"]:hover { border-color: #fbbf24; color: #fbbf24; background: rgba(251,191,36,0.1); }
.status-btn[data-status="cleared"]:hover     { border-color: #00d4aa; color: #00d4aa; background: rgba(0,212,170,0.1); }
.status-btn[data-status="unable"]:hover      { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }
.status-btn[data-status="assigned"].active-status    { border-color: #a78bfa; color: #a78bfa; background: rgba(167,139,250,0.15); border-width:2px; }
.status-btn[data-status="in_progress"].active-status { border-color: #fbbf24; color: #fbbf24; background: rgba(251,191,36,0.15); border-width:2px; }
.status-btn[data-status="cleared"].active-status     { border-color: #00d4aa; color: #00d4aa; background: rgba(0,212,170,0.15); border-width:2px; }
.status-btn[data-status="unable"].active-status      { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.15); border-width:2px; }
.status-btn svg { width: 14px; height: 14px; }
.collab-section { border-top: 2px solid rgba(239,68,68,0.3); }
.collab-progress { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.collab-progress-header { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.collab-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.collab-progress-fill { height: 100%; background: linear-gradient(90deg,#00d4aa,#00a882); border-radius: 3px; transition: width 0.5s ease; }
.collab-progress-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.cpstat { display: flex; align-items: center; gap: 4px; font-size: 11px; font-family: var(--font-mono); }
.cpstat svg { width: 11px; height: 11px; }
.cpstat.assigned { color: #a78bfa; } .cpstat.inprog { color: #fbbf24; } .cpstat.cleared { color: #00d4aa; } .cpstat.unable { color: #ef4444; }
.collab-teams-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.collab-teams { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; max-height: 180px; overflow-y: auto; }
.collab-no-teams { font-size: 11px; color: var(--text-muted); text-align: center; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.collab-team-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.collab-team-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.collab-team-dot.online { box-shadow: 0 0 6px currentColor; animation: pulse 2s infinite; }
.collab-team-dot.offline { opacity: 0.4; }
.collab-team-name { font-size: 12px; font-weight: 600; color: var(--text-primary); flex: 1; }
.collab-team-stats { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.collab-team-badge { font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 700; text-transform: uppercase; }
.collab-team-badge.command { background: rgba(239,68,68,0.2); color: #ef4444; }
.collab-team-badge.field   { background: var(--accent-dim); color: var(--accent); }
.btn-disconnect { width: 100%; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.25); border-radius: var(--radius-sm); padding: 8px; font-size: 12px; font-weight: 600; color: #ef4444; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.15s; font-family: var(--font-main); }
.btn-disconnect:hover { background: rgba(239,68,68,0.15); border-color: #ef4444; }
.btn-disconnect svg { width: 13px; height: 13px; }

/* ============================================
   COLLABORATION UI STYLES
   ============================================ */
.btn-collab {
  display: flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 6px; padding: 0 12px; height: 34px;
  font-size: 12px; font-weight: 600; color: #ef4444;
  cursor: pointer; transition: all 0.2s; font-family: 'Space Grotesk',sans-serif;
}
.btn-collab:hover { background: rgba(239,68,68,0.2); border-color: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.25); }
.btn-collab.live { background: rgba(239,68,68,0.2); border-color: #ef4444; animation: liveGlow 2s infinite; }
.btn-collab svg { width: 14px; height: 14px; }
@keyframes liveGlow { 0%,100%{box-shadow:0 0 6px rgba(239,68,68,0.3)} 50%{box-shadow:0 0 16px rgba(239,68,68,0.6)} }

.incident-tabs { display:flex; gap:4px; margin-bottom:14px; }
.incident-tab { flex:1; background:var(--bg-card); border:1px solid var(--border); border-radius:6px; padding:7px; font-size:12px; font-weight:600; color:var(--text-muted); cursor:pointer; transition:all 0.15s; font-family:'Space Grotesk',sans-serif; }
.incident-tab.active { background:rgba(239,68,68,0.12); border-color:#ef4444; color:#ef4444; }

.color-picker { display:flex; flex-wrap:wrap; gap:6px; padding:8px; background:var(--bg-card); border:1px solid var(--border); border-radius:6px; }
.color-swatch { width:22px; height:22px; border-radius:50%; cursor:pointer; border:2px solid transparent; transition:all 0.15s; flex-shrink:0; }
.color-swatch:hover { transform:scale(1.2); }
.color-swatch.selected { border-color:#fff; box-shadow:0 0 0 2px rgba(255,255,255,0.4); transform:scale(1.15); }

.incident-error { background:rgba(239,68,68,0.1); border:1px solid rgba(239,68,68,0.3); border-radius:6px; padding:8px 12px; font-size:12px; color:#ef4444; }

.incident-id-box { background:rgba(0,212,170,0.08); border:1px solid #00d4aa; border-radius:10px; padding:16px; text-align:center; margin:8px 0; }
.incident-id-code { font-family:'JetBrains Mono',monospace; font-size:26px; font-weight:700; color:#00d4aa; letter-spacing:0.15em; margin-bottom:6px; }
.incident-id-hint { font-size:11px; color:#3d5a78; }

.square-status-w3w { font-family:'JetBrains Mono',monospace; font-size:18px; font-weight:700; color:#00d4aa; margin-bottom:4px; }
.square-status-meta { font-size:11px; color:#3d5a78; margin-bottom:12px; font-family:'JetBrains Mono',monospace; }

.status-btn-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:4px; }
.status-btn { background:var(--bg-card); border:1px solid var(--border); border-radius:6px; padding:10px 8px; font-size:12px; font-weight:600; color:var(--text-secondary); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:all 0.15s; font-family:'Space Grotesk',sans-serif; }
.status-btn:hover { border-color:#243d5e; color:#e8f4f8; }
.status-btn[data-status="assigned"]:hover,.status-btn[data-status="assigned"].active-status { border-color:#a78bfa; color:#a78bfa; background:rgba(167,139,250,0.1); }
.status-btn[data-status="in_progress"]:hover,.status-btn[data-status="in_progress"].active-status { border-color:#fbbf24; color:#fbbf24; background:rgba(251,191,36,0.1); }
.status-btn[data-status="cleared"]:hover,.status-btn[data-status="cleared"].active-status { border-color:#00d4aa; color:#00d4aa; background:rgba(0,212,170,0.1); }
.status-btn[data-status="unable"]:hover,.status-btn[data-status="unable"].active-status { border-color:#ef4444; color:#ef4444; background:rgba(239,68,68,0.1); }
.status-btn.active-status { border-width:2px; }
.status-btn svg { width:14px; height:14px; }

.collab-section { border-top:2px solid rgba(239,68,68,0.3); }
.collab-progress { background:var(--bg-card); border:1px solid var(--border); border-radius:6px; padding:10px 12px; margin-bottom:12px; }
.collab-progress-header { display:flex; justify-content:space-between; font-size:11px; color:var(--text-secondary); margin-bottom:6px; font-weight:600; }
.collab-progress-bar { height:6px; background:var(--border); border-radius:3px; overflow:hidden; margin-bottom:8px; }
.collab-progress-fill { height:100%; background:linear-gradient(90deg,#00d4aa,#00a882); border-radius:3px; transition:width 0.5s ease; }
.collab-progress-stats { display:flex; gap:10px; flex-wrap:wrap; }
.cpstat { display:flex; align-items:center; gap:4px; font-size:11px; font-family:'JetBrains Mono',monospace; }
.cpstat svg { width:11px; height:11px; }
.cpstat.assigned{color:#a78bfa} .cpstat.inprog{color:#fbbf24} .cpstat.cleared{color:#00d4aa} .cpstat.unable{color:#ef4444}

.collab-teams-label { font-size:10px; font-weight:700; color:#3d5a78; text-transform:uppercase; letter-spacing:0.1em; margin-bottom:6px; }
.collab-teams { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; max-height:180px; overflow-y:auto; }
.collab-no-teams { font-size:11px; color:#3d5a78; text-align:center; padding:12px; border:1px dashed #1e3050; border-radius:6px; }
.collab-team-row { display:flex; align-items:center; gap:8px; padding:6px 10px; background:var(--bg-card); border:1px solid var(--border); border-radius:6px; }
.collab-team-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.collab-team-dot.online { animation:pulse 2s infinite; }
.collab-team-dot.offline { opacity:0.4; }
.collab-team-name { font-size:12px; font-weight:600; color:#e8f4f8; flex:1; }
.collab-team-stats { font-size:10px; color:#3d5a78; font-family:'JetBrains Mono',monospace; }
.collab-team-badge { font-size:9px; padding:1px 5px; border-radius:3px; font-weight:700; text-transform:uppercase; }
.collab-team-badge.command { background:rgba(239,68,68,0.2); color:#ef4444; }
.collab-team-badge.field { background:rgba(0,212,170,0.12); color:#00d4aa; }

.btn-disconnect { width:100%; background:rgba(239,68,68,0.08); border:1px solid rgba(239,68,68,0.25); border-radius:6px; padding:8px; font-size:12px; font-weight:600; color:#ef4444; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:all 0.15s; font-family:'Space Grotesk',sans-serif; }
.btn-disconnect:hover { background:rgba(239,68,68,0.15); border-color:#ef4444; }
.btn-disconnect svg { width:13px; height:13px; }

/* ============================================
   COLLABORATION UI STYLES
   ============================================ */
.btn-collab {
  display: flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 6px; padding: 0 12px; height: 34px;
  font-size: 12px; font-weight: 600; color: #ef4444;
  cursor: pointer; transition: all 0.2s; font-family: 'Space Grotesk',sans-serif;
}
.btn-collab:hover { background: rgba(239,68,68,0.2); border-color: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.25); }
.btn-collab.live { background: rgba(239,68,68,0.2); border-color: #ef4444; animation: liveGlow 2s infinite; }
.btn-collab svg { width: 14px; height: 14px; }
@keyframes liveGlow { 0%,100%{box-shadow:0 0 6px rgba(239,68,68,0.3)} 50%{box-shadow:0 0 16px rgba(239,68,68,0.6)} }

.incident-tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.incident-tab { flex:1; background: #111d2e; border: 1px solid #1e3050; border-radius: 6px; padding: 7px; font-size: 12px; font-weight: 600; color: #3d5a78; cursor: pointer; transition: all 0.15s; font-family: 'Space Grotesk',sans-serif; }
.incident-tab.active { background: rgba(239,68,68,0.12); border-color: #ef4444; color: #ef4444; }

.color-picker { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #111d2e; border: 1px solid #1e3050; border-radius: 6px; }
.color-swatch { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; flex-shrink: 0; }
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.4); transform: scale(1.15); }

.incident-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 6px; padding: 8px 12px; font-size: 12px; color: #ef4444; }

.incident-id-box { background: rgba(0,212,170,0.12); border: 1px solid #00d4aa; border-radius: 10px; padding: 16px; text-align: center; margin: 8px 0; }
.incident-id-code { font-family: 'JetBrains Mono',monospace; font-size: 28px; font-weight: 700; color: #00d4aa; letter-spacing: 0.15em; margin-bottom: 6px; }
.incident-id-hint { font-size: 11px; color: #3d5a78; }

.square-status-w3w { font-family: 'JetBrains Mono',monospace; font-size: 18px; font-weight: 700; color: #00d4aa; margin-bottom: 4px; }
.square-status-meta { font-size: 11px; color: #3d5a78; margin-bottom: 12px; font-family: 'JetBrains Mono',monospace; }

.status-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.status-btn { background: #111d2e; border: 1px solid #1e3050; border-radius: 6px; padding: 10px 8px; font-size: 12px; font-weight: 600; color: #7a9bb5; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.15s; font-family: 'Space Grotesk',sans-serif; }
.status-btn[data-status="assigned"]:hover,.status-btn[data-status="assigned"].active-status { border-color: #a78bfa; color: #a78bfa; background: rgba(167,139,250,0.15); }
.status-btn[data-status="in_progress"]:hover,.status-btn[data-status="in_progress"].active-status { border-color: #fbbf24; color: #fbbf24; background: rgba(251,191,36,0.15); }
.status-btn[data-status="cleared"]:hover,.status-btn[data-status="cleared"].active-status { border-color: #00d4aa; color: #00d4aa; background: rgba(0,212,170,0.15); }
.status-btn[data-status="unable"]:hover,.status-btn[data-status="unable"].active-status { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.15); }
.status-btn.active-status { border-width: 2px; }
.status-btn svg { width: 14px; height: 14px; }

.collab-section { border-top: 2px solid rgba(239,68,68,0.3); }
.collab-progress { background: #111d2e; border: 1px solid #1e3050; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.collab-progress-header { display: flex; justify-content: space-between; font-size: 11px; color: #7a9bb5; margin-bottom: 6px; font-weight: 600; }
.collab-progress-bar { height: 6px; background: #1e3050; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.collab-progress-fill { height: 100%; background: linear-gradient(90deg,#00d4aa,#00a882); border-radius: 3px; transition: width 0.5s ease; }
.collab-progress-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.cpstat { display: flex; align-items: center; gap: 4px; font-size: 11px; font-family: 'JetBrains Mono',monospace; }
.cpstat svg { width: 11px; height: 11px; }
.cpstat.assigned{color:#a78bfa} .cpstat.inprog{color:#fbbf24} .cpstat.cleared{color:#00d4aa} .cpstat.unable{color:#ef4444}

.collab-teams-label { font-size: 10px; font-weight: 700; color: #3d5a78; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.collab-teams { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; max-height: 180px; overflow-y: auto; }
.collab-no-teams { font-size: 11px; color: #3d5a78; text-align: center; padding: 12px; border: 1px dashed #1e3050; border-radius: 6px; }
.collab-team-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #111d2e; border: 1px solid #1e3050; border-radius: 6px; }
.collab-team-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.collab-team-dot.online { box-shadow: 0 0 6px currentColor; }
.collab-team-dot.offline { opacity: 0.4; }
.collab-team-name { font-size: 12px; font-weight: 600; color: #e8f4f8; flex: 1; }
.collab-team-stats { font-size: 10px; color: #3d5a78; font-family: 'JetBrains Mono',monospace; }
.collab-team-badge { font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 700; text-transform: uppercase; }
.collab-team-badge.command { background: rgba(239,68,68,0.2); color: #ef4444; }
.collab-team-badge.field { background: rgba(0,212,170,0.12); color: #00d4aa; }

.btn-disconnect { width: 100%; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.25); border-radius: 6px; padding: 8px; font-size: 12px; font-weight: 600; color: #ef4444; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.15s; font-family: 'Space Grotesk',sans-serif; }
.btn-disconnect:hover { background: rgba(239,68,68,0.15); border-color: #ef4444; }
.btn-disconnect svg { width: 13px; height: 13px; }
