:root {
  /* Solid Surface Hierarchy - High Contrast Flat Dark (No Blurs, No Gradients) */
  --bg-app: #000000;
  --bg-panel: #0d0d10;
  --bg-surface: #131316;
  --bg-surface-elevated: #18181c;
  --bg-surface-hover: #222228;
  --bg-input: #09090b;
  
  /* Solid Sharp Borders */
  --border-subtle: #202025;
  --border-medium: #2a2a32;
  --border-focus: #52525b;
  
  /* Text Contrast */
  --text-main: #f4f4f6;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  /* Solid Semantic Accents */
  --accent-emerald: #22c55e;
  --accent-blue: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-purple: #c084fc;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.app-container {
  max-width: 1720px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Top App Header / Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: #18181b;
  color: #ffffff;
  border: 1px solid var(--border-medium);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Navbar telemetry ribbon */
.nav-telemetry-ribbon {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.78rem;
}

.ribbon-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ribbon-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ribbon-value {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-weight: 500;
}

.ribbon-value.highlight {
  color: var(--accent-blue);
  font-weight: 600;
}

.nav-badges {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border-medium);
  background: #18181b;
  color: var(--text-main);
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}

.phase-badge {
  background: #18181b;
  color: #a5b4fc;
  border-color: #27272a;
}

.status-badge {
  background: #18181b;
  color: #22c55e;
  border-color: #27272a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green {
  background-color: #22c55e;
}

/* State indicators */
.state-indicator {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  background: #18181b;
  border: 1px solid #27272a;
}

.state-indicator.disconnected {
  color: #ef4444;
  border-color: #ef4444;
}

.state-indicator.connecting {
  color: #f59e0b;
  border-color: #f59e0b;
}

.state-indicator.connected {
  color: #22c55e;
  border-color: #22c55e;
}

.state-indicator.idle {
  color: #71717a;
  border-color: #27272a;
}

.state-indicator.streaming {
  color: #38bdf8;
  border-color: #38bdf8;
}

/* Control Panel / Session Toolbar */
.control-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-end;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.input-group {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.input-group input,
.input-group select,
.select-input {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s;
}

.input-group input:focus,
.input-group select:focus,
.select-input:focus {
  border-color: var(--border-focus);
}

.actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon-subtle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
}

.btn-icon-subtle:hover {
  color: #ffffff;
}

/* Quick Persona Switcher Strip */
.persona-chips-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 2px;
  flex-wrap: wrap;
}

.persona-chips-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.btn-persona-chip {
  padding: 3px 9px;
  font-size: 0.74rem;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: 4px;
  background: #18181b;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.1s, border-color 0.1s, color 0.1s;
}

.btn-persona-chip:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-muted);
  color: var(--text-main);
}

.btn-persona-chip.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #000000;
  font-weight: 600;
}

.btn-persona-chip.btn-persona-random {
  color: #38bdf8;
  border-color: #27272a;
}

.btn-persona-chip.btn-persona-random:hover {
  background: #18181b;
  border-color: #38bdf8;
  color: #ffffff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background-color 0.1s, border-color 0.1s, color 0.1s;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button: Solid White with Black text (Flat Vercel / shadcn style) */
.btn-primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: #e4e4e7;
  border-color: #e4e4e7;
}

.btn-secondary {
  background: #18181b;
  color: #f4f4f5;
  border-color: #27272a;
}

.btn-secondary:hover:not(:disabled) {
  background: #27272a;
  border-color: #3f3f46;
}

.btn-danger {
  background: #18181b;
  color: #ef4444;
  border-color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
  background: #ef4444;
  color: #ffffff;
}

.btn-sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.74rem;
  background: #18181b;
  border: 1px solid var(--border-medium);
  color: var(--text-main);
}

.btn-sm:hover:not(:disabled) {
  background: #27272a;
  border-color: var(--text-muted);
}

.btn-warning {
  background: #18181b;
  color: #f59e0b;
  border-color: #d97706;
}

.btn-warning:hover:not(:disabled) {
  background: #d97706;
  color: #ffffff;
}

.btn-info {
  background: #18181b;
  color: #38bdf8;
  border-color: #0284c7;
}

.btn-info:hover:not(:disabled) {
  background: #0284c7;
  color: #ffffff;
}

