/* ═══════════════════════════════════════════
   HQ Settings View Styles
   Account, projects, debug, system sections.
   Depends on tokens.css.
   ═══════════════════════════════════════════ */

/* ── View shell ────────────────────────────── */
.settings-view {
  flex: 1;
  overflow: auto;
  padding: var(--space-5) var(--space-7);
}

/* ── Header ────────────────────────────────── */
.settings-header {
  margin-bottom: var(--space-5);
}

.settings-header__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  line-height: 1.1;
}

.settings-header__sub {
  font-size: var(--text-sm);
  color: var(--color-dim);
  margin-top: 2px;
}

/* ── Body layout ───────────────────────────── */
.settings-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-5);
  align-items: start;
}

/* ── Left rail ─────────────────────────────── */
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 6px;
  position: sticky;
  top: 0;
}

.settings-nav__item {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--color-dim);
  cursor: pointer;
  text-align: left;
  min-height: 40px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.settings-nav__item:hover {
  background: var(--color-panel2);
  color: var(--color-text);
}

.settings-nav__item.is-active {
  background: var(--color-amber-dim);
  color: var(--color-amber);
}

/* ── Content pane ──────────────────────────── */
.settings-content {
  min-width: 0; /* lets long table cells shrink without blowing grid */
}

.settings-section {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.settings-section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.settings-section__subtitle {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  margin-top: var(--space-2);
}

.settings-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-5) 0;
}

/* ── Fields ────────────────────────────────── */
.settings-field {
  margin-bottom: var(--space-3);
}

.settings-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-dim);
  display: block;
  margin-bottom: 4px;
}

.settings-input,
.settings-select {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color var(--transition-fast);
  min-height: 40px;
}

.settings-input:focus,
.settings-select:focus {
  border-color: var(--color-amber-glow);
}

.settings-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238A8074'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.settings-readonly {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.settings-help {
  font-size: var(--text-sm);
  color: var(--color-dim);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

/* Numbered steps inside a help block (e.g. the iOS "Add to Home Screen"
   push-notification instructions). The global reset zeroes list padding,
   so restore enough indent for the markers to show. */
.settings-help__steps {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-5);
  line-height: 1.6;
}

.settings-help__steps li {
  margin-bottom: var(--space-1);
}

/* ── Buttons ───────────────────────────────── */
.settings-btn-primary {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--color-amber);
  color: var(--color-bg);
  cursor: pointer;
  min-height: 40px;
  transition: opacity var(--transition-fast);
}

.settings-btn-primary:hover   { opacity: 0.88; }
.settings-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-btn-secondary {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  min-height: 40px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.settings-btn-secondary:hover {
  background: var(--color-panel2);
  border-color: var(--color-muted);
}

/* ── Error / success ───────────────────────── */
.settings-error {
  background: #E8555522;
  border: 1px solid #E8555544;
  color: var(--color-red);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.4;
  margin: var(--space-2) 0;
}

.settings-success {
  background: #5CB85C22;
  border: 1px solid #5CB85C44;
  color: var(--color-green);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.4;
  margin: var(--space-2) 0;
}

.settings-empty {
  color: var(--color-dim);
  font-size: var(--text-base);
  padding: 20px 0;
  text-align: center;
}

/* ── Projects section ──────────────────────── */
/* (Card-era .settings-project-row* rules removed with the 2c dense-table
   re-skin; the save-state indicator below is still used by the table.) */

.settings-project-row__status {
  font-size: 10px;
  height: 14px;
  color: var(--color-dim);
}

.settings-project-row__status.is-ok  { color: var(--color-green); }
.settings-project-row__status.is-err { color: var(--color-red); }

/* ── Projects section — CRUD additions ───── */
.settings-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.settings-btn-primary--sm {
  padding: 6px 12px;
  font-size: var(--text-sm);
}

.settings-help--tight {
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-dim);
}

.settings-btn-icon {
  min-width: 32px;
  min-height: 32px;
  padding: 4px 8px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.settings-btn-icon:hover:not(:disabled) {
  border-color: var(--color-amber);
  color: var(--color-amber);
}

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

.settings-btn-danger {
  background: transparent;
  color: var(--color-red, #c56b6b);
  border: 1px solid #c56b6b55;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
}

.settings-btn-danger:hover:not(:disabled) {
  background: #c56b6b22;
  border-color: #c56b6b;
}

.settings-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-modal__actions--split {
  justify-content: space-between;
}

.settings-modal__actions-right {
  display: flex;
  gap: 8px;
}

/* ── Project color swatch grid ───────────── */
.project-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.project-swatch:hover {
  transform: scale(1.08);
}

.project-swatch.is-active {
  border-color: var(--color-text);
  box-shadow: 0 0 0 2px var(--color-panel), 0 0 0 3px var(--color-amber);
}

.project-swatch:focus-visible {
  outline: 2px solid var(--color-amber);
  outline-offset: 2px;
}

/* ── Debug toggle list ─────────────────────── */
.settings-toggle-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
  min-height: 56px;
}

.settings-toggle-row:hover {
  border-color: var(--color-muted);
}

.settings-toggle-row__text {
  flex: 1;
  min-width: 0;
}

.settings-toggle-row__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

.settings-toggle-row__desc {
  font-size: var(--text-sm);
  color: var(--color-dim);
  margin-top: 2px;
}

.settings-toggle-row__switch {
  width: 40px;
  height: 22px;
  background: var(--color-border);
  border-radius: 11px;
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.settings-toggle-row__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--color-text);
  border-radius: 50%;
  transition: left var(--transition-fast);
}

