/* Presets-style account table and editable detail surface; shared tokens only. */
[data-section-panel="accounts"] { min-width: 0; }
#accountListPage .panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
#accountListPage .account-management-head { margin-bottom: 24px; align-items: flex-start; }
#accountListPage h2, .account-detail-heading h2 { font-size: 22px; margin: 0; line-height: 1.3; font-weight: 600; }
.account-page-description { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 8px 0 0; overflow-wrap: anywhere; }
.account-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.account-list-toolbar .search-field { width: min(100%, 320px); min-width: 0; }
.account-list-toolbar .search-field input { height: 40px; min-height: 40px; }
.account-list-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
#accountsList { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: auto; background: var(--surface); }
#accountsList .account-list-table { width: 100%; min-width: 780px; table-layout: auto; border-collapse: separate; border-spacing: 0; margin: 0; }
#accountsList .account-list-table th, #accountsList .account-list-table td { padding: 12px 16px; vertical-align: middle; }
#accountsList .account-list-table th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; }
#accountsList .account-list-table tr { cursor: pointer; }
#accountsList .account-list-table td { font-size: 13px; border-top: 1px solid var(--line); }
#accountsList .account-list-table td:last-child, #accountsList .account-list-table th:last-child { width: 48px; min-width: 48px; padding-inline: 8px; }
#accountsList .account-list-table .account-name-link { display: inline-flex; padding: 0; min-height: 24px; height: auto; max-width: 280px; font-size: 13px; color: var(--ink); font-weight: 500; text-align: left; white-space: normal; overflow-wrap: anywhere; background: transparent; border: 0; box-shadow: none; }
#accountsList .account-name-link:hover { color: var(--brand); text-decoration: underline; }
.account-list-identity small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
#accountsList .account-list-function-state { display: flex; flex-direction: column; gap: 6px; width: max-content; font-size: 13px; color: var(--ink); white-space: nowrap; }
#accountsList .account-list-function-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#accountsList .account-list-function-state .status-chip { flex-shrink: 0; justify-content: center; border: 1px solid transparent; font-size: 12px; font-weight: 600; }
#accountsList .account-list-function-state .status-chip.strong-off { color: var(--ink); background: var(--surface-subtle); border-color: var(--line-strong); }
.account-list-empty-copy { text-align: center; padding: 40px 20px; color: var(--muted); }
#currentAccountActionBar { display: none !important; }
/* Account settings: everyday controls first, connection details on demand. */
.account-detail-page { width: 100%; min-width: 0; }
.account-detail-layout { width: 100%; max-width: 1080px; min-width: 0; margin-inline: auto; }
.account-detail-breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.account-detail-breadcrumb .text-action { display: inline-flex; align-items: center; gap: 8px; padding: 0; min-height: 32px; white-space: nowrap; }
.account-detail-breadcrumb svg { width: 16px; height: 16px; }
#accountDetailBreadcrumbName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-detail-heading { position: sticky; top: var(--header-height); z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 16px; margin-bottom: 20px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.account-detail-heading > div:first-child { min-width: 0; }
.account-detail-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.account-detail-title-row h2 { overflow-wrap: anywhere; }
.account-detail-save { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
#accountFooterSaveState { color: var(--muted); font-size: 12px; }
#accountFooterSaveState:not(.warning):not(.success) { display: none; }
#accountFooterSaveState.inline-status { padding: 0; border: 0; background: transparent; }
.account-detail-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; min-width: 0; }
.account-detail-section { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.account-detail-section[data-account-modal-section="login"], .account-detail-section.disclosure-panel { grid-column: 1 / -1; }
.account-detail-section-title h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.account-detail-section-title p { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; }
.account-detail-section .form-grid { margin: 0; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-detail-section[data-account-modal-section="base"] .form-grid { grid-template-columns: minmax(0, 1fr); }
.account-detail-section .summary-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; }
.account-detail-section .summary-list > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; border: 0; background: transparent; min-width: 0; }
.account-detail-section .summary-list strong { font-weight: 400; color: var(--muted); font-size: 12px; }
.account-detail-section .summary-list span { font-size: 13px; text-align: left; overflow-wrap: anywhere; min-width: 0; }
.account-detail-section .action-row { margin: 0; gap: 8px; flex-wrap: wrap; }
#accountLoginCredentialFields { border-top: 1px solid var(--line); padding-top: 20px; }
#accountLoginCredentialFields .form-grid + .form-grid { margin-top: 16px; }
#accountProfileModal details.account-detail-section { display: block; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
#accountProfileModal details.account-detail-section > summary { display: flex; align-items: center; gap: 16px; padding: 20px 24px; margin: 0; background: transparent; cursor: pointer; }
#accountProfileModal details.account-detail-section > summary::after { content: ''; width: 16px; height: 16px; margin-left: 0; flex-shrink: 0; background: var(--muted); mask: url("icons/chevron-down.svg") center / contain no-repeat; transition: transform var(--motion); }
#accountProfileModal details.account-detail-section[open] > summary::after { transform: rotate(180deg); }
.account-disclosure-copy { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.account-disclosure-copy strong { font-size: 14px; font-weight: 500; }
.account-disclosure-copy small { font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.account-disclosure-meta { font-size: 12px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
#accountProfileModal details.account-detail-section > :not(summary) { margin: 0 24px 20px; }
#accountProfileModal details.account-detail-section:not([open]) > :not(summary) { display: none; }
#accountProfileModal details.account-detail-section[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 20px; }
#accountProfileModal .account-detail-section input:not([type="checkbox"]), #accountProfileModal .account-detail-section select { min-height: 40px; height: 40px; }
#accountProfileModal .account-detail-section input, #accountProfileModal .account-detail-section .custom-select { max-width: 100%; min-width: 0; }
.account-detail-switches { display: grid; gap: 16px; }
.account-detail-switches label { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0; font-size: 13px; }
.account-detail-switches label > span { display: grid; gap: 4px; }
.account-detail-switches strong { font-weight: 400; }
.account-detail-switches small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.account-session-content .summary-list { grid-template-columns: minmax(0, 1fr); }
.account-session-content .action-row { margin-top: 16px; }
.danger-disclosure .account-disclosure-copy strong { color: var(--danger-text); }
#accountProfileModal :is(input, select, summary, button) { scroll-margin-top: 160px; }
.account-danger-description { flex-basis: 100%; color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.account-detail-load-status { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 160px; color: var(--muted); font-size: 14px; }
.account-detail-load-status::before { content: ''; display: block; flex: 0 0 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: ui-spin 1s linear infinite; }
.account-detail-load-status.is-error::before { display: none; }
@media (max-width: 767px) {
  #accountListPage .account-management-head { gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
  #accountListPage .account-management-head-actions { width: auto; }
  .account-list-toolbar { gap: 12px; }
  .account-detail-heading { gap: 12px; margin-bottom: 16px; }
  .account-detail-heading h2 { font-size: 20px; }
  .account-detail-save { flex-direction: column; align-items: flex-end; gap: 4px; max-width: 45%; }
  .account-detail-save button { margin-left: auto; }
  .account-detail-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .account-detail-section { gap: 16px; padding: 20px; }
  .account-detail-section .summary-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .account-detail-section .form-grid { grid-template-columns: minmax(0, 1fr); }
  #accountProfileModal details.account-detail-section > summary { padding: 20px; gap: 12px; flex-wrap: wrap; }
  #accountProfileModal details.account-detail-section > :not(summary) { margin-inline: 20px; }
  .account-disclosure-meta { flex-basis: 100%; order: 2; }
}
#accountActionMenu { max-height: min(440px, calc(100dvh - 24px)); overflow-y: auto; }
#accountActionMenu svg { width: 16px; height: 16px; flex-shrink: 0; }
/* The shared page composer lifts list actions out of accountListPage. */
[data-section-panel="accounts"]:has(#accountProfileModal:not(.hidden)) > .content-page-header { display: none; }
[data-section-panel="accounts"] > .content-page-header ~ #accountListPage .account-management-head { display: none; }
