/* ---------- Settings drawer ---------- */

.settings-overlay[hidden] { display: none !important; }
.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(7, 9, 13, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms ease;
  display: flex;
  justify-content: flex-end;
}
.settings-overlay.is-open { opacity: 1; }

.settings-drawer {
  width: min(560px, 96vw);
  height: 100%;
  background: var(--surface-1, #0c0f15);
  border-left: 1px solid var(--border-strong, #232934);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-rows: auto auto 1fr;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.settings-overlay.is-open .settings-drawer { transform: translateX(0); }

.settings-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border, #1a1f29);
}
.settings-drawer__header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.settings-drawer__close {
  font-size: 14px;
  line-height: 1;
  padding: 6px 10px;
}

.settings-drawer__tabs {
  display: flex;
  gap: 4px;
  padding: 8px 14px 0;
  border-bottom: 1px solid var(--border, #1a1f29);
}
.settings-tab {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--fg-muted, #98a0ad);
  padding: 9px 12px;
  font-size: 12.5px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: color 160ms ease, border-color 160ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.settings-tab.is-active {
  color: var(--fg);
  border-bottom-color: var(--accent, #7c8cff);
}
.settings-tab:disabled { cursor: not-allowed; opacity: 0.55; }

.settings-drawer__body {
  overflow: auto;
  padding: 18px 20px 22px;
}
.settings-pane { display: none; }
.settings-pane.is-active { display: block; }

.settings-help {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--fg-muted, #98a0ad);
  line-height: 1.5;
}

.ssh-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.ssh-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.ssh-list__empty {
  font-size: 13px;
  color: var(--fg-muted, #98a0ad);
  padding: 14px;
  text-align: center;
  border: 1px dashed var(--border, #1a1f29);
  border-radius: var(--radius-md, 8px);
}
.ssh-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2, #11151d);
  border: 1px solid var(--border, #1a1f29);
  border-radius: var(--radius-md, 8px);
}
.ssh-row__name { font-weight: 600; font-size: 13px; }
.ssh-row__sub  { font-size: 11.5px; color: var(--fg-muted, #98a0ad); margin-top: 2px; }
.ssh-row__actions { display: inline-flex; gap: 4px; }
.ssh-row__delete { color: var(--danger, #ff7a8a); }

.btn--small {
  padding: 4px 10px;
  font-size: 11.5px;
}

.ssh-form {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border-strong, #232934);
  border-radius: var(--radius-md, 8px);
  background: rgba(124, 140, 255, 0.05);
}
.ssh-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ssh-form__grid label {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg-muted, #98a0ad);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ssh-form__pw { grid-column: 1 / -1; }
.ssh-form__grid input {
  background: var(--surface-1, #0c0f15);
  border: 1px solid var(--border, #1a1f29);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 160ms ease;
}
.ssh-form__grid input:focus {
  border-color: var(--accent, #7c8cff);
}
.ssh-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* Downloads pane — client-side bits the user installs on their own machine. */
.download-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface-2, #11151d);
  border: 1px solid var(--border, #1a1f29);
  border-radius: var(--radius-md, 8px);
}
.download-card__title {
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.download-card__sub {
  font-size: 11.5px;
  color: var(--fg-muted, #98a0ad);
  margin-top: 5px;
  line-height: 1.5;
}
.download-card .btn { flex: none; white-space: nowrap; }

.download-steps { margin-top: 14px; }
.download-steps summary {
  cursor: pointer;
  color: var(--fg);
  font-size: 12.5px;
  padding: 4px 0;
}
.download-steps ol {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--fg-muted, #98a0ad);
  line-height: 1.5;
}
.download-steps code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface-1, #0c0f15);
  border: 1px solid var(--border, #1a1f29);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Wake-word debug readout — live view of what the local engine hears, so the
 * user can confirm it's working (and why a call does / doesn't fire). */
.voice-wake__debug {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--surface-1, #0c0f15);
  border: 1px solid var(--border, #1a1f29);
  border-radius: var(--radius-sm, 6px);
}
.voice-wake__debug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.voice-wake__debug-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-dim, #6e7689);
}
.voice-wake__state {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim, #6e7689);
}
.voice-wake__state[data-state="listening"] { color: var(--success, #5ee2a0); }
.voice-wake__state[data-state="loading"] { color: var(--warning, #f7c873); }
.voice-wake__state[data-state="error"] { color: var(--danger, #ff7a8a); }
.voice-wake__heard {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  word-break: break-word;
  min-height: 1.2em;
}
.voice-wake__heard.is-partial { color: var(--fg-muted, #a3acbd); font-style: italic; }
.voice-wake__match {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim, #6e7689);
  min-height: 1.1em;
}
.voice-wake__match[data-hit="yes"] { color: var(--success, #5ee2a0); }
.voice-wake__match[data-hit="low"] { color: var(--warning, #f7c873); }
