/* ═══════════════════════════════════════════════════════════════════════
   TELEPHONY DASHBOARD — Ultra-Premium Dark Glassmorphism UI
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Base palette — deep void with cool undertones */
  --bg-void: #050608;
  --bg-base: #0a0c10;
  --bg-surface: rgba(18, 20, 26, 0.72);
  --bg-surface-hover: rgba(24, 27, 35, 0.82);
  --bg-glass: rgba(255, 255, 255, 0.025);
  --bg-glass-hover: rgba(255, 255, 255, 0.05);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-active: rgba(88, 101, 242, 0.4);

  /* Text */
  --text-primary: #e8eaed;
  --text-secondary: #8b909c;
  --text-muted: #5a5f6b;
  --text-faint: #3d4148;

  /* Accent — electric indigo */
  --accent: #5865f2;
  --accent-glow: rgba(88, 101, 242, 0.35);
  --accent-soft: rgba(88, 101, 242, 0.12);

  /* Call states */
  --call-active: #2ecc71;
  --call-active-glow: rgba(46, 204, 113, 0.4);
  --call-ringing: #f39c12;
  --call-ringing-glow: rgba(243, 156, 18, 0.4);
  --call-hangup: #e74c3c;
  --call-hangup-glow: rgba(231, 76, 60, 0.4);

  /* Disposition colors */
  --dispo-interested: #2ecc71;
  --dispo-gatekeeper: #f39c12;
  --dispo-callback: #3498db;
  --dispo-dnc: #e74c3c;

  /* Shadows */
  --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --shadow-call-active: 0 0 32px var(--call-active-glow);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-med: 200ms ease;
  --t-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-void);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  user-select: none;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 15% 20%, rgba(88, 101, 242, 0.08), transparent 60%),
    radial-gradient(ellipse 600px 500px at 85% 80%, rgba(46, 204, 113, 0.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── App Shell ────────────────────────────────────────────────────────── */
#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Top Bar ──────────────────────────────────────────────────────────── */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

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

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  flex-shrink: 0;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.conn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--t-med);
}

.conn-status.disconnected {
  background: rgba(231, 76, 60, 0.1);
  color: var(--call-hangup);
}

.conn-status.connecting {
  background: rgba(243, 156, 18, 0.1);
  color: var(--call-ringing);
}

.conn-status.connected {
  background: rgba(46, 204, 113, 0.1);
  color: var(--call-active);
}

.conn-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

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

.conn-status.connected .conn-pulse {
  box-shadow: 0 0 8px currentColor;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.btn-ghost {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-ghost:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

/* ── Workspace (3-panel grid) ─────────────────────────────────────────── */
#workspace {
  display: grid;
  grid-template-columns: 1fr 360px 1fr;
  gap: 16px;
  padding: 16px 24px;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── Panel Base ───────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.panel-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════
   PANEL 1 — LEAD CONTEXT VIEWPORT
   ═══════════════════════════════════════════════════════════════════════ */

.lead-counter {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.lead-card {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.lead-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
}

.lead-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.lead-empty p {
  font-size: 14px;
  color: var(--text-secondary);
}

.lead-empty-sub {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  margin-top: 4px;
}

.lead-info {
  animation: fadeInUp var(--t-slow);
}

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

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

.lead-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Status Badge ─────────────────────────────────────────────────── */
.lead-status-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  transition: all var(--t-med);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lead-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Status-specific color themes */
.lead-status-badge.status-new {
  background: rgba(88, 101, 242, 0.12);
  border-color: rgba(88, 101, 242, 0.3);
  color: #7d8bff;
}

.lead-status-badge.status-called {
  background: rgba(52, 152, 219, 0.12);
  border-color: rgba(52, 152, 219, 0.3);
  color: #5dade2;
}

.lead-status-badge.status-voicemail {
  background: rgba(243, 156, 18, 0.12);
  border-color: rgba(243, 156, 18, 0.3);
  color: #f5b041;
}

.lead-status-badge.status-interested {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.lead-status-badge.status-callback {
  background: rgba(155, 89, 182, 0.12);
  border-color: rgba(155, 89, 182, 0.3);
  color: #bb8fce;
}

.lead-status-badge.status-dnc {
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.3);
  color: #ec7063;
}

.lead-status-badge.status-unknown {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glass);
  color: var(--text-muted);
}

.lead-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}

.lead-meta-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass);
}

.lead-meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead-meta-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-word;
}

.lead-meta-value a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast);
}

.lead-meta-value a:hover {
  color: #7d8bff;
  text-decoration: underline;
}

.lead-nav {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.btn-nav {
  flex: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-nav:not(:disabled):hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.btn-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════
   PANEL 2 — SOFTPHONE
   ═══════════════════════════════════════════════════════════════════════ */

.panel-softphone {
  /* Fixed-width middle column */
}

/* Digital display */
.dial-display-wrap {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.dial-display {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  position: relative;
  overflow: hidden;
}

.dial-display::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.04), transparent 60%);
  pointer-events: none;
}

.dial-number {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  z-index: 1;
}

.call-timer {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--call-active);
  font-weight: 600;
  z-index: 1;
}

.call-state {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
  transition: color var(--t-med);
}

.call-state.ringing { color: var(--call-ringing); }
.call-state.active { color: var(--call-active); }
.call-state.hangup { color: var(--call-hangup); }

/* Device selectors */
.device-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.device-selector {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* Critical: allows the child <select> to shrink below its content width
     in a CSS grid cell. Without this, long option text forces the column
     to expand, pushing the adjacent dropdown off-screen. */
  min-width: 0;
  overflow: hidden;
}

