/* ============================================================================
   Harold Pill — Floating Assistant Widget Styles

   Uses CSS variables from shadcn/ui for theme consistency.
   Glassmorphism effect with backdrop-filter for the premium feel.
   ============================================================================ */

/* ── Base ──────────────────────────────────────────────────────────────────── */

.harold-pill {
  position: fixed;
  z-index: 9999;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  transition:
    width 250ms cubic-bezier(0.4, 0, 0.2, 1),
    height 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 250ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 250ms ease;
}

.harold-pill--dragging {
  transition: none;
  cursor: grabbing;
}

/* ── Collapsed orb ─────────────────────────────────────────────────────────── */

.harold-pill--collapsed {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.harold-pill__orb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--card) / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition:
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease;
}

.harold-pill__orb:hover {
  background: hsl(var(--card));
  border-color: hsl(var(--border));
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  color: hsl(var(--foreground));
}

/* ── Voice state glow effects on the collapsed orb ─────────────────────────── */

.harold-pill--listening .harold-pill__orb {
  border-color: hsl(142 71% 45% / 0.5);
  box-shadow:
    0 0 0 3px hsl(142 71% 45% / 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  color: hsl(142 71% 45%);
  animation: harold-pulse-green 2s ease-in-out infinite;
}

.harold-pill--thinking .harold-pill__orb {
  border-color: hsl(38 92% 50% / 0.5);
  box-shadow:
    0 0 0 3px hsl(38 92% 50% / 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  color: hsl(38 92% 50%);
}

/* ── Slow tool active badge (in expanded card state row) ───────────────── */

.harold-pill__tool-active-badge {
  background: hsl(38 92% 50% / 0.12) !important;
  color: hsl(38 92% 50%) !important;
  animation: harold-tool-pulse 2s ease-in-out infinite;
}

@keyframes harold-tool-pulse {
  0%, 100% {
    background: hsl(38 92% 50% / 0.10);
  }
  50% {
    background: hsl(38 92% 50% / 0.22);
  }
}

.harold-pill--speaking .harold-pill__orb {
  border-color: hsl(217 91% 60% / 0.5);
  box-shadow:
    0 0 0 3px hsl(217 91% 60% / 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  color: hsl(217 91% 60%);
  animation: harold-pulse-blue 1.5s ease-in-out infinite;
}

/* ── Expanded card ─────────────────────────────────────────────────────────── */

.harold-pill--expanded {
  width: 280px;
  border-radius: 16px;
  background: hsl(var(--card) / 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--border) / 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* ── Card internal layout ──────────────────────────────────────────────────── */

.harold-pill__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 12px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.harold-pill__header {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: grab;
  touch-action: none;
}

.harold-pill__header:active {
  cursor: grabbing;
}

.harold-pill__title {
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--foreground));
  flex: 1;
  letter-spacing: 0.01em;
}

.harold-pill__header-actions {
  display: flex;
  gap: 2px;
}

.harold-pill__header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.harold-pill__header-btn:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.harold-pill__header-btn--danger:hover {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

/* ── State indicator ───────────────────────────────────────────────────────── */

.harold-pill__state {
  display: flex;
  align-items: center;
}

.harold-pill__state-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.harold-pill__state-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
}

/* ── Connect button ────────────────────────────────────────────────────────── */

.harold-pill__connect-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
  width: 100%;
  justify-content: center;
}

.harold-pill__connect-btn:hover {
  background: hsl(var(--muted));
  border-color: hsl(var(--foreground) / 0.2);
}

/* ── Controls row ──────────────────────────────────────────────────────────── */

.harold-pill__controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.harold-pill__mic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.harold-pill__mic-btn--active {
  background: hsl(142 71% 45% / 0.12);
  color: hsl(142 71% 45%);
}

.harold-pill__mic-btn--active:hover {
  background: hsl(142 71% 45% / 0.2);
}

.harold-pill__mic-btn--muted {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.harold-pill__mic-btn--muted:hover {
  background: hsl(var(--muted) / 0.8);
  color: hsl(var(--foreground));
}

.harold-pill__disconnect-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  cursor: pointer;
  margin-left: auto;
  transition: background 150ms ease;
}

.harold-pill__disconnect-btn:hover {
  background: hsl(var(--destructive) / 0.2);
}

/* ── Focus context ─────────────────────────────────────────────────────────── */

.harold-pill__focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid hsl(var(--border) / 0.3);
}