.settings-toggle-row.is-on .settings-toggle-row__switch {
  background: var(--color-amber);
}

.settings-toggle-row.is-on .settings-toggle-row__knob {
  left: 20px;
  background: var(--color-bg);
}

/* ── System info table ─────────────────────── */
.settings-system-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}

.settings-system-table th {
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-dim);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--color-border);
  width: 180px;
  vertical-align: top;
}

.settings-system-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  word-break: break-all;
}

.settings-system-table tr:last-child th,
.settings-system-table tr:last-child td {
  border-bottom: none;
}

/* ── Regen recovery codes modal ────────────── */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 9, 0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  /* iOS notch / status bar safety — see chat.css .tag-modal-overlay. */
  padding-top: max(var(--space-4), env(safe-area-inset-top));
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
}

.settings-modal {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.settings-modal__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.settings-modal__body {
  color: var(--color-dim);
  font-size: var(--text-base);
  line-height: 1.5;
}

.settings-modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: var(--space-3);
}

.settings-recovery-codes {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  color: var(--color-amber);
  white-space: pre;
  overflow-x: auto;
  user-select: all;
}

/* ── Left-rail groups (2026-07-12 Admin regroup) ── */
.settings-nav__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-nav__group + .settings-nav__group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.settings-nav__group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-dim);
  padding: 4px 12px 2px;
}

/* ── Danger Zone ──────────────────────────── */
.settings-section--danger {
  border: 1px solid color-mix(in srgb, var(--color-red) 45%, transparent);
  background: color-mix(in srgb, var(--color-red) 6%, var(--color-panel));
}

.settings-section--danger .settings-section__title {
  color: var(--color-red);
}

/* ── Autonomy / Budgets rows ──────────────── */
.autonomy-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.autonomy-row__text {
  flex: 1;
  min-width: 180px;
}

.autonomy-row__label {
  font-weight: 600;
}

.autonomy-row__meta {
  font-size: 11px;
  color: var(--color-dim);
  font-family: var(--font-mono);
}

.autonomy-row__input {
  width: 110px;
  text-align: right;
}

.autonomy-row__state {
  font-size: 11px;
  color: var(--color-green);
  min-width: 44px;
}

.autonomy-row__state.is-error {
  color: var(--color-red);
}

/* ── Projects dense table (2c — "aws style", Brian 2026-07-12) ── */
.projects-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 640px; /* dense columns; wrap scrolls on phone, never the page */
}

.projects-table__th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-dim);
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel2);
  white-space: nowrap;
}

.projects-table__td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  white-space: nowrap;
}

.projects-table__row:last-child .projects-table__td {
  border-bottom: none;
}

.projects-table__row:hover .projects-table__td {
  background: var(--color-panel2);
}

.projects-table__td--order {
  width: 56px;
}

.projects-table__arrow {
  padding: 2px 6px;
  min-height: 28px;
}

.projects-table__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

.projects-table__name {
  font-weight: 600;
  vertical-align: middle;
}

.projects-table__type {
  font-size: 12px;
  padding: 4px 6px;
  min-height: 30px;
  width: auto;
}

.projects-table__mode-btn {
  background: transparent;
  border: none;
  color: var(--color-amber);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 0;
}

.projects-table__mode-btn.is-inherited {
  color: var(--color-dim);
}

.projects-table__mode-inh {
  font-size: 10px;
}

.projects-table__td--path {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projects-table__path {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-dim);
}

.projects-table__virtual {
  font-style: italic;
  color: var(--color-dim);
  font-size: 11px;
}

.projects-table__source {
  display: inline-block;
  font-size: 10px;
  color: var(--color-dim);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Roadmap taxonomy editors (Task 5.1) ── */
.taxonomy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-2);
}

.taxonomy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-size: 12px;
  font-family: var(--font-mono);
}