.device-selector label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-device {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px 28px 8px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: all var(--t-fast);
  font-family: var(--font-sans);
  /* Constrain to grid cell width — clip long device names with ellipsis */
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Native select arrow padding + appearance */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%238b909c' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
}

.select-device:hover { border-color: var(--border-active); }
.select-device:focus { border-color: var(--accent); }

/* Responsive: stack vertically on narrow panels */
@media (max-width: 480px) {
  .device-selectors {
    grid-template-columns: 1fr;
  }
}

/* Dialpad */
.dialpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 20px;
}

.dial-key {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-md);
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-sans);
  gap: 1px;
}

.dial-key span {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.dial-key small {
  font-size: 8px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 1;
  min-height: 8px;
}

.dial-key:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.dial-key:active {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(0.96);
}

/* Call / Hangup controls */
.call-controls {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
}

.btn-call, .btn-hangup {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-med);
  position: relative;
  overflow: hidden;
}

.btn-call {
  background: linear-gradient(135deg, #1a8a4c, #2ecc71);
  color: #fff;
  height: 48px;
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.25);
}

.btn-call:not(:disabled):hover {
  box-shadow: 0 4px 24px rgba(46, 204, 113, 0.4);
  transform: translateY(-1px);
}

.btn-call:not(:disabled):active { transform: scale(0.97); }

.btn-call:disabled {
  background: rgba(46, 204, 113, 0.15);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-hangup {
  background: linear-gradient(135deg, #a83232, #e74c3c);
  color: #fff;
  height: 48px;
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.25);
}

.btn-hangup:not(:disabled):hover {
  box-shadow: 0 4px 24px rgba(231, 76, 60, 0.4);
  transform: translateY(-1px);
}

.btn-hangup:not(:disabled):active { transform: scale(0.97); }

.btn-hangup:disabled {
  background: rgba(231, 76, 60, 0.15);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-call-icon, .btn-hangup-icon { font-size: 16px; }
.btn-call-label, .btn-hangup-label { letter-spacing: 0.03em; }

/* Caller ID */
.caller-id-wrap {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.caller-id-wrap label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.caller-id-input {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-mono);
  outline: none;
  transition: border var(--t-fast);
}

.caller-id-input:focus { border-color: var(--accent); }
.caller-id-input::placeholder { color: var(--text-faint); }

/* ═══════════════════════════════════════════════════════════════════════
   PANEL 3 — DISPOSITIONS
   ═══════════════════════════════════════════════════════════════════════ */

.panel-dispo {
  /* Right column */
}

.dispo-hint {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.dispo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
}

.dispo-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-md);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--t-med);
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.dispo-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}

.dispo-interested::before { background: radial-gradient(circle at center, rgba(46, 204, 113, 0.15), transparent 70%); }
.dispo-gatekeeper::before { background: radial-gradient(circle at center, rgba(243, 156, 18, 0.15), transparent 70%); }
.dispo-callback::before { background: radial-gradient(circle at center, rgba(52, 152, 219, 0.15), transparent 70%); }
.dispo-dnc::before { background: radial-gradient(circle at center, rgba(231, 76, 60, 0.15), transparent 70%); }

.dispo-btn:hover::before { opacity: 1; }
.dispo-btn:hover { border-color: var(--border-active); transform: translateY(-2px); }
.dispo-btn:active { transform: scale(0.96); }

.dispo-icon { font-size: 24px; z-index: 1; }

.dispo-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  z-index: 1;
}

.dispo-interested .dispo-icon { color: var(--dispo-interested); }
.dispo-gatekeeper .dispo-icon { color: var(--dispo-gatekeeper); }
.dispo-callback .dispo-icon { color: var(--dispo-callback); }
.dispo-dnc .dispo-icon { color: var(--dispo-dnc); }

/* Disposition stats */
.dispo-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--border-subtle);
}

.dispo-stat-item {
  background: var(--bg-surface);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dispo-stat-num {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

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

/* ═══════════════════════════════════════════════════════════════════════
   DIAGNOSTIC LOG OVERLAY
   ═══════════════════════════════════════════════════════════════════════ */

.log-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: rgba(5, 6, 8, 0.92);
  border-top: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: height var(--t-slow);
}

.log-overlay.collapsed { height: 32px; }

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 24px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  height: 32px;
}

.log-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.log-controls { display: flex; gap: 4px; }

.log-btn {
  background: none;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all var(--t-fast);
}

.log-btn:hover { color: var(--text-primary); border-color: var(--border-active); }

.log-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
}

.log-body::-webkit-scrollbar { width: 4px; }
.log-body::-webkit-scrollbar-track { background: transparent; }
.log-body::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 2px; }

.log-line {
  white-space: pre-wrap;
  word-break: break-all;
  padding: 1px 0;
}

.log-info { color: var(--text-secondary); }
.log-success { color: var(--call-active); }
.log-warn { color: var(--call-ringing); }
.log-error { color: var(--call-hangup); }
.log-event { color: #9b8dff; }

.log-line .log-time {
  color: var(--text-faint);
  margin-right: 8px;
}

/* ── Scrollbar styling (global) ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #workspace { grid-template-columns: 1fr 320px 1fr; }
}

@media (max-width: 900px) {
  #workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    overflow-y: auto;
  }
  .log-overlay { position: relative; }
  #app { height: auto; min-height: 100vh; overflow: auto; }
  html, body { overflow: auto; }
}