/* ── Tool grid ─────────────────────────────────────────────────────────────── */

.harold-pill__tools-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.harold-pill__tools-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
}

.harold-pill__tools-toggle:hover .h-3 {
  color: hsl(var(--foreground));
}

.harold-pill__tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-bottom: 2px;
}

.harold-pill__tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border) / 0.3);
}

.harold-pill__tool-name {
  font-size: 9px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: capitalize;
}

.harold-pill__tool-badge {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 3px;
  border-radius: 3px;
}

.harold-pill__tool-badge--core {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.harold-pill__tool-badge--feature {
  background: hsl(38 92% 50% / 0.12);
  color: hsl(38 92% 50%);
}

/* ── Conversation log ──────────────────────────────────────────────────────── */

.harold-pill__log-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 4px;
}

.harold-pill__log-entries {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

.harold-pill__log-entry {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 9px;
  line-height: 1.4;
}

.harold-pill__log-type {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 8px;
  flex-shrink: 0;
  margin-top: 1px;
}

.harold-pill__log-msg {
  color: hsl(var(--muted-foreground));
  word-break: break-word;
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

/* Log entry type colours */
.harold-pill__log-entry--system .harold-pill__log-type {
  background: hsl(var(--muted) / 0.6);
  color: hsl(var(--muted-foreground));
}

.harold-pill__log-entry--user .harold-pill__log-type {
  background: hsl(142 71% 45% / 0.12);
  color: hsl(142 71% 45%);
}

.harold-pill__log-entry--assistant .harold-pill__log-type {
  background: hsl(217 91% 60% / 0.12);
  color: hsl(217 91% 60%);
}

.harold-pill__log-entry--tool_call .harold-pill__log-type {
  background: hsl(38 92% 50% / 0.12);
  color: hsl(38 92% 50%);
}

.harold-pill__log-entry--tool_result .harold-pill__log-type {
  background: hsl(270 60% 55% / 0.12);
  color: hsl(270 60% 55%);
}

.harold-pill__log-entry--error .harold-pill__log-type {
  background: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
}

/* ── Cost ──────────────────────────────────────────────────────────────────── */

.harold-pill__cost {
  display: flex;
  justify-content: flex-end;
}

/* ── Animations ────────────────────────────────────────────────────────────── */

@keyframes harold-pulse-green {
  0%, 100% {
    box-shadow:
      0 0 0 3px hsl(142 71% 45% / 0.12),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 6px hsl(142 71% 45% / 0.06),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
}

@keyframes harold-pulse-blue {
  0%, 100% {
    box-shadow:
      0 0 0 3px hsl(217 91% 60% / 0.12),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 6px hsl(217 91% 60% / 0.06),
      0 4px 16px rgba(0, 0, 0, 0.08);
  }
}

@keyframes harold-ping {
  0%, 90%, 100% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.08),
      0 0 0 0 hsl(var(--primary) / 0.3);
  }
  95% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.08),
      0 0 0 8px hsl(var(--primary) / 0);
  }
}

/* Subtle ping when idle + disconnected to draw attention */
.harold-pill--idle .harold-pill__orb {
  animation: harold-ping 5s ease-in-out infinite;
}

/* ── Task Progress Panel ───────────────────────────────────────────────────── */

.harold-task-panel {
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 6px;
}

.harold-task-panel__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 2px 0;
  border-radius: 6px;
  transition: background 150ms ease;
}

.harold-task-panel__header:hover {
  background: hsl(var(--muted) / 0.3);
}

.harold-task-panel__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.harold-task-panel__title {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--foreground));
  line-height: 1.3;
}

.harold-task-panel__progress-bar {
  height: 3px;
  border-radius: 999px;
  background: hsl(var(--muted) / 0.6);
  overflow: hidden;
}

