/* ════════════════════════════════════════════════════════════════
   Tower Control — CYBEXIA NOC Dashboard
   CSS Variables & Reset
════════════════════════════════════════════════════════════════ */

:root {
  --bg-deep:      #0a0d14;
  --bg-surface:   #111520;
  --bg-elevated:  #161b28;
  --bg-hover:     #1c2336;
  --accent-cyan:  #00d4ff;
  --accent-green: #00ff88;
  --accent-orange:#ff9500;
  --accent-red:   #ff3b5c;
  --accent-yellow:#ffd60a;
  --text-primary: #e8eaf0;
  --text-muted:   #6b7a99;
  --text-dim:     #3d4a66;
  --border:       rgba(0, 212, 255, 0.1);
  --border-solid: rgba(0, 212, 255, 0.18);
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.5);
  --radius:       8px;
  --radius-lg:    12px;
  --header-h:     64px;
  --sidebar-w:    220px;
  --sidebar-w-collapsed: 64px;
  --panel-w:      440px;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-sans:    'Inter', system-ui, sans-serif;
  --transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 15px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-sans); border: none; background: none; }
input, select { font-family: var(--font-sans); }

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

/* ════════════════════════════════════════════════════════════════
   Animations
════════════════════════════════════════════════════════════════ */

@keyframes pulse-ok {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.5; }
}

