/* #region zone:account.profile-design — เมนูโปรไฟล์และกล่องความปลอดภัย */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.topbar-actions > .secondary {
  height: var(--u-tap);
  padding-block: 0;
}
.profile-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  height: var(--u-tap);
  padding: 0 13px 0 7px;
  border: 1px solid var(--line);
  border-radius: var(--u-radius-pill);
  background: var(--panel);
  color: var(--text);
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--acc-soft);
  color: var(--accent-text);
  font-weight: 650;
}
.profile-trigger-copy {
  font-size: var(--fs-md);
  font-weight: 600;
}
#profile-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: 90dvh;
  overflow-y: auto;
}
#profile-dialog h2 {
  margin-top: 5px;
}
.profile-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.profile-section:last-child {
  border-bottom: 0;
}
.profile-section label {
  display: block;
  font-size: var(--fs-md);
  font-weight: 600;
  margin: var(--sp-3) 0 6px;
}
.profile-section input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--panel);
  color: var(--text);
}
.profile-section .actions {
  margin-top: 18px;
}

#profile-login {
  font-variant-numeric: tabular-nums;
}
#profile-expiry {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: var(--sp-3);
}
#profile-otp {
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
#mfa-setup {
  padding: 18px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  text-align: center;
  margin-top: 18px;
}
#mfa-qr {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 0 auto var(--sp-3);
  image-rendering: pixelated;
}
#mfa-secret {
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
  font-size: var(--fs-lg);
}
#mfa-recovery {
  padding: var(--sp-5);
  background: var(--panel2);
  border-radius: var(--r-control);
  font:
    16px/1.8 ui-monospace,
    monospace;
  white-space: pre-wrap;
  user-select: all;
}
#profile-status {
  margin-top: var(--sp-4);
  font-size: var(--fs-md);
  color: var(--muted);
}
.security-tip {
  font-size: var(--fs-md);
  color: var(--muted);
  margin-top: var(--sp-3);
}
@media (max-width: 700px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--sp-3);
    align-items: center;
  }
  .topbar-actions {
    gap: var(--sp-2);
    grid-column: 1 / -1;
    justify-self: end;
  }
  .profile-trigger-copy {
    display: none;
  }
  .profile-trigger {
    padding: 5px;
  }
  .topbar .secondary {
    min-height: 44px;
    padding: 7px;
  }
  .topbar h1 {
    font-size: var(--fs-3xl);
  }
  #profile-dialog {
    padding: 22px;
  }
}
#profile-otp-label {
  display: grid;
  gap: var(--u-space-2);
}
#profile-otp-label[hidden] {
  display: none;
}
/* The security form uses one field shape, including its kit OTP adapter. */
html:root #profile-dialog .profile-card input {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--u-tap);
  height: var(--u-tap);
  padding: var(--u-space-2) var(--u-space-4);
  border: 1px solid var(--u-line-strong);
  border-radius: var(--u-radius-inner);
  font: 400 var(--u-body)/1.4 var(--u-font);
}
html:root #profile-dialog .profile-card :is(button.u-btn, .u-otp-paste) {
  height: var(--u-tap);
  min-height: var(--u-tap);
  padding-block: 0;
  font-size: var(--u-body);
}
/* #endregion */
/* อุปกรณ์ที่จดจำไว้ (spec 2026-10-05-trusted-device.md) */
.account-trusted-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) 0;
}
.account-trusted .actions {
  margin-top: var(--sp-4);
}
