/* Settings screen — local styles. Inherits aq-app/aq-main from styles.css. */

/* Drop the .aq-st ancestor — page renders its own scroll root. */
.st-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 60px;
  display: block;
  position: relative;
  z-index: 1;
}

.st-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
}

/* ── Inner left nav ────────────────────────────────────────────── */
.st-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 16px;
  align-self: flex-start;
}
.st-nav-head {
  font-family: var(--aq-ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aq-text-faint);
  padding: 8px 10px 10px;
}
.st-navitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--aq-text-dim);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: color 160ms, background 160ms;
}
.st-navitem:hover { color: var(--aq-text); background: rgba(255,255,255,0.04); }
.st-navitem.is-active {
  color: var(--aq-text);
  background: rgba(255,255,255,0.06);
}
.st-navitem.is-active::before {
  content: "";
  position: absolute;
  left: -8px; top: 9px;
  width: 2px; height: 16px;
  background: var(--aq-accent);
  border-radius: 0 2px 2px 0;
}
.st-navitem svg { color: var(--aq-text-faint); }
.st-navitem.is-active svg { color: var(--aq-accent); }

/* ── Main column ───────────────────────────────────────────────── */
.st-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.st-pane-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.st-pane-head h2 {
  margin: 0;
  font-family: var(--aq-ff-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: -0.01em;
  flex: 1;
}
.st-pane-actions { display: flex; gap: 8px; }

/* ── Cards ─────────────────────────────────────────────────────── */
.st-card {
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 10px;
  overflow: hidden;
}
.st-card.is-danger {
  border-color: color-mix(in srgb, var(--aq-danger) 30%, var(--aq-line));
}
.st-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--aq-line);
}
.st-card-head > div:first-child { flex: 1; }
.st-card-title {
  margin: 0 0 2px;
  font-family: var(--aq-ff-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: -0.005em;
}
.st-card.is-danger .st-card-title { color: var(--aq-danger); }
.st-card-sub {
  margin: 0;
  font-size: 12px;
  color: var(--aq-text-faint);
  line-height: 1.5;
}
.st-card-body { padding: 16px 18px 18px; }

/* ── Fields ────────────────────────────────────────────────────── */
.st-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.st-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.st-field-head { display: flex; align-items: baseline; gap: 8px; }
.st-field-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--aq-text-dim);
  letter-spacing: 0.01em;
}
.st-field-hint {
  font-size: 11px;
  color: var(--aq-text-faint);
}

.st-input {
  width: 100%;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--aq-text);
  font: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color 160ms, background 160ms;
}
.st-input:hover:not(:disabled) { border-color: var(--aq-line-strong); }
.st-input:focus { border-color: var(--aq-accent); }
.st-input:disabled { color: var(--aq-text-faint); cursor: not-allowed; }

.st-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-row > .st-input { flex: 1; min-width: 0; }
.st-sep { color: var(--aq-text-faint); }

.st-help {
  margin: 0;
  font-size: 11.5px;
  color: var(--aq-text-faint);
  line-height: 1.55;
}

/* ── Profile photo block ───────────────────────────────────────── */
.st-profile-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--aq-line);
}
.st-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, oklch(0.55 0.10 30), oklch(0.32 0.06 60));
  color: white;
  font-family: var(--aq-ff-display);
  font-size: 22px;
  font-weight: 500;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.st-profile-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.st-profile-actions > .st-help { margin-top: 2px; }

/* ── Buttons ───────────────────────────────────────────────────── */
.st-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  color: var(--aq-text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 160ms, border-color 160ms;
}
.st-btn:hover { background: rgba(255,255,255,0.06); border-color: var(--aq-line-strong); }
.st-btn.ghost { background: transparent; }
.st-btn.sm { padding: 4px 10px; font-size: 11.5px; }
.st-btn.primary {
  background: var(--aq-text);
  color: #08090b;
  border-color: var(--aq-text);
  font-weight: 500;
}
.st-btn.primary:hover { background: rgba(255,255,255,0.92); }
.st-btn.danger {
  background: var(--aq-danger);
  color: white;
  border-color: var(--aq-danger);
}
.st-btn.danger:hover { background: color-mix(in srgb, var(--aq-danger) 88%, white); }
.st-btn.ghost.danger { background: transparent; color: var(--aq-danger); border-color: color-mix(in srgb, var(--aq-danger) 40%, var(--aq-line)); }