@keyframes pulse-hs {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.8); opacity: 0.3; }
}

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

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slide-out-right {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

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

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

@keyframes radar-ring {
  0%   { r: 2;  opacity: 0.7; stroke-width: 2; }
  100% { r: 80; opacity: 0;   stroke-width: 0.5; }
}

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

@keyframes blink-cyan {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ════════════════════════════════════════════════════════════════
   Header
════════════════════════════════════════════════════════════════ */

.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 24px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.header-title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-app-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-kpis {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 72px;
  cursor: default;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.kpi-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.kpi-ok    .kpi-value { color: var(--accent-green); }
.kpi-warn  .kpi-value { color: var(--accent-orange); }
.kpi-error .kpi-value { color: var(--accent-red); }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.reactivity-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.react-icon { color: var(--accent-cyan); }

/* Progress ring */
.progress-ring-container { position: relative; flex-shrink: 0; }

.progress-ring-bg {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 3;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.progress-ring-text {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.header-clock {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
  min-width: 84px;
}

/* ════════════════════════════════════════════════════════════════
   Layout
════════════════════════════════════════════════════════════════ */

.app-layout {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ════════════════════════════════════════════════════════════════
   Sidebar
════════════════════════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  left: 0;
  top: var(--header-h);
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 8px;
  gap: 4px;
  z-index: 90;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

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

.nav-item.active {
  background: rgba(0, 212, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.nav-icon { display: flex; align-items: center; flex-shrink: 0; }
.nav-label { white-space: nowrap; }

/* ════════════════════════════════════════════════════════════════
   Main content
════════════════════════════════════════════════════════════════ */

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  animation: fade-in 0.3s ease;
}

/* ════════════════════════════════════════════════════════════════
   Loading screen
════════════════════════════════════════════════════════════════ */

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ════════════════════════════════════════════════════════════════
   Skeleton loaders
════════════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-hover)    50%,
    var(--bg-elevated) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 4px;
}

.skeleton-text  { height: 14px; border-radius: 3px; }
.skeleton-title { height: 20px; border-radius: 4px; }
.skeleton-card  { height: 80px; border-radius: var(--radius); }
.skeleton-row   { height: 44px; border-radius: 4px; margin-bottom: 4px; }

/* ════════════════════════════════════════════════════════════════
   Badges & Status
════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-ok       { background: rgba(0,255,136,0.15);  color: var(--accent-green);  border: 1px solid rgba(0,255,136,0.3); }
.badge-hs       { background: rgba(255,59,92,0.15);   color: var(--accent-red);    border: 1px solid rgba(255,59,92,0.3); }
.badge-warn     { background: rgba(255,149,0,0.15);   color: var(--accent-orange); border: 1px solid rgba(255,149,0,0.3); }
.badge-info     { background: rgba(0,212,255,0.12);   color: var(--accent-cyan);   border: 1px solid rgba(0,212,255,0.25); }
.badge-muted    { background: rgba(107,122,153,0.15); color: var(--text-muted);    border: 1px solid rgba(107,122,153,0.25); }
.badge-blue     { background: rgba(41,121,255,0.15);  color: #6b9eff;              border: 1px solid rgba(41,121,255,0.3); }
.badge-rejected { background: rgba(255,59,92,0.2);    color: var(--accent-red);    border: 1px solid rgba(255,59,92,0.5); font-size: 0.68rem; }

/* LED dot */
.led {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.led-ok      { background: var(--accent-green);  box-shadow: 0 0 6px var(--accent-green);  animation: pulse-ok 2s infinite; }
.led-hs      { background: var(--accent-red);    box-shadow: 0 0 6px var(--accent-red);    animation: pulse-hs 0.8s infinite; }
.led-warn    { background: var(--accent-orange); box-shadow: 0 0 6px var(--accent-orange); animation: pulse-warn 1.5s infinite; }
.led-off     { background: var(--text-dim); }
.led-building{ background: var(--accent-yellow); animation: pulse-warn 2s infinite; }

/* ════════════════════════════════════════════════════════════════
   Cards
════════════════════════════════════════════════════════════════ */

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

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════════
   View wrapper
════════════════════════════════════════════════════════════════ */

.view-wrapper {
  padding: 24px;
  animation: fade-in 0.25s ease;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.view-title {
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ════════════════════════════════════════════════════════════════
   Map view
════════════════════════════════════════════════════════════════ */

#map-container {
  position: absolute;
  inset: 0;
  top: var(--header-h);
  left: var(--sidebar-w);
}

#leaflet-map {
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
}

/* Override Leaflet dark theme */
.leaflet-container { background: #0a0d14; }
.leaflet-control-zoom a {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--bg-elevated) !important; }
.leaflet-bar { border: 1px solid var(--border) !important; box-shadow: var(--shadow) !important; }

/* Animated markers */
.marker-pulse {
  border-radius: 50%;
  position: relative;
}
.marker-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.marker-ok   { color: var(--accent-green); }
.marker-hs   { color: var(--accent-red); }
.marker-warn { color: var(--accent-orange); }

/* Leaflet CSS marker override */
.leaflet-div-icon { background: none !important; border: none !important; }

.map-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
}

.map-dot::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
}

.map-dot.dot-ok     { color: var(--accent-green);  background: rgba(0,255,136,0.3); }
.map-dot.dot-hs     { color: var(--accent-red);    background: rgba(255,59,92,0.3); }
.map-dot.dot-warn   { color: var(--accent-orange); background: rgba(255,149,0,0.3); }
.map-dot.dot-muted  { color: var(--text-dim);      background: rgba(61,74,102,0.3); }
.map-dot.dot-build  { color: var(--accent-yellow); background: rgba(255,214,10,0.2); }

.map-dot.dot-ok::before   { animation: pulse-ok  2s infinite; }
.map-dot.dot-hs::before   { animation: pulse-hs  0.8s infinite; }
.map-dot.dot-warn::before { animation: pulse-warn 1.5s infinite; }

/* Radar SVG overlay */
.radar-circle { animation: radar-ring 4s ease-out infinite; }

/* ════════════════════════════════════════════════════════════════
   Side panel
════════════════════════════════════════════════════════════════ */

.side-panel-overlay {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  backdrop-filter: blur(2px);
}

.side-panel-overlay.visible { display: block; }

.side-panel {
  position: fixed;
  top: var(--header-h); right: 0; bottom: 0;
  width: var(--panel-w);
  background: #0e1320;
  border-left: 1px solid rgba(0,212,255,0.25);
  box-shadow: -12px 0 48px rgba(0,0,0,0.85);
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-panel.open {
  transform: translateX(0);
  box-shadow: -8px 0 40px rgba(0,0,0,0.6);
}

.side-panel-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  z-index: 1;
}

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

.side-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Panel sections */
.panel-client-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.panel-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.panel-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.panel-meta-row {
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
}

.panel-meta-label { color: var(--text-muted); min-width: 80px; flex-shrink: 0; }
.panel-meta-value { color: var(--text-primary); }

.panel-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.panel-last-seen {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.panel-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: var(--radius);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition);
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.panel-action:hover { background: rgba(0,212,255,0.2); }

/* ════════════════════════════════════════════════════════════════
   Links table
════════════════════════════════════════════════════════════════ */

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { border-color: var(--accent-cyan); }

.filter-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-elevated);
  transition: all var(--transition);
}

.filter-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.filter-btn.active-all    { background: rgba(0,212,255,0.12);  border-color: var(--accent-cyan);   color: var(--accent-cyan); }
.filter-btn.active-ok     { background: rgba(0,255,136,0.12);  border-color: var(--accent-green);  color: var(--accent-green); }
.filter-btn.active-hs     { background: rgba(255,59,92,0.12);  border-color: var(--accent-red);    color: var(--accent-red); }
.filter-btn.active-warn   { background: rgba(255,149,0,0.12);  border-color: var(--accent-orange); color: var(--accent-orange); }
.filter-btn.active-other  { background: rgba(107,122,153,0.12); border-color: var(--text-muted); color: var(--text-muted); }

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-export:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-top: 16px;
}

.links-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.links-table th {
  background: var(--bg-elevated);
  padding: 11px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.links-table th:hover { color: var(--text-primary); }
.links-table th.sorted { color: var(--accent-cyan); }
.sort-icon { margin-left: 4px; opacity: 0.5; }
.sort-icon.active { opacity: 1; color: var(--accent-cyan); }

.links-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,212,255,0.05);
  color: var(--text-primary);
  white-space: nowrap;
}