.harold-task-panel__progress-fill {
  height: 100%;
  border-radius: 999px;
  background: hsl(var(--primary));
  transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.harold-task-panel__progress-fill--error {
  background: hsl(38 92% 50%);
}

.harold-task-panel__progress-fill--done {
  background: hsl(142 71% 45%);
}

.harold-task-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.harold-task-panel__cancel-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  border: none;
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  cursor: pointer;
  transition: background 150ms ease;
}

.harold-task-panel__cancel-btn:hover {
  background: hsl(var(--destructive) / 0.2);
}

.harold-task-panel__steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 2px;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

.harold-task-panel__step {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 4px;
}

.harold-task-panel__step-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.harold-task-panel__step-label {
  font-size: 10px;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.85);
  line-height: 1.3;
}

.harold-task-panel__step-error {
  font-size: 9px;
  color: hsl(var(--destructive));
  line-height: 1.3;
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

/* ── Harold Settings Panel ─────────────────────────────────────────────────── */

.harold-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid hsl(var(--border) / 0.4);
  animation: harold-settings-in 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes harold-settings-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.harold-settings__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.harold-settings__title {
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: 0.01em;
}

.harold-settings__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-size: 10px;
  transition: background 150ms ease, color 150ms ease;
}

.harold-settings__close:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.harold-settings__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.harold-settings__section--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.harold-settings__label {
  font-size: 10px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.harold-settings__sublabel {
  font-size: 9px;
  color: hsl(var(--muted-foreground) / 0.7);
  line-height: 1.3;
}

/* Personality card grid */
.harold-settings__personality-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.harold-settings__personality-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border) / 0.4);
  background: hsl(var(--background) / 0.5);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.harold-settings__personality-card:hover {
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.5);
}

.harold-settings__personality-card--active {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.06);
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.15);
}

.harold-settings__personality-card--active:hover {
  border-color: hsl(var(--primary) / 0.6);
  background: hsl(var(--primary) / 0.08);
}

.harold-settings__personality-header {
  display: flex;
  align-items: center;
  gap: 4px;
}

.harold-settings__personality-icon {
  font-size: 12px;
  line-height: 1;
}

.harold-settings__personality-name {
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--foreground));
  flex: 1;
}

.harold-settings__personality-desc {
  font-size: 9px;
  color: hsl(var(--muted-foreground));
  line-height: 1.3;
}

/* Voice select */
.harold-settings__select {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--background) / 0.5);
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: border-color 150ms ease;
  outline: none;
  width: 100%;
}

.harold-settings__select:hover {
  border-color: hsl(var(--border));
}

.harold-settings__select:focus {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.15);
}

/* Toggle switch */
.harold-settings__toggle-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.harold-settings__toggle {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  border: none;
  background: hsl(var(--muted));
  cursor: pointer;
  flex-shrink: 0;
  transition: background 200ms ease;
}

.harold-settings__toggle--on {
  background: hsl(var(--primary));
}

.harold-settings__toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.harold-settings__toggle--on .harold-settings__toggle-thumb {
  transform: translateX(14px);
}

.harold-settings__note {
  font-size: 9px;
  color: hsl(var(--muted-foreground) / 0.5);
  text-align: center;
  font-style: italic;
}

/* ── Dark mode adjustments ─────────────────────────────────────────────────── */

.dark .harold-pill__orb {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 1px 4px rgba(0, 0, 0, 0.2);
}

.dark .harold-pill__orb:hover {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark .harold-pill--expanded {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Training Diagnostics Panel ────────────────────────────────────────────── */

.harold-pill__diag {
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 4px;
}

.harold-pill__diag-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  color: inherit;
}

.harold-pill__diag-toggle-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: hsl(var(--muted-foreground) / 0.7);
}

.harold-pill__diag-warn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: hsl(38 92% 50% / 0.2);
  color: hsl(38 92% 50%);
  font-size: 9px;
  font-weight: 700;
  padding: 0 3px;
}

.harold-pill__diag-chevron {
  transition: transform 200ms ease;
  display: flex;
  align-items: center;
  color: hsl(var(--muted-foreground) / 0.5);
}

.harold-pill__diag-chevron--open {
  transform: rotate(180deg);
}