/* Workstation Main Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.stage-column,
.diagnostics-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Cards */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--border-medium);
}

.publisher-card {
  position: relative;
}

.subscriber-card {
  position: relative;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.card-icon {
  width: 17px;
  height: 17px;
  color: var(--text-secondary);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.2rem 0;
}

.info-row .label {
  color: var(--text-secondary);
}

.info-row .value {
  color: var(--text-main);
  font-weight: 500;
}

.info-row .mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
}

.info-row .highlight {
  color: var(--accent-blue);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Metric chip grid inside cards */
.metric-grid-2x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.metric-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metric-cell-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-cell-value {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Media Publisher (Local Ingress) */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#local-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #000;
  transform: scaleX(-1);
  transition: opacity 0.2s ease;
}

/* Meet Avatar Placeholder when Camera is Off */
.meet-avatar-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: #111114;
  z-index: 2;
  user-select: none;
}

.meet-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  letter-spacing: -0.02em;
}

.meet-avatar-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

/* Meet Floating Controls Bar */
.meet-floating-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  z-index: 10;
}

/* Meet Circular Buttons (44px target) */
.btn-meet-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  position: relative;
}

.btn-meet-circle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-meet-circle:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-meet-circle.muted,
.btn-meet-circle.off {
  background: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.btn-meet-circle.muted:hover,
.btn-meet-circle.off:hover {
  background: #b91c1c !important;
}

/* Audio VU Meter (3 bouncing sound level bars) */
.meet-audio-meter {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 4px;
}

.meter-bar {
  width: 3.5px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: height 0.08s ease, background-color 0.12s ease;
}

.meet-audio-meter.active .meter-bar {
  background: var(--accent-emerald);
}

/* Device Picker Popover */
.device-picker-wrapper {
  position: relative;
}

.device-picker-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 25;
}

.device-picker-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.device-picker-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.device-picker-field label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.select-sm {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  user-select: none;
}

.video-placeholder-svg {
  width: 44px;
  height: 44px;
  opacity: 0.35;
  color: var(--text-muted);
}

/* Google Meet Action Bar (Join Now & Leave Call) */
.meet-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 6px;
  width: 100%;
}

.btn-meet-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1a73e8;
  color: #ffffff;
  border: none;
  border-radius: 28px;
  padding: 10px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
  width: 100%;
  max-width: 320px;
}

.btn-meet-join:hover {
  background: #1557b0;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.5);
  transform: translateY(-1px);
}

.btn-meet-leave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 28px;
  padding: 10px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
  width: 100%;
  max-width: 320px;
}

.btn-meet-leave:hover {
  background: #b91c1c;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.5);
  transform: translateY(-1px);
}

.publisher-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.publisher-controls .btn {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
}

.source-selector-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.source-selector-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.source-selector-group .select-input {
  flex: 1;
  max-width: 320px;
}

/* Media Subscriber (Remote Egress) & Participant Cards */
.remote-videos-container {
  width: 100%;
  min-height: 220px;
  max-height: 540px;
  overflow-y: auto;
  border-radius: 6px;
}

.remote-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  width: 100%;
  min-height: 200px;
}

#remote-placeholder {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.remote-video-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.remote-video-card:hover {
  border-color: var(--border-focus);
}

.remote-video-card.speaking,
.publisher-card.speaking {
  border-color: var(--accent-emerald) !important;
}

.remote-video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.75rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}

.remote-track-identity {
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.remote-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.remote-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.camera-off-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--text-muted);
  z-index: 6;
}

.avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #18181b;
  border: 1px solid var(--border-medium);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.camera-off-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.participant-badges {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.badge-muted {
  background: #18181b !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-subtle) !important;
}

/* Codec Badges & Video Overlays */
.badge-codec {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #18181b;
  border: 1px solid var(--border-medium);
}

.badge-codec.codec-vp9 {
  color: #c084fc !important;
  border-color: #a855f7 !important;
}

.badge-codec.codec-av1 {
  color: #38bdf8 !important;
  border-color: #0284c7 !important;
}

.badge-codec.codec-vp8 {
  color: #22c55e !important;
  border-color: #16a34a !important;
}

.badge-codec.codec-opus {
  color: #fbbf24 !important;
  border-color: #d97706 !important;
}

.video-stats-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 5px;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.video-stats-overlay .codec-pill,
.video-stats-overlay .res-fps-pill {
  background: #09090b;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-medium);
}

.video-stats-overlay .codec-pill.codec-vp9 {
  color: #c084fc;
  border-color: #a855f7;
}

.video-stats-overlay .codec-pill.codec-av1 {
  color: #38bdf8;
  border-color: #0284c7;
}

.video-stats-overlay .codec-pill.codec-vp8 {
  color: #22c55e;
  border-color: #16a34a;
}

.video-stats-overlay .res-fps-pill {
  color: #cbd5e1;
}

/* Adaptive controls & screenshare toolbar */
.adaptive-controls,
.ekyc-screenshare-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.78rem;
}