.links-table tr:last-child td { border-bottom: none; }

.links-table tbody tr {
  cursor: pointer;
  transition: background var(--transition);
}

.links-table tbody tr:hover td { background: var(--bg-elevated); }

.code-cell {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

.reactivity-cell {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.react-good   { color: var(--accent-green); }
.react-medium { color: var(--accent-orange); }
.react-slow   { color: var(--accent-red); }

/* ════════════════════════════════════════════════════════════════
   Detail view
════════════════════════════════════════════════════════════════ */

.detail-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.detail-code {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 6px;
}

.detail-client {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.detail-meta-value {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.detail-dates {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.date-item { display: flex; flex-direction: column; gap: 3px; }
.date-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.date-value { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-primary); }

/* PPP Sessions */
.ppp-list { display: flex; flex-direction: column; gap: 10px; }

.ppp-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ppp-led-wrap { padding-top: 3px; }

.ppp-info { flex: 1; }

.ppp-login {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ppp-details {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ppp-detail-item { display: flex; gap: 4px; }
.ppp-detail-val { font-family: var(--font-mono); color: var(--text-primary); }

/* Devices */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.device-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.device-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.device-model {
  font-weight: 600;
  margin-bottom: 8px;
}

.device-fields { display: flex; flex-direction: column; gap: 5px; }

.device-field {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
}

.device-field-label { color: var(--text-muted); min-width: 70px; flex-shrink: 0; }
.device-field-val   { font-family: var(--font-mono); color: var(--text-primary); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  margin-left: 4px;
  transition: all var(--transition);
}

.copy-btn:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

/* Process timeline */
.process-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 12px 0 4px;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  flex: 1;
  position: relative;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.process-step:not(:last-child).step-done::after   { background: var(--accent-green); }
.process-step:not(:last-child).step-active::after { background: var(--accent-cyan); }

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
  border: 2px solid;
  margin-bottom: 10px;
}

.step-dot.done   { background: rgba(0,255,136,0.15); border-color: var(--accent-green); color: var(--accent-green); }
.step-dot.active { background: rgba(0,212,255,0.15); border-color: var(--accent-cyan);  color: var(--accent-cyan);  animation: blink-cyan 1s infinite; }
.step-dot.pending{ background: var(--bg-elevated);   border-color: var(--text-dim);     color: var(--text-dim); }

.step-label {
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.3;
  padding: 0 8px;
}

.step-label.done   { color: var(--accent-green); }
.step-label.active { color: var(--accent-cyan); }

.step-tracking {
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0 6px;
}

/* Alert timeline */
.alert-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 28px;
}

.alert-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: var(--border);
}

.alert-item {
  position: relative;
  padding: 12px 0 12px 16px;
}

.alert-dot {
  position: absolute;
  left: -28px;
  top: 16px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: 2px solid;
}

.alert-dot.up       { background: rgba(0,255,136,0.15);  border-color: var(--accent-green);  color: var(--accent-green); }
.alert-dot.down     { background: rgba(255,59,92,0.15);   border-color: var(--accent-red);    color: var(--accent-red); }
.alert-dot.degraded { background: rgba(255,149,0,0.15);   border-color: var(--accent-orange); color: var(--accent-orange); }

.alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.alert-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.alert-reactivity {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.react-fast   { background: rgba(0,255,136,0.12); color: var(--accent-green); }
.react-medium-badge { background: rgba(255,149,0,0.12); color: var(--accent-orange); }
.react-slow-badge   { background: rgba(255,59,92,0.12);  color: var(--accent-red); }

/* Tickets */
.tickets-list { display: flex; flex-direction: column; gap: 8px; }

.ticket-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ticket-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
}

.ticket-info { flex: 1; }

.ticket-subject {
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.ticket-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════════
   Physical view
════════════════════════════════════════════════════════════════ */

.onu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.onu-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.onu-card:hover {
  border-color: var(--border-solid);
  box-shadow: 0 0 20px rgba(0,212,255,0.08);
}

.onu-card.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 24px rgba(0,212,255,0.15);
}

.onu-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.onu-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.onu-address {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.onu-powers {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.power-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.power-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.power-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
}

.power-good   { color: var(--accent-green); }
.power-warn   { color: var(--accent-orange); }
.power-bad    { color: var(--accent-red); }

/* Arc gauge */
.arc-gauge {
  display: block;
  margin: 0 auto 12px;
}

/* Test button */
.btn-test {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: all var(--transition);
}

.btn-test:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.05);
}

.btn-test.scanning {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  pointer-events: none;
}

.btn-test.scan-ok    { border-color: var(--accent-green); color: var(--accent-green); }
.btn-test.scan-error { border-color: var(--accent-red);   color: var(--accent-red); }

/* Heatmap */
.heatmap-section {
  margin-top: 24px;
  animation: fade-in 0.3s ease;
}

.heatmap-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.heatmap-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  cursor: default;
  transition: transform 0.1s;
}

.heatmap-cell:hover { transform: scale(1.4); }
.heatmap-ok          { background: var(--accent-green); opacity: 0.7; }
.heatmap-error       { background: var(--accent-red);   opacity: 0.8; }
.heatmap-unavailable { background: var(--text-dim);     opacity: 0.5; }

.heatmap-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot  { width: 10px; height: 10px; border-radius: 2px; }

.chart-wrap {
  margin-top: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  height: 200px;
  position: relative;
}

/* ════════════════════════════════════════════════════════════════
   Toasts
════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 500;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  max-width: 340px;
  pointer-events: all;
  animation: toast-in 0.3s ease forwards;
}

.toast.hiding { animation: toast-out 0.3s ease forwards; }

.toast-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.toast-body { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-msg   { color: var(--text-muted); font-size: 0.76rem; }

.toast-close {
  color: var(--text-muted);
  padding: 2px;
  border-radius: 4px;
  line-height: 1;
  font-size: 1rem;
  flex-shrink: 0;
}

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

.toast-red    { border-left: 3px solid var(--accent-red);    }
.toast-orange { border-left: 3px solid var(--accent-orange); }
.toast-green  { border-left: 3px solid var(--accent-green);  }
.toast-info   { border-left: 3px solid var(--accent-cyan);   }

/* Toast timer bar */
.toast-timer {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 0 0 var(--radius) var(--radius);
  transition: width linear;
}

/* ════════════════════════════════════════════════════════════════
   Back button
════════════════════════════════════════════════════════════════ */

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: all var(--transition);
}