.harold-pill__diag-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
  animation: harold-diag-in 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes harold-diag-in {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 250px; }
}

.harold-pill__diag-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.harold-pill__diag-section-title {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground) / 0.6);
  padding-bottom: 1px;
}

.harold-pill__diag-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 0;
}

.harold-pill__diag-key {
  font-size: 9px;
  color: hsl(var(--muted-foreground) / 0.7);
  flex-shrink: 0;
}

.harold-pill__diag-value {
  font-size: 9px;
  color: hsl(var(--foreground) / 0.85);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harold-pill__diag-mono {
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

.harold-pill__diag-status--ok {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: hsl(142 71% 45%);
}

.harold-pill__diag-status--warn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: hsl(38 92% 50%);
}

/* ── Warnings ──────────────────────────────────────────────────────────────── */

.harold-pill__diag-warnings {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.harold-pill__diag-warning {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  background: hsl(38 92% 50% / 0.08);
  border: 1px solid hsl(38 92% 50% / 0.15);
  font-size: 9px;
  color: hsl(38 92% 50%);
  line-height: 1.3;
}

.harold-pill__diag-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Transcript Feed ───────────────────────────────────────────────────────── */

.harold-pill__diag-feed-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 1px 0;
  color: inherit;
}

.harold-pill__diag-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

.harold-pill__diag-feed-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 4px;
  border-radius: 4px;
  border-left: 2px solid transparent;
}

.harold-pill__diag-feed-item--user {
  border-left-color: hsl(142 71% 45% / 0.5);
  background: hsl(142 71% 45% / 0.04);
}

.harold-pill__diag-feed-item--assistant {
  border-left-color: hsl(217 91% 60% / 0.5);
  background: hsl(217 91% 60% / 0.04);
}

.harold-pill__diag-feed-item--system {
  border-left-color: hsl(var(--muted-foreground) / 0.3);
  background: hsl(var(--muted) / 0.3);
}

.harold-pill__diag-feed-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.harold-pill__diag-feed-role {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.harold-pill__diag-feed-item--user .harold-pill__diag-feed-role {
  color: hsl(142 71% 45%);
}

.harold-pill__diag-feed-item--assistant .harold-pill__diag-feed-role {
  color: hsl(217 91% 60%);
}

.harold-pill__diag-feed-item--system .harold-pill__diag-feed-role {
  color: hsl(var(--muted-foreground));
}

.harold-pill__diag-feed-feature {
  font-size: 8px;
  color: hsl(var(--muted-foreground) / 0.5);
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
}

.harold-pill__diag-feed-time {
  font-size: 8px;
  color: hsl(var(--muted-foreground) / 0.4);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.harold-pill__diag-feed-content {
  font-size: 9px;
  color: hsl(var(--foreground) / 0.7);
  line-height: 1.3;
  word-break: break-word;
  max-height: 40px;
  overflow: hidden;
}

/* ============================================================================
   HaroldPanel — Unified interaction panel for the Harold SDK.

   Consolidated styles for:
   - Orb trigger (floating button, collapsed state)
   - Side panel (expanded state)
   - Voice bar (connection controls, state indicator)
   - Chat messages (user + assistant + tool chips)
   - Text input
   - Training diagnostics (collapsible)

   All classes prefixed with `harold-panel`. Uses CSS custom properties
   (--harold-panel-*) for easy theming by host apps.
   ============================================================================ */

/* ── Custom Properties ──────────────────────────────────────────────────── */

:root {
  --harold-panel-width: 380px;
  --harold-panel-bg: #ffffff;
  --harold-panel-header-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --harold-panel-header-text: #f8fafc;
  --harold-panel-border: #e2e8f0;
  --harold-panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  --harold-panel-accent: #f6961d;
  --harold-panel-accent-dark: #e8860a;
  --harold-panel-msg-user-bg: linear-gradient(135deg, #f6961d 0%, #e8860a 100%);
  --harold-panel-msg-user-text: #ffffff;
  --harold-panel-msg-bot-bg: #f1f5f9;
  --harold-panel-msg-bot-text: #1e293b;
  --harold-panel-input-bg: #f8fafc;
  --harold-panel-input-border: #e2e8f0;
  --harold-panel-input-focus: #f6961d;
  --harold-panel-radius: 16px;
  --harold-panel-msg-radius: 14px;
  --harold-panel-voice-bg: #f0fdf4;
  --harold-panel-voice-border: #bbf7d0;
  --harold-panel-voice-text: #166534;
  --harold-panel-muted-bg: #fef3c7;
  --harold-panel-muted-border: #fde68a;
  --harold-panel-muted-text: #92400e;
}

/* ── Shared Animations ──────────────────────────────────────────────────── */

@keyframes harold-panel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes harold-panel-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

@keyframes harold-panel-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes harold-panel-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes harold-panel-orb-glow {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(246, 150, 29, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 4px 16px rgba(246, 150, 29, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1), 0 0 0 6px rgba(246, 150, 29, 0.12);
  }
}

.harold-panel-spin {
  animation: harold-panel-spin 1s linear infinite;
}

/* ── Orb (Collapsed Trigger) ────────────────────────────────────────────── */

.harold-panel-orb {
  position: fixed;
  z-index: 9980;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--harold-panel-accent) 0%, var(--harold-panel-accent-dark) 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(246, 150, 29, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: harold-panel-orb-glow 3s ease-in-out infinite;
}

.harold-panel-orb:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(246, 150, 29, 0.45), 0 3px 8px rgba(0, 0, 0, 0.12);
}

.harold-panel-orb:active {
  transform: scale(0.95);
}

.harold-panel-orb--live {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
  animation: harold-panel-pulse-ring 2s ease-out infinite;
}

.harold-panel-orb--live:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5), 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* Voice-active orb: pronounced green pulsing glow when voice is running with panel closed */
.harold-panel__orb--voice-active {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5), 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 4px rgba(34, 197, 94, 0.25) !important;
  animation: harold-panel-voice-pulse 1.5s ease-in-out infinite !important;
}