.taxonomy-chip__x {
  background: transparent;
  border: none;
  color: var(--color-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 4px 6px;
  min-width: 24px;
  min-height: 24px;
}

.taxonomy-chip__x:hover {
  color: var(--color-red);
}

.taxonomy-add {
  display: flex;
  gap: var(--space-2);
}

.taxonomy-add__input {
  flex: 0 1 220px;
  width: auto;
}

/* ── Debug output pane (regroup 2e) ── */
.debug-log {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 0;
}

.debug-log__row {
  display: flex;
  gap: 8px;
  padding: 2px 10px;
  align-items: baseline;
}

.debug-log__row:hover {
  background: var(--color-panel2);
}

.debug-log__time {
  color: var(--color-dim);
  flex-shrink: 0;
}

.debug-log__source {
  flex-shrink: 0;
  font-size: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 4px;
  color: var(--color-dim);
}

.debug-log__row--claudeDebug .debug-log__source {
  color: var(--color-amber);
}

.debug-log__msg {
  overflow-wrap: anywhere;
  color: var(--color-text);
}

/* ── Cadence create form (regroup 2d) ── */
.cadence-form {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}

.cadence-form__project {
  flex: 1 1 160px;
  width: auto;
}

.cadence-form__minutes,
.cadence-form__ticks {
  flex: 0 1 130px;
  width: auto;
}

/* ── Subscribed-devices list (device manager) ── */
.push-device {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.push-device:last-child {
  border-bottom: none;
}

.push-device__text {
  flex: 1;
  min-width: 0;
}

.push-device__label {
  font-weight: 600;
}

.push-device__meta {
  font-size: 11px;
  color: var(--color-dim);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.push-device__revoke {
  flex-shrink: 0;
  color: var(--color-red);
  border-color: color-mix(in srgb, var(--color-red) 40%, transparent);
  min-height: 44px;
}

.budgets-usage {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.budgets-usage__pct {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.budgets-usage--approach .budgets-usage__pct {
  color: var(--color-orange);
}

.budgets-usage--critical .budgets-usage__pct {
  color: var(--color-red);
}

.budgets-usage__detail {
  color: var(--color-dim);
  font-size: var(--text-sm);
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  .settings-view {
    padding: var(--space-4);
  }

  .settings-body {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    -webkit-overflow-scrolling: touch;
  }

  .settings-nav__item {
    flex-shrink: 0;
  }

  /* Phone: the rail is a horizontal scroller — groups flow inline (labels
     hidden; the group ORDER still carries the Operations-first structure). */
  .settings-nav__group {
    flex-direction: row;
    flex-shrink: 0;
  }

  .settings-nav__group + .settings-nav__group {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--color-border);
  }

  .settings-nav__group-label {
    display: none;
  }

  .settings-section {
    padding: var(--space-4);
  }

  .settings-system-table th {
    width: 140px;
    padding-right: var(--space-3);
  }
}

@media (max-width: 480px) {
  .settings-view {
    padding: var(--space-3);
  }

  .settings-header__title {
    font-size: var(--text-2xl);
  }

  /* Full-screen modal on phone. */
  .settings-modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .settings-modal {
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
  }

  .settings-modal__actions {
    flex-direction: column-reverse;
  }

  .settings-modal__actions button {
    width: 100%;
  }

  /* Make system info table stack label/value tightly. */
  .settings-system-table th,
  .settings-system-table td {
    display: block;
    width: 100%;
    padding: 4px 0;
  }

  .settings-system-table th {
    border-bottom: none;
    font-size: 9px;
    color: var(--color-dim);
    padding-top: 10px;
  }

  .settings-system-table tr:first-child th {
    padding-top: 0;
  }
}

/* ── Project status selector (V27+) ────────
   Segmented radiogroup in the Add/Edit modal. Mirrors the color-swatch
   radiogroup above — three visible chips, arrow-key navigation handled in
   settings.js. Default visual emphasis on Active (subtle); Dormant/Archived
   read as distinct lifecycle states when selected. */
.project-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  min-height: 32px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-dim);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: capitalize;
}

.project-status-chip:hover {
  border-color: var(--color-muted);
  color: var(--color-text);
}

.project-status-chip.is-active {
  border-color: var(--color-amber);
  background: var(--color-amber-dim);
  color: var(--color-amber);
}

.project-status-chip:focus-visible {
  outline: 2px solid var(--color-amber);
  outline-offset: 2px;
}

/* ── Project row status badge (V27+) ───────
   Appears next to the project name in Settings → Projects list. Active rows
   get no badge (implicit default). Dormant = muted gray, Archived = red tint.
   Per D2: no strikethrough on the name — strikethrough reads as soft-delete. */
.settings-project-row__status-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
}

.settings-project-row__status-badge--dormant {
  background: var(--color-border);
  color: var(--color-dim);
}

.settings-project-row__status-badge--archived {
  background: #E8555522;
  color: var(--color-red);
  border: 1px solid #E8555544;
}

@media (max-width: 480px) {
  /* Keep chips finger-sized and prevent badge from pushing row name off-screen. */
  .project-status-chip {
    min-height: 36px;
    padding: 8px 12px;
    flex: 1 1 auto;
    justify-content: center;
  }

  .settings-project-row__status-badge {
    margin-left: 6px;
    flex-shrink: 0;
  }
}

/* ── Voice settings (V31) ────────────────────────────────────────── */

/**
 * Inline checkbox row used by Settings → Voice → Read replies aloud.
 * Matches the existing settings-field rhythm (label + control on its own row);
 * the label and box sit on a single line so the affordance is obvious.
 */
.settings-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--color-text);
}

.settings-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-accent, #d4a574);
}

.settings-checkbox.is-disabled,
.settings-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