.btn-back:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* ════════════════════════════════════════════════════════════════
   Utility
════════════════════════════════════════════════════════════════ */

.cache-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,149,0,0.1);
  border: 1px solid rgba(255,149,0,0.3);
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--accent-orange);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state-icon { font-size: 2.5rem; opacity: 0.4; }
.empty-state-text { font-size: 0.9rem; }

.section-gap { margin-bottom: 16px; }

.mono { font-family: var(--font-mono); }

/* ════════════════════════════════════════════════════════════════
   Event Ticker (map bottom bar)
════════════════════════════════════════════════════════════════ */

.event-ticker {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  height: 34px;
  background: rgba(10,13,20,0.92);
  border-top: 1px solid var(--border);
  z-index: 50;
  display: flex;
  align-items: center;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-inner {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 100%;
}

.ticker-inner:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-event {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ticker-event .ticker-code { font-family: var(--font-mono); color: var(--accent-cyan); }
.ticker-event .ticker-ok   { color: var(--accent-green); }
.ticker-event .ticker-hs   { color: var(--accent-red); }
.ticker-event .ticker-warn { color: var(--accent-orange); }
.ticker-event .ticker-time { color: var(--text-dim); font-size: 0.65rem; }
.ticker-sep { color: var(--text-dim); opacity: 0.4; }

/* ════════════════════════════════════════════════════════════════
   Alert Flash Overlay
════════════════════════════════════════════════════════════════ */

.alert-flash {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: rgba(255, 59, 92, 0.12);
  border: 2px solid rgba(255, 59, 92, 0.6);
  animation: flash-pulse 0.6s ease-out forwards;
}

@keyframes flash-pulse {
  0%   { opacity: 1; }
  60%  { opacity: 0.6; }
  100% { opacity: 0; }
}

/* ════════════════════════════════════════════════════════════════
   4G Backup Badge
════════════════════════════════════════════════════════════════ */

.badge-4g {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(255, 149, 0, 0.15);
  border: 1px solid rgba(255, 149, 0, 0.4);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.04em;
  animation: pulse-warn 1.5s infinite;
}

/* ════════════════════════════════════════════════════════════════
   Health Score Gauge
════════════════════════════════════════════════════════════════ */

.health-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.health-ring-bg  { fill: none; stroke: var(--bg-elevated); stroke-width: 5; }
.health-ring-fill{ fill: none; stroke-width: 5; stroke-linecap: round;
                   transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1),
                               stroke 0.5s ease; }
.health-score-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.health-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Table cell health */
.health-cell { text-align: center; }

/* ════════════════════════════════════════════════════════════════
   SLA / Stats bar in header
════════════════════════════════════════════════════════════════ */

.sla-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: default;
}