.harold-panel__orb--voice-active:hover {
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.6), 0 3px 10px rgba(0, 0, 0, 0.14), 0 0 0 6px rgba(34, 197, 94, 0.2) !important;
}

@keyframes harold-panel-voice-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5), 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 4px rgba(34, 197, 94, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5), 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 12px rgba(34, 197, 94, 0.15);
    transform: scale(1.05);
  }
}

.harold-panel-orb--connecting {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  animation: none;
}

/* ── Panel Container ────────────────────────────────────────────────────── */

.harold-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: var(--harold-panel-width);
  background: var(--harold-panel-bg);
  box-shadow: var(--harold-panel-shadow);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  z-index: 9990;
}

.harold-panel--right {
  right: 0;
  border-left: 1px solid var(--harold-panel-border);
  border-radius: var(--harold-panel-radius) 0 0 var(--harold-panel-radius);
  transform: translateX(100%);
}

.harold-panel--left {
  left: 0;
  border-right: 1px solid var(--harold-panel-border);
  border-radius: 0 var(--harold-panel-radius) var(--harold-panel-radius) 0;
  transform: translateX(-100%);
}

.harold-panel--open {
  transform: translateX(0);
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.harold-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--harold-panel-header-bg);
  color: var(--harold-panel-header-text);
  flex-shrink: 0;
}

.harold-panel__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.harold-panel__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.harold-panel__avatar img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.harold-panel__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.harold-panel__subtitle {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
}

.harold-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.harold-panel__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--harold-panel-header-text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.harold-panel__icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Voice Bar ──────────────────────────────────────────────────────────── */

.harold-panel__voice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--harold-panel-border);
  font-size: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.harold-panel__voice-bar--text-mode {
  background: var(--harold-panel-input-bg);
}

.harold-panel__voice-bar--connecting {
  background: #f8fafc;
}

.harold-panel__voice-bar--voice-active {
  background: rgba(34, 197, 94, 0.08);
  border-bottom-color: rgba(34, 197, 94, 0.3);
}

.harold-panel__voice-bar--listening {
  background: rgba(34, 197, 94, 0.08);
  border-bottom-color: rgba(34, 197, 94, 0.3);
}