/* ── Toggle ────────────────────────────────────────────────────── */
.st-toggle {
  display: inline-block;
  width: 30px; height: 17px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 99px;
  position: relative;
  transition: background 160ms, border-color 160ms;
  cursor: pointer;
}
.st-toggle > span {
  position: absolute;
  top: 1px; left: 1px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--aq-text-dim);
  transition: transform 160ms, background 160ms;
}
.st-toggle.is-on {
  background: color-mix(in srgb, var(--aq-accent) 50%, transparent);
  border-color: var(--aq-accent);
}
.st-toggle.is-on > span {
  transform: translateX(13px);
  background: white;
}

/* ── Events table ──────────────────────────────────────────────── */
.st-events {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.st-events th {
  text-align: left;
  font-family: var(--aq-ff-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aq-text-faint);
  padding: 6px 0 10px;
  width: 70px;
}
.st-events th:first-child { width: auto; }
.st-events td {
  padding: 10px 0;
  border-top: 1px solid var(--aq-line);
  vertical-align: middle;
}
.st-event-label { color: var(--aq-text); font-size: 12.5px; }
.st-event-sub { color: var(--aq-text-faint); font-size: 11px; margin-top: 2px; }

/* ── Themes / swatches / segmented ────────────────────────────── */
.st-themes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.st-theme {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--aq-text);
  transition: border-color 160ms;
}
.st-theme:hover { border-color: var(--aq-line-strong); }
.st-theme.is-active { border-color: var(--aq-accent); box-shadow: 0 0 0 1px var(--aq-accent) inset; }
.st-theme-prev {
  display: block;
  height: 60px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.06);
}
.st-theme-name { font-size: 12.5px; font-weight: 500; }
.st-theme-desc { font-size: 10.5px; color: var(--aq-text-faint); }

.st-segmented {
  display: inline-flex;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
.st-segmented button {
  background: transparent; border: 0;
  padding: 5px 14px;
  border-radius: 4px;
  font: inherit; font-size: 12px;
  color: var(--aq-text-dim); cursor: pointer;
}
.st-segmented button:hover { color: var(--aq-text); }
.st-segmented button.is-active { background: rgba(255,255,255,0.08); color: var(--aq-text); }

.st-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.st-swatch {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 8px 10px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  color: var(--aq-text);
  transition: border-color 160ms;
}
.st-swatch:hover { border-color: var(--aq-line-strong); }
.st-swatch.is-active { border-color: var(--aq-accent); }
.st-swatch-dot {
  width: 100%; height: 22px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}

/* ── Account / Sessions ────────────────────────────────────────── */
.st-stack { display: flex; flex-direction: column; gap: 10px; }
.st-readrow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 7px;
  font-size: 12.5px;
}
.st-readrow > svg { color: var(--aq-text-faint); flex-shrink: 0; }
.st-readrow > div { flex: 1; }
.st-readrow small { display: block; color: var(--aq-text-faint); font-size: 11px; margin-top: 2px; }
.st-readline {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--aq-ff-mono);
  font-size: 12px;
  color: var(--aq-text);
}
.st-pill {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  color: var(--aq-text-dim);
  border: 1px solid var(--aq-line);
}
.st-pill.is-warn {
  background: color-mix(in srgb, var(--aq-success) 14%, transparent);
  border-color: color-mix(in srgb, var(--aq-success) 30%, transparent);
  color: var(--aq-success);
}
.st-session {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 7px;
}
.st-session-meta { flex: 1; font-size: 12.5px; color: var(--aq-text); }
.st-session-meta small { color: var(--aq-text-faint); font-size: 11px; }