.sla-value { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--accent-green); }
.sla-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════
   Provider Donut Chart (links view)
════════════════════════════════════════════════════════════════ */

.links-stats-bar {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.donut-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.donut-chart-container { width: 80px; height: 80px; flex-shrink: 0; position: relative; }

.donut-legend { display: flex; flex-direction: column; gap: 5px; }

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-name { color: var(--text-primary); font-weight: 500; }
.donut-count { font-family: var(--font-mono); color: var(--accent-cyan); }

/* Global stats mini-cards */
.stat-mini {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 130px;
}

.stat-mini-value { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.stat-mini-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-top: 4px; }

/* ════════════════════════════════════════════════════════════════
   Global Incidents Heatmap
════════════════════════════════════════════════════════════════ */

.global-heatmap-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  overflow-x: auto;
}

.global-heatmap-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-heatmap-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--accent-red);
  border-radius: 2px;
}

.ghm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.ghm-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  min-width: 84px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghm-cells { display: flex; gap: 2px; }

.ghm-cell {
  width: 12px;
  height: 22px;
  border-radius: 2px;
  cursor: default;
  transition: transform 0.1s;
  flex-shrink: 0;
}

.ghm-cell:hover { transform: scaleY(1.3); }
.ghm-ok          { background: rgba(0,255,136,0.5); }
.ghm-incident    { background: var(--accent-red); opacity: 0.85; }
.ghm-partial     { background: var(--accent-orange); opacity: 0.8; }
.ghm-unknown     { background: var(--bg-elevated); }