.harold-panel__voice-bar--speaking {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}

.harold-panel__voice-bar--thinking {
  background: #f5f3ff;
  border-bottom-color: #ddd6fe;
}

.harold-panel__voice-state {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  font-weight: 500;
}

.harold-panel__voice-state svg {
  flex-shrink: 0;
}

.harold-panel__voice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.harold-panel__voice-dot--listening { background: #22c55e; }
.harold-panel__voice-dot--speaking { background: #3b82f6; }
.harold-panel__voice-dot--thinking { background: #8b5cf6; }

.harold-panel__voice-label {
  color: inherit;
}

.harold-panel__voice-tool {
  font-size: 11px;
  opacity: 0.7;
  font-style: italic;
  margin-left: 4px;
}

.harold-panel__voice-connect-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px dashed var(--harold-panel-border);
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.harold-panel__voice-connect-btn:hover {
  border-color: var(--harold-panel-accent);
  color: var(--harold-panel-accent);
  background: rgba(246, 150, 29, 0.04);
}

.harold-panel__voice-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.harold-panel__voice-btn--end {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.harold-panel__voice-btn--end:hover {
  background: rgba(239, 68, 68, 0.18);
}

/* ── Messages Area ──────────────────────────────────────────────────────── */

.harold-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-behavior: smooth;
}

.harold-panel__messages::-webkit-scrollbar { width: 5px; }
.harold-panel__messages::-webkit-scrollbar-track { background: transparent; }
.harold-panel__messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* ── Empty State ────────────────────────────────────────────────────────── */

.harold-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  flex: 1;
}

.harold-panel__empty-avatar {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: harold-panel-float 3s ease-in-out infinite;
}

.harold-panel__empty-avatar svg,
.harold-panel__empty-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  -o-object-fit: contain;
     object-fit: contain;
}

.harold-panel__empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.harold-panel__empty-text {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  max-width: 260px;
}

/* ── Timestamp Divider ──────────────────────────────────────────────────── */

.harold-panel__timestamp {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  padding: 8px 0 4px;
  letter-spacing: 0.03em;
}

/* ── Message Bubbles ────────────────────────────────────────────────────── */

.harold-panel__msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
  animation: harold-panel-msg-in 0.2s ease-out;
}

.harold-panel__msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.harold-panel__msg--assistant {
  align-self: flex-start;
}

.harold-panel__msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.harold-panel__msg-avatar img,
.harold-panel__msg-avatar svg {
  width: 24px;
  height: 24px;
}

.harold-panel__msg-bubble {
  padding: 10px 14px;
  border-radius: var(--harold-panel-msg-radius);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.harold-panel__msg--user .harold-panel__msg-bubble {
  background: var(--harold-panel-msg-user-bg);
  color: var(--harold-panel-msg-user-text);
  border-bottom-right-radius: 4px;
}

.harold-panel__msg--assistant .harold-panel__msg-bubble {
  background: var(--harold-panel-msg-bot-bg);
  color: var(--harold-panel-msg-bot-text);
  border-bottom-left-radius: 4px;
}

.harold-panel__msg-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

/* ── Tool / Error Chips ─────────────────────────────────────────────────── */

.harold-panel__chip {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
  animation: harold-panel-msg-in 0.2s ease-out;
}

.harold-panel__chip--tool {
  background: #f0f4ff;
  color: #4f46e5;
}

.harold-panel__chip--error {
  background: #fef2f2;
  color: #dc2626;
}

/* ── Active Tool Indicator ──────────────────────────────────────────────── */

.harold-panel__active-tool {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  background: #f0f4ff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 500;
}

/* ── Thinking / Typing Indicator ────────────────────────────────────── */

.harold-panel__thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 18px 8px;
}

.harold-panel__thinking-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  border-radius: 16px 16px 16px 4px;
  background: var(--harold-panel-msg-bg);
}

.harold-panel__typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
}

.harold-panel__typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: harold-panel-bounce 1.4s ease-in-out infinite;
}

.harold-panel__typing-dot:nth-child(2) { animation-delay: 0.16s; }
.harold-panel__typing-dot:nth-child(3) { animation-delay: 0.32s; }

