#account-dialog {
  width: min(960px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
  letter-spacing: 0;
}
#account-dialog::backdrop { background: rgb(12 24 18 / 45%); }
#account-dialog [hidden] { display: none !important; }
#account-dialog h2 { margin: 2px 0 0; font-size: 22px; line-height: 1.3; }
#account-dialog h3 { margin: 24px 0 10px; font-size: 17px; }
#account-dialog h4 { margin: 0; font-size: 15px; }
#account-dialog p { margin: 8px 0; overflow-wrap: anywhere; }
#account-dialog button, #account-dialog input, #account-dialog select { font: inherit; font-size: 14px; }
#account-dialog button { border-radius: 6px; white-space: normal; }
#account-dialog button:disabled { opacity: .55; cursor: default; }
#account-dialog :focus-visible { outline: 2px solid var(--strong); outline-offset: 3px; }
#account-dialog select, #account-dialog input {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink);
}
.account-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.account-heading .icon-button { width: 36px; height: 36px; min-height: 36px; flex: 0 0 36px; }
.account-identity { color: var(--text-secondary, var(--ink)); font-size: 13px; }
.account-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 12px; border-bottom: 1px solid var(--line); }
.account-tabs button { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink); }
.account-tabs button[aria-selected="true"] { border-bottom-color: var(--strong); color: var(--strong); font-weight: 600; }
.account-content { min-height: 220px; min-width: 0; }
.account-status { min-height: 22px; font-size: 13px; color: var(--strong); }
.account-muted { color: var(--text-secondary, var(--ink)); font-size: 13px; }
.account-warning { color: #8b401c; background: #fff3dc; padding: 8px 12px; border-left: 3px solid #bf7932; font-size: 13px; }
body.dark .account-warning { color: #ffdda3; background: #352b1c; }
.account-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 20px 0; border-block: 1px solid var(--line); }
.account-stats dt { font-size: 13px; }
.account-stats dd { margin: 4px 0 0; font-size: 24px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.account-description { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.account-description p { font-size: 13px; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-actions select { flex: 1 1 150px; max-width: 220px; }
.account-actions .secondary, .account-row > .secondary { padding: 8px 12px; }
.account-plan-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px 0 24px; border-bottom: 1px solid var(--line); }
.account-plan-form label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; }
.account-plan-form button { align-self: end; min-height: 40px; }
.account-table-wrap { overflow-x: auto; max-width: 100%; }
.account-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.account-table-wrap th, .account-table-wrap td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.account-table-wrap th { font-weight: 600; }
.account-audit { font-size: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.account-cloud { border-bottom: 1px solid var(--line); }
.account-cloud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.account-cloud-chip { padding: 4px 10px; border-radius: 999px; font-size: 12px; border: 1px solid; }
.account-cloud-chip.is-good { color: #1d5b3a; background: #e5f4ea; border-color: #9fcfb1; }
.account-cloud-chip.is-warn { color: #8b401c; background: #fff3dc; border-color: #e0b47a; }
body.dark .account-cloud-chip.is-good { color: #b8ecc9; background: #1b3326; border-color: #3f7a57; }
body.dark .account-cloud-chip.is-warn { color: #ffdda3; background: #352b1c; border-color: #7a5a2c; }
.account-cloud-form { border-bottom: 0; }
.account-cloud-wide { grid-column: 1 / -1; }
.account-cloud-form p { margin: -6px 0 0; }
.account-cloud-form .account-check { flex-direction: row; align-items: center; gap: 8px; }
.account-cloud-form .account-check input { width: auto; }
@media (max-width: 600px) {
  #account-dialog { padding: 16px; }
  .account-heading { align-items: start; }
  .account-heading .account-actions { flex-wrap: nowrap; }
  .account-tabs button { padding: 10px; font-size: 13px !important; }
  .account-stats { grid-template-columns: 1fr; gap: 14px; }
  .account-stats dd { font-size: 22px; }
  .account-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .account-plan-form { grid-template-columns: 1fr; }
  .account-table-wrap table { min-width: 560px; }
  .account-actions select { max-width: 100%; }
}