@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-base:        #08080d;
  --bg-surface:     #0e0e15;
  --bg-subtle:      #14141e;
  --bg-hover:       #1a1a27;
  --bg-glass:       rgba(18, 18, 28, 0.72);
  --border:         #1f1f2e;
  --border-light:   #2a2a3e;
  --border-glass:   rgba(255, 255, 255, 0.08);

  --accent:         #6d44f8;
  --accent-hover:   #7d57fc;
  --accent-subtle:  rgba(109, 68, 248, 0.12);
  --cyan:           #00e5ff;
  --cyan-subtle:    rgba(0, 229, 255, 0.1);
  --green:          #10b981;
  --green-subtle:   rgba(16, 185, 129, 0.12);
  --red:            #ef4444;
  --red-subtle:     rgba(239, 68, 68, 0.12);
  --amber:          #f59e0b;
  --amber-subtle:   rgba(245, 158, 11, 0.12);

  --text-high:      #f8fafc;
  --text-mid:       #94a3b8;
  --text-low:       #475569;

  --radius-sm:      4px;
  --radius-md:      6px;
  --radius-lg:      8px;
  --font-ui:        'Manrope', -apple-system, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

button, input, select, textarea {
  font-family: inherit;
}

body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-high);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

header {
  height: 48px;
  background: rgba(14, 14, 21, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.header-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-high);
  white-space: nowrap;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  height: 26px;
}

.status-tag.online {
  background: var(--green-subtle);
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.25);
}

.status-tag.offline {
  background: var(--red-subtle);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
}

.status-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.status-tag.online .status-dot {
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.btn-disconnect {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-mid);
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
  height: 26px;
  display: none;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  outline: none;
}

.btn-disconnect:hover {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.35);
  background: var(--red-subtle);
}

@media (max-width: 480px) {
  header { padding: 0 10px; }
  .header-inner { gap: 6px; }
  .brand-title { font-size: 12.5px; }
  .status-tag { font-size: 10px; padding: 2px 6px; height: 24px; }
  .btn-disconnect { font-size: 10px; padding: 0 7px; height: 24px; }
}

main {
  flex: 1;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-mid);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-high);
  border-color: var(--border-light);
}

.btn-danger {
  background: var(--red-subtle);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--red);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

body.auth-mode {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

body.auth-mode main {
  height: calc(100vh - 48px) !important;
  max-height: calc(100vh - 48px) !important;
  overflow: hidden !important;
  padding: 0 10px !important;
}

body.auth-mode .auth-view {
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.auth-view {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
}

.auth-header {
  margin-bottom: 16px;
}
.auth-header h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 3px;
}
.auth-header p {
  font-size: 11.5px;
  color: var(--text-mid);
  line-height: 1.4;
}

.form-group {
  margin-bottom: 12px;
}
.form-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-high);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }

.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4);
}

.btn.loading {
  opacity: 0.85;
  cursor: wait;
}

.btn.error {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-spinner {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  flex-shrink: 0;
}

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

.btn.loading .btn-spinner {
  display: inline-block;
}
.btn-copy {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-copy:hover { color: #fff; border-color: var(--border-light); }

.dashboard-view {
  display: none;
  padding-bottom: 165px;
}

/* Esports Match Hero Card */
.match-hero-card {
  background: linear-gradient(135deg, rgba(20, 20, 32, 0.75) 0%, rgba(12, 12, 18, 0.85) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease;
}

.match-hero-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.match-hero-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.match-player-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(109, 68, 248, 0.25), rgba(0, 229, 255, 0.15));
  border: 1px solid rgba(109, 68, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4b5fd;
  flex-shrink: 0;
}

.match-player-avatar svg {
  width: 18px;
  height: 18px;
}

.match-player-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.match-player-label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-player-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-badge-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #c4b5fd;
  background: var(--accent-subtle);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(109, 68, 248, 0.25);
  line-height: 1.2;
}

.match-player-id {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-high);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.match-hero-scoreboard {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(8, 8, 13, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  flex-shrink: 0;
}

.hero-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  min-width: 48px;
}

.hero-metric .metric-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.metric-alive .metric-value {
  color: #38bdf8;
}

.metric-kills .metric-value {
  color: var(--green);
}

.hero-metric .metric-label {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-low);
  margin-top: 3px;
}

.hero-metric-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

@media (max-width: 540px) {
  .match-hero-card {
    padding: 8px 12px;
    gap: 10px;
  }
  .match-hero-scoreboard {
    padding: 4px 10px;
    gap: 10px;
  }
  .hero-metric {
    min-width: 38px;
  }
  .hero-metric .metric-value {
    font-size: 14px;
  }
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.tab-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mid);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
  user-select: none;
}

.tab-btn:hover {
  color: var(--text-high);
}

.tab-btn.active {
  color: var(--text-high);
  background: var(--bg-subtle);
  border-color: var(--border-light);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  font-weight: 600;
}

.tab-btn .badge-count {
  font-size: 9.5px;
  font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-mid);
  border: 1px solid var(--border);
  padding: 0 5px;
  border-radius: 999px;
  transition: all 0.15s ease;
}

.tab-btn.active .badge-count {
  background: var(--accent-subtle);
  color: #a78bfa;
  border-color: rgba(109, 68, 248, 0.3);
}

.action-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action {
  height: 29px;
  padding: 0 11px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-action:hover {
  color: var(--text-high);
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.action-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-green {
  background: var(--green);
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.6);
}

.dot-amber {
  background: var(--amber);
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.6);
}

.dot-red {
  background: var(--red);
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.6);
}

.btn-action.btn-start:hover {
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--green-subtle);
  color: #34d399;
}

.btn-action.btn-flush:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--amber-subtle);
  color: #fbbf24;
}

.btn-action.btn-stop:hover {
  border-color: rgba(239, 68, 68, 0.35);
  background: var(--red-subtle);
  color: #f87171;
}

@media (max-width: 520px) {
  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .tab-nav, .action-bar {
    width: 100%;
    display: flex;
  }
  .tab-btn {
    flex: 1;
    justify-content: center;
  }
  .btn-action {
    flex: 1;
    justify-content: center;
  }
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 10px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 5px;
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  min-height: 38px;
  gap: 8px;
}
.feature-card:hover {
  background: rgba(26, 26, 40, 0.85);
  border-color: rgba(255, 255, 255, 0.14);
}
.feature-card.active {
  background: rgba(109, 68, 248, 0.14);
  border-color: rgba(109, 68, 248, 0.45);
}

.feature-info {
  min-width: 0;
  flex: 1;
}

.feature-info h4 {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-high);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feature-info span {
  font-size: 9.5px;
  color: var(--text-mid);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: 1px;
}

.switch {
  position: relative;
  width: 30px;
  height: 16px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.12s;
}
.slider::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 2px;
  top: 2px;
  background: var(--text-low);
  border-radius: 50%;
  transition: 0.12s;
}
.switch input:checked + .slider {
  background: var(--accent);
  border-color: var(--accent);
}
.switch input:checked + .slider::before {
  transform: translateX(14px);
  background: #fff;
}

/* Keybind Custom Component */
.feature-card.feature-keybind-card {
  cursor: default;
  background: rgba(18, 18, 28, 0.85);
}

.feature-card.feature-keybind-card:hover {
  background: rgba(26, 26, 40, 0.95);
  border-color: rgba(109, 68, 248, 0.3);
}

.keybind-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.keybind-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 95px;
}

.keybind-select:hover, .keybind-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.keybind-select option {
  background: var(--bg-surface);
  color: var(--text-high);
}

.keybind-bind-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-mid);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  user-select: none;
}

.keybind-bind-btn:hover {
  color: var(--text-high);
  background: var(--bg-hover);
  border-color: var(--accent);
}

.keybind-bind-btn.capturing {
  background: var(--cyan-subtle);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
  animation: keybindPulse 1.2s infinite ease-in-out;
}

.keybind-icon {
  width: 11px;
  height: 11px;
}

@keyframes keybindPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

.specs-panel { display: none; }
.specs-panel.active { display: block; }

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (max-width: 600px) {
  .specs-grid { grid-template-columns: 1fr; }
}

.spec-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.spec-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(22, 22, 34, 0.8);
}

.spec-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-low);
  margin-bottom: 5px;
}

.spec-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-high);
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
}

.spec-sub {
  font-size: 11px;
  color: var(--text-mid);
  margin-top: 5px;
}

.meter-bar {
  width: 100%;
  height: 5px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
  border: 1px solid var(--border);
}

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

.spec-card-hwid {
  grid-column: 1 / -1;
  background: var(--bg-surface);
}

.spec-hwid-val {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mid);
  letter-spacing: 0.3px;
  word-break: break-all;
  user-select: all;
  margin-top: 2px;
}

.console-wrapper {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 980px;
  background: rgba(14, 18, 23, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  z-index: 999;
  transition: all 0.2s ease;
}

@media (max-width: 520px) {
  .console-wrapper {
    bottom: 0;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
}

.console-bar {
  background: var(--bg-subtle);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.console-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.console-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.console-body {
  height: 125px;
  overflow-y: auto;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.console-body::-webkit-scrollbar {
  width: 4px;
}

.console-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

.console-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  transition: background 0.15s ease;
}

.console-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.console-wrapper.collapsed .console-body {
  display: none;
}

.console-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  word-break: break-all;
}

.log-time {
  color: var(--text-low);
  font-size: 9.5px;
  flex-shrink: 0;
}

.log-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 0 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.tag-toggle  { background: var(--accent-subtle); color: var(--accent); }
.tag-engine  { background: var(--green-subtle);  color: var(--green); }
.tag-client  { background: var(--cyan-subtle);   color: var(--cyan); }
.tag-action  { background: var(--cyan-subtle);   color: var(--cyan); }
.tag-warn    { background: var(--amber-subtle);  color: var(--amber); }
.tag-error   { background: var(--red-subtle);    color: var(--red); }
.tag-system  { background: var(--bg-hover);      color: var(--text-mid); }

.log-msg { color: var(--text-high); }