/* ── Input Area ─────────────────────────────────────────────────────────── */

.harold-panel__input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--harold-panel-border);
  background: var(--harold-panel-bg);
  flex-shrink: 0;
}

.harold-panel__input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--harold-panel-input-border);
  border-radius: 10px;
  background: var(--harold-panel-input-bg);
  font-size: 13px;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.harold-panel__input::-moz-placeholder { color: #94a3b8; }

.harold-panel__input::placeholder { color: #94a3b8; }

.harold-panel__input:focus {
  border-color: var(--harold-panel-input-focus);
  box-shadow: 0 0 0 3px rgba(246, 150, 29, 0.12);
}

.harold-panel__input:disabled { opacity: 0.5; cursor: not-allowed; }

.harold-panel__send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--harold-panel-accent) 0%, var(--harold-panel-accent-dark) 100%);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.harold-panel__send-btn:hover:not(:disabled) { opacity: 0.9; transform: scale(1.04); }
.harold-panel__send-btn:active:not(:disabled) { transform: scale(0.96); }
.harold-panel__send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Training Section (Collapsible) ─────────────────────────────────────── */

.harold-panel__training-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 16px;
  border: none;
  border-bottom: 1px solid var(--harold-panel-border);
  background: #fefce8;
  color: #854d0e;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: background 0.15s ease;
}

.harold-panel__training-toggle:hover {
  background: #fef9c3;
}

.harold-panel__training-content {
  border-bottom: 1px solid var(--harold-panel-border);
  max-height: 200px;
  overflow-y: auto;
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .harold-panel {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .harold-panel-orb {
    bottom: 16px !important;
    right: 16px !important;
    width: 48px !important;
    height: 48px !important;
  }
}

/* ── Active Icon Button ─────────────────────────────────────────────────── */

.harold-panel__icon-btn--active {
  background: rgba(246, 150, 29, 0.3);
  color: #f6961d;
}

/* ── Debug Panel ────────────────────────────────────────────────────────── */

.harold-panel__debug {
  flex-shrink: 0;
  border-bottom: 1px solid var(--harold-panel-border);
  background: #0f172a;
  color: #e2e8f0;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 11px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
}

.harold-panel__debug-tabs {
  display: flex;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}

.harold-panel__debug-tab {
  flex: 1;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
}

.harold-panel__debug-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

.harold-panel__debug-tab--active {
  color: #f6961d;
  border-bottom-color: #f6961d;
}

/* ── Debug: Log Tab ─────────────────────────────────────────────────────── */

.harold-panel__debug-log {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.harold-panel__debug-log::-webkit-scrollbar { width: 4px; }
.harold-panel__debug-log::-webkit-scrollbar-track { background: transparent; }
.harold-panel__debug-log::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }

.harold-panel__debug-entry {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 2px 0;
  line-height: 1.4;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.harold-panel__debug-time {
  color: #475569;
  flex-shrink: 0;
  font-size: 10px;
  min-width: 58px;
}

.harold-panel__debug-type {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  min-width: 72px;
}

.harold-panel__debug-msg {
  color: #cbd5e1;
  word-break: break-word;
  font-size: 10px;
}

/* ── Debug: Tools Tab ───────────────────────────────────────────────────── */

.harold-panel__debug-tools {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
}

.harold-panel__debug-empty {
  color: #64748b;
  text-align: center;
  padding: 16px;
  font-style: italic;
}

.harold-panel__debug-tool {
  padding: 4px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.harold-panel__debug-tool-name {
  color: #a5b4fc;
  font-weight: 600;
  font-size: 11px;
}

.harold-panel__debug-tool-desc {
  color: #64748b;
  font-size: 10px;
  margin-top: 1px;
}

/* ── Debug: State Tab ───────────────────────────────────────────────────── */

.harold-panel__debug-state {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
}

.harold-panel__debug-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-size: 11px;
}

.harold-panel__debug-kv span:first-child {
  color: #94a3b8;
}

.harold-panel__debug-kv span:last-child {
  color: #e2e8f0;
  font-weight: 500;
}
