/* ============================================================
   ACCOUNT — personal settings (profile, password, 2FA, tokens, sessions, prefs)
   ============================================================ */

.acct-field {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px 32px;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}
.acct-field:first-child { border-top: none; padding-top: 4px; }
.acct-field .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.acct-field .label .hint {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--fg-3);
  margin-top: 4px;
  line-height: 1.5;
  white-space: normal;      /* the label sets nowrap; the hint must wrap in its column */
  overflow-wrap: anywhere;
}
.acct-field .label { min-width: 0; }
.acct-field .control { min-width: 0; }
.acct-field .control {
  display: flex; flex-direction: column; gap: 8px;
}
.acct-field input[type="text"],
.acct-field input[type="email"],
.acct-field input[type="password"],
.acct-field input[type="url"],
.acct-field textarea,
.acct-field select {
  width: 100%;
  max-width: 420px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 13px;
}
.acct-field select { padding: 9px 10px; cursor: pointer; }
.acct-field textarea { min-height: 80px; max-width: 520px; resize: vertical; }
.acct-field input:focus,
.acct-field textarea:focus,
.acct-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-1);
}
.acct-field .sublabel {
  font-size: 11.5px;
  color: var(--fg-4);
}

/* avatar upload */
.avatar-upload {
  display: flex; align-items: center; gap: 14px;
}
.avatar-upload .big {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, oklch(78% 0.14 150), oklch(62% 0.14 150));
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 600; font-size: 24px;
  font-family: var(--font-mono);
}
.avatar-upload .options {
  display: flex; gap: 6px;
}

/* 2FA states */
.mfa-card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
}
.mfa-card .icon-bubble {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg-3);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-2);
}
.mfa-card[data-active="true"] .icon-bubble {
  background: color-mix(in oklch, var(--accent) 20%, var(--bg-3));
  color: var(--accent);
}
.mfa-card .meta { flex: 1; }
.mfa-card .meta .t { font-size: 13px; font-weight: 600; color: var(--fg); }
.mfa-card .meta .d { font-size: 11.5px; color: var(--fg-3); margin-top: 2px; }

.mfa-recovery-code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: var(--fg);
  letter-spacing: 0.08em;
  display: inline-block;
}

/* sessions list */
.session-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.session-row:last-child { border-bottom: none; }
.session-row .ic {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-3);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-2);
}
.session-row .meta .t {
  font-size: 13px; font-weight: 600; color: var(--fg);
  display: inline-flex; align-items: center; gap: 6px;
}
.session-row .meta .t .now-pill {
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in oklch, oklch(78% 0.14 150) 18%, var(--bg-1));
  color: oklch(78% 0.14 150);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.session-row .meta .d {
  font-size: 11.5px; color: var(--fg-3); margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* tokens list */
.token-row {
  display: grid;
  grid-template-columns: 1fr 120px 140px 120px 32px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.token-row:first-child { background: var(--bg-2); font-size: 10px; color: var(--fg-4); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-mono); padding: 8px 14px; }
.token-row:last-child { border-bottom: none; }
.token-row .code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-3);
  background: var(--bg-2);
  padding: 3px 7px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.02em;
}
.token-row .name .t {
  font-size: 13px; font-weight: 600; color: var(--fg);
}
.token-row .name .d {
  font-size: 11.5px; color: var(--fg-4); margin-top: 2px;
  font-family: var(--font-mono);
}
.token-row .scopes {
  font-size: 11px;
  color: var(--fg-3);
  display: flex; gap: 3px; flex-wrap: wrap;
}
.token-row .scope-chip {
  padding: 2px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.token-row .x-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: transparent; color: var(--fg-4);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.token-row .x-btn:hover { background: color-mix(in oklch, oklch(72% 0.17 25) 14%, var(--bg-2)); color: oklch(72% 0.17 25); }

/* connected accounts */
.connected-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.connected-row:last-child { border-bottom: none; }
.connected-row .ic {
  width: 40px; height: 40px; border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.connected-row .meta .t {
  font-size: 13.5px; font-weight: 600; color: var(--fg);
}
.connected-row .meta .d {
  font-size: 11.5px; color: var(--fg-3); margin-top: 2px;
}
.connected-row .meta .d .badge-on {
  color: oklch(78% 0.14 150);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 6px;
}

/* preferences cards */
.pref-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pref-row:last-child { border-bottom: none; }
.pref-row .txt { flex: 1; }
.pref-row .txt .t { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 3px; }
.pref-row .txt .d { font-size: 11.5px; color: var(--fg-3); line-height: 1.5; }

.theme-swatches {
  display: flex; gap: 8px;
}
.theme-swatch {
  width: 48px; height: 36px; border-radius: 7px;
  border: 2px solid var(--line);
  display: inline-flex; align-items: flex-end; justify-content: center;
  padding-bottom: 3px;
  font-size: 9px; font-family: var(--font-mono);
  color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.12s, transform 0.1s;
}
.theme-swatch:hover { transform: translateY(-1px); }
.theme-swatch[data-on="true"] { border-color: var(--accent); color: var(--fg); }
.theme-swatch[data-t="light"] {
  background: linear-gradient(180deg, oklch(99% 0 0), oklch(94% 0.003 250));
}
.theme-swatch[data-t="dark"] {
  background: linear-gradient(180deg, oklch(22% 0.012 250), oklch(14% 0.01 250));
}
.theme-swatch[data-t="system"] {
  background: linear-gradient(90deg, oklch(99% 0 0) 50%, oklch(14% 0.01 250) 50%);
}

.accent-swatches {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.accent-swatch {
  width: 28px; height: 28px; border-radius: 8px;
  border: 2px solid var(--line-soft);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  position: relative;
}
.accent-swatch:hover { transform: translateY(-1px); }
.accent-swatch[data-on="true"] {
  border-color: var(--fg);
}
.accent-swatch[data-on="true"]::after {
  content: "";
  position: absolute; inset: -5px;
  border: 1px solid var(--fg-3);
  border-radius: 11px;
}

/* danger zone */
.danger-zone {
  border: 1px solid color-mix(in oklch, oklch(72% 0.17 25) 30%, var(--line));
  background: color-mix(in oklch, oklch(72% 0.17 25) 4%, var(--bg-1));
  border-radius: 10px;
  padding: 18px 22px;
  margin-top: 24px;
}
.danger-zone h2 {
  color: oklch(72% 0.17 25);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.danger-zone .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid color-mix(in oklch, oklch(72% 0.17 25) 18%, var(--line-soft));
}
.danger-zone .row:first-of-type { border-top: 1px solid color-mix(in oklch, oklch(72% 0.17 25) 30%, var(--line)); margin-top: 10px; }
.danger-zone .row .txt .t { font-size: 13px; font-weight: 600; color: var(--fg); }
.danger-zone .row .txt .d { font-size: 11.5px; color: var(--fg-3); margin-top: 2px; max-width: 520px; line-height: 1.5; }

/* responsive */
@media (max-width: 820px) {
  .acct-field { grid-template-columns: 1fr; gap: 8px 0; }
  .acct-field .label { font-size: 12.5px; }
  .token-row { grid-template-columns: 1fr 32px; gap: 6px; }
  .token-row .code, .token-row .scopes, .token-row > div:nth-child(3) { display: none; }
}