.adaptive-controls label,
.ekyc-screenshare-bar label {
  color: var(--text-secondary);
  font-size: 0.76rem;
  user-select: none;
  cursor: pointer;
}

.tile-size-group {
  display: flex;
  gap: 3px;
}

/* Roster Table */
.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.roster-table th {
  padding: 0.45rem 0.65rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.roster-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 1.25rem !important;
}

/* Range Sliders */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border-medium);
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #000000;
  cursor: pointer;
}

.quick-buttons {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.btn-outline-danger {
  color: #ef4444;
  border: 1px solid #ef4444;
  background: #18181b;
}
.btn-outline-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-outline-warning {
  color: #f59e0b;
  border: 1px solid #d97706;
  background: #18181b;
}
.btn-outline-warning:hover {
  background: #d97706;
  color: #ffffff;
}

.btn-outline-info {
  color: #38bdf8;
  border: 1px solid #0284c7;
  background: #18181b;
}
.btn-outline-info:hover {
  background: #0284c7;
  color: #ffffff;
}

.btn-outline-success {
  color: #22c55e;
  border: 1px solid #16a34a;
  background: #18181b;
}
.btn-outline-success:hover {
  background: #16a34a;
  color: #ffffff;
}

/* Deficient Alert Banner */
.deficient-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #18181b;
  border: 1px solid #ef4444;
  border-radius: 4px;
  color: #ef4444;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Deficient paused overlay on remote video tiles */
.deficient-paused-overlay {
  position: absolute;
  inset: 0;
  background: #09090b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 15;
  padding: 1rem;
  text-align: center;
}

.deficient-paused-overlay .paused-title {
  color: var(--accent-amber);
  font-weight: 600;
  font-size: 0.82rem;
}

.deficient-paused-overlay .paused-sub {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-top: 3px;
}

/* Dynacast layers grid */
.dynacast-layers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dynacast-layer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: #18181b;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.dynacast-layer-box .layer-title {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.layer-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.layer-badge.active {
  background: #18181b;
  color: #22c55e;
  border: 1px solid #22c55e;
}

.layer-badge.paused {
  background: #18181b;
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* Data Channel Chat */
.chat-messages-container {
  overflow-y: auto;
  max-height: 180px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.chat-empty-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  margin: auto;
}

.chat-input-bar {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.chat-input-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  padding: 0.45rem 0.75rem;
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: var(--border-focus);
}

.badge-dc {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #18181b;
  border: 1px solid var(--border-subtle);
}

.badge-dc.dc-closed {
  color: #ef4444;
  border-color: #ef4444;
}

.badge-dc.dc-open {
  color: #22c55e;
  border-color: #22c55e;
}

.dc-badges {
  display: flex;
  gap: 0.4rem;
}

/* Real-Time Protocol Frame Inspector */
.inspector-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.inspector-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inspector-title h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.inspector-title .subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.inspector-logs {
  background: #000000;
  padding: 0.85rem;
  height: 240px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.log-entry {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  word-break: break-all;
  line-height: 1.4;
}

.log-time {
  color: var(--text-muted);
  flex-shrink: 0;
}

.log-entry.in .log-msg {
  color: #38bdf8;
}

.log-entry.out .log-msg {
  color: #c084fc;
}

.log-entry.system .log-msg {
  color: #a1a1aa;
}

.log-entry.error .log-msg {
  color: #ef4444;
}

.log-entry.success .log-msg {
  color: #22c55e;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .nav-telemetry-ribbon {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 0.75rem;
    gap: 0.85rem;
  }
  .control-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .actions-group {
    justify-content: flex-end;
  }
  .metric-grid-2x3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