.ghm-days-header {
  display: flex;
  gap: 2px;
  padding-left: calc(84px + 6px);
  margin-bottom: 6px;
}

.ghm-day-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   Gantt Incidents Timeline
════════════════════════════════════════════════════════════════ */

.gantt-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  overflow-x: auto;
}

.gantt-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gantt-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--accent-orange);
  border-radius: 2px;
}

.gantt-chart { position: relative; min-width: 600px; }

.gantt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  margin-bottom: 3px;
}

.gantt-row-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  min-width: 84px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-bar-area {
  flex: 1;
  height: 20px;
  background: rgba(0,212,255,0.03);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.gantt-block {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 2px;
}

.gantt-block-down    { background: var(--accent-red);    opacity: 0.8; }
.gantt-block-partial { background: var(--accent-orange); opacity: 0.7; }

.gantt-axis {
  display: flex;
  padding-left: calc(84px + 8px);
  margin-bottom: 8px;
}

.gantt-axis-label {
  flex: 1;
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: left;
}

/* ════════════════════════════════════════════════════════════════
   Kanban — Livraisons en cours
════════════════════════════════════════════════════════════════ */

.kanban-board {
  display: flex;
  gap: 14px;
  padding: 0 24px 24px;
  overflow-x: auto;
  min-height: calc(100vh - var(--header-h) - 80px);
  align-items: flex-start;
}

.kanban-col {
  min-width: 260px;
  max-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 4px;
}

.kanban-col-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.kanban-col-count {
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  animation: fade-in 0.2s ease;
}

.kanban-card:hover {
  border-color: var(--border-solid);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.kanban-card-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.kanban-card-client {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.kanban-card-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
}

/* Stage bar on card left side */
.kanban-card { border-left: 3px solid var(--text-dim); }
.kanban-card.stage-cmd      { border-left-color: var(--accent-cyan); }
.kanban-card.stage-prod     { border-left-color: var(--accent-orange); }
.kanban-card.stage-rdv      { border-left-color: var(--accent-yellow); }
.kanban-card.stage-delivered { border-left-color: var(--accent-green); }

/* Prefetch progress bar */
.prefetch-bar {
  position: fixed;
  top: var(--header-h);
  left: var(--sidebar-w);
  right: 0;
  height: 2px;
  z-index: 80;
  background: var(--bg-elevated);
}

.prefetch-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}

/* ════════════════════════════════════════════════════════════════
   Responsive (minimal)
════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   Kanban — supplemental classes
════════════════════════════════════════════════════════════════ */

.kanban-page {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  overflow: auto;
}

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

.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.kanban-col-header {
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.kanban-col-header.stage-cmd      { color: var(--accent-cyan); border-color: rgba(0,212,255,0.25); }
.kanban-col-header.stage-prod     { color: var(--accent-orange); border-color: rgba(255,149,0,0.25); }
.kanban-col-header.stage-rdv      { color: var(--accent-yellow, #ffd60a); border-color: rgba(255,214,10,0.25); }
.kanban-col-header.stage-delivered { color: var(--accent-green); border-color: rgba(0,255,136,0.25); }

.kanban-count {
  margin-left: auto;
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 1px 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.kanban-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
  opacity: 0.6;
}

.kanban-card-addr {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.kanban-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
}

.kanban-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.kanban-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.kanban-progress-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

.kanban-step {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  opacity: 0.8;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════════════════════
   Ticker supplemental classes
════════════════════════════════════════════════════════════════ */

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.ticker-sep {
  color: var(--text-muted);
  opacity: 0.4;
  margin: 0 8px;
}

.ticker-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 56px;
    --panel-w: 100vw;
  }

  .nav-label    { display: none; }
  .header-subtitle { display: none; }
  .header-kpis  { gap: 2px; }
  .kpi-item     { padding: 4px 10px; min-width: 56px; }
  .kpi-value    { font-size: 1rem; }
  .reactivity-badge { display: none; }

  .detail-code  { font-size: 1.4rem; }
}
