.account-body { font: 400 13px/18px var(--font); background: var(--page); align-items: stretch; }
.account-body h1, .account-body h2, .account-body h3 { letter-spacing: -.01em; }
.account-body h2 { font-size: 15px; line-height: 22px; font-weight: 700; margin: 0 0 8px; }
.account-body p { margin: 0 0 12px; }
.account-body a { color: var(--brand); }
.account-body .small { font-size: 12px; line-height: 16px; }
.account-body .hint { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 4px; }
.account-body code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.account-body :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.tone-1 { background: var(--cs-avatar-1-bg); color: var(--cs-avatar-1); }
.tone-2 { background: var(--cs-avatar-2-bg); color: var(--cs-avatar-2); }
.tone-3 { background: var(--cs-avatar-3-bg); color: var(--cs-avatar-3); }
.tone-4 { background: var(--cs-avatar-4-bg); color: var(--cs-avatar-4); }
.tone-5 { background: var(--cs-avatar-5-bg); color: var(--cs-avatar-5); }
.tone-6 { background: var(--cs-avatar-6-bg); color: var(--cs-avatar-6); }

.account-head { display: flex; align-items: center; gap: 20px; height: 60px; padding: 14px 32px; min-width: 0; }
.account-head .brandname { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text); text-decoration: none; min-width: 0; flex: none; }
.account-head .brandname img { max-height: 26px; max-width: 140px; display: block; }
.account-head .brandname .logo-small { display: none; }
.account-head .spacer { flex: 1; }
.org-switch { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 8px 4px 4px; border-radius: 6px; color: var(--text); font-weight: 500; text-decoration: none; }
.account-body .org-switch { color: var(--text); }
.org-switch:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.org-switch .icon { width: 14px; height: 14px; color: var(--muted); }
.org-switch-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.org-mark { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 600; flex: none; object-fit: cover; }
.user-menu { position: relative; flex: none; }
.account-body .user-button { width: 32px; height: 32px; min-width: 0; min-height: 0; border-radius: 50%; padding: 0; border: 0; background: none; }
.account-body .user-button:hover, .account-body .user-button[aria-expanded="true"] { background: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent); }
.user-button .avatar { width: 32px; height: 32px; font-size: 12px; }
.user-menu .menu { min-width: 260px; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; min-width: 0; }
.menu-head strong, .menu-head span { display: block; overflow-wrap: anywhere; }
.menu-head strong { font-weight: 600; }

.account-shell { display: flex; width: min(880px, calc(100% - 32px)); min-height: 704px; margin: 28px auto 40px; border-radius: 12px; box-shadow: var(--shadow); background: var(--soft); }
.shell-head { display: none; }
.org-nav { width: 228px; flex: none; display: flex; flex-direction: column; padding: 24px 16px 16px 12px; }
.nav-head { display: flex; align-items: center; gap: 8px; margin: 0 0 0 12px; min-width: 0; }
.nav-title { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.nav-close { display: none; }
.nav-sub { margin: 2px 0 20px 12px; color: var(--muted); }
.nav-group { display: flex; flex-direction: column; }
.nav-group + .nav-group { margin-top: 10px; }
.nav-group-title { font-size: 11px; line-height: 16px; font-weight: 600; color: var(--muted); margin: 4px 12px 4px; text-transform: uppercase; letter-spacing: .04em; }
.org-nav .nav-link { display: flex; align-items: center; gap: 12px; min-height: 32px; padding: 7px 12px; border-radius: 6px; color: var(--muted); font-weight: 500; text-decoration: none; margin-bottom: 2px; }
.org-nav .nav-link .icon { width: 16px; height: 16px; stroke-width: 1.7; flex: none; }
.org-nav .nav-link:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.org-nav .nav-link[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); box-shadow: inset 2px 0 0 var(--brand); }
.nav-extra { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.nav-foot { margin-top: auto; padding: 16px 4px 0 12px; }
.nav-scrim { display: none; }
.preferences { display: flex; gap: 6px; min-width: 0; }
.mini { font: inherit; font-size: 12px; color: var(--muted); background: var(--card); border: 0; box-shadow: 0 0 0 1px var(--border); border-radius: 6px; height: 28px; padding: 0 6px; flex: 1; min-width: 0; }
.preferences.compact .lang-mini { flex: none; width: 64px; }
.account-foot { display: none; }

main.account-panel { flex: 1; min-width: 0; width: auto; display: block; padding: 28px 32px; background: var(--card); border-radius: 8px 12px 12px 8px; box-shadow: var(--panel-shadow); position: relative; }
.account-panel > h1, .page-head h1, .member-head h1 { font-size: 17px; line-height: 24px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.account-panel > h1 { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.account-panel > h1:has(+ p.muted) { padding-bottom: 0; border-bottom: 0; }
.account-panel > h1 + p.muted { margin: 4px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.account-panel > h1 .badge { vertical-align: 2px; margin-left: 6px; }
.page-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.page-head:has(~ .tabs) { padding-bottom: 0; border-bottom: 0; }
.page-head p { margin: 4px 0 0; }
.page-head .member-roles { margin-top: 8px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions form { margin: 0; }
.account-panel > .alert, .account-panel > .account-card, .account-panel > .tabs + div > .alert { margin-top: 16px; }
.account-panel > .alert + .alert { margin-top: 8px; }
.back-link { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none; }
.account-body .back-link { color: var(--muted); }
.back-link:hover { color: var(--text); }
.back-link .icon { width: 14px; height: 14px; }

.account-body .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--border), 0 1px 1px rgba(38, 33, 26, .04); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.account-body .btn:hover { background: var(--soft); }
.account-body .btn .icon { width: 14px; height: 14px; }
.account-body .btn.primary { background: var(--brand); color: var(--brand-contrast); box-shadow: 0 1px 1px rgba(0, 0, 0, .1), inset 0 0 0 1px rgba(0, 0, 0, .08); }
.account-body .btn.primary:hover { background: var(--brand-dark); }
.account-body .btn.danger { background: var(--danger); color: var(--card); box-shadow: 0 1px 1px rgba(0, 0, 0, .1), inset 0 0 0 1px rgba(0, 0, 0, .08); }
.account-body .btn.danger:hover { filter: brightness(.94); }
.account-body .btn.outline-danger { color: var(--danger); background: var(--card); }
.account-body .btn.outline-danger:hover { background: color-mix(in srgb, var(--danger) 8%, var(--card)); }
.account-body .btn.ghost { background: transparent; box-shadow: none; color: var(--brand); }
.account-body .btn.ghost:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.account-body .btn.sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.account-body .btn.block { width: 100%; }
.account-body .btn[disabled] { opacity: .55; cursor: not-allowed; }
.account-body .btn[disabled]:hover { background: var(--card); }
.account-body .setting-row > .btn, .account-body .entry-actions .btn:not(.primary):not(.danger), .account-body .btn.entry-add, .account-body .switch-row > .btn { min-height: 30px; padding: 6px 12px 6px 10px; background: none; box-shadow: none; color: var(--brand); font-weight: 500; font-size: 13px; }
.account-body .setting-row > .btn:hover, .account-body .entry-actions .btn:not(.primary):not(.danger):hover, .account-body .btn.entry-add:hover, .account-body .switch-row > .btn:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.account-body .setting-row > .btn.outline-danger, .account-body .entry-actions .btn.outline-danger { color: var(--danger); }
.account-body .setting-row > .btn.outline-danger:hover, .account-body .entry-actions .btn.outline-danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.account-body .setting-row > .btn[disabled], .account-body .entry-actions .btn[disabled] { color: var(--muted); background: none; }
.account-body .btn.entry-add { gap: 10px; align-self: flex-start; margin-top: 2px; }

.account-body .field { margin-bottom: 16px; }
.account-body .field label, .account-body .field > .label, .account-body legend.label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.account-body .input { width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 6px; background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--border), 0 1px 1px rgba(38, 33, 26, .04); font: inherit; }
.account-body textarea.input { min-height: 80px; }
.account-body .input:focus { outline: 0; box-shadow: 0 0 0 1px var(--brand), 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.account-body .input[disabled] { background: var(--soft); color: var(--muted); cursor: not-allowed; }
.account-body .input.sm { min-height: 28px; padding: 4px 8px; font-size: 12px; width: 11rem; max-width: 100%; }
.account-body select.input { appearance: auto; padding-right: 6px; }
.account-body .input-wrap .input { padding-right: 5rem; }
.account-body .input-wrap .toggle { position: absolute; right: 2px; top: 2px; min-height: 28px; }
.account-body .check, .account-body .field label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; margin-bottom: 8px; }
.account-body .check input { margin: 0; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.account-body fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.account-body .alert { font-size: 13px; line-height: 18px; padding: 10px 12px; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent); margin-bottom: 12px; }

.account-body .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 16px; font-weight: 500; color: var(--muted); padding: 1px 6px; border-radius: 4px; background: var(--soft); box-shadow: 0 0 0 1px var(--border); white-space: nowrap; vertical-align: middle; border: 0; }
.account-body .badge.brand { color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent); }
.account-body .badge.ok, .account-body .badge.pendente, .account-body .badge.danger { background: none; box-shadow: none; padding: 1px 0; font-size: 12px; }
.account-body .badge.ok::before, .account-body .badge.pendente::before, .account-body .badge.danger::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.account-body .badge.ok { color: var(--success); }
.account-body .badge.pendente { color: var(--warn); }
.account-body .badge.danger { color: var(--danger); }
.account-body .badge.neutral, .account-body .badge.subtle { color: var(--muted); }
.member-roles { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.account-body .member-roles .badge { white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-align: left; }
.member-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.account-body .avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; object-fit: cover; }
.account-body span.avatar:not([class*="tone-"]) { background: var(--brand-light); color: var(--brand); }
.account-body .avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.account-body .logo-ph { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.account-body .logo-ph:not([class*="tone-"]) { background: var(--brand-light); color: var(--brand); }
.account-body .logo-ph.lg, .account-body .logo-img.lg { width: 48px; height: 48px; border-radius: 8px; font-size: 16px; object-fit: cover; flex: none; }

.account-body .icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.account-body .icon-btn:hover, .account-body .icon-btn[aria-expanded="true"] { background: var(--soft); color: var(--text); }
.account-body .icon-btn .icon { width: 16px; height: 16px; }
.row-menu { position: relative; display: inline-block; }
.account-body .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; background: var(--card); border: 0; border-radius: 8px; box-shadow: var(--menu-shadow); padding: 4px; text-align: left; }
.account-body .menu-item { font: inherit; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; text-align: left; }
.account-body .menu-item .icon { width: 16px; height: 16px; color: var(--muted); }
.account-body .menu-item:hover, .account-body .menu-item:focus-visible { background: var(--soft); }
.account-body .menu-item.danger { color: var(--danger); }
.account-body .menu-item.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.account-body .menu form { margin: 0; }
.menu-separator { height: 1px; background: var(--border); margin: 4px 2px; }

.account-card { margin: 16px 0 0; padding: 16px; border-radius: 8px; background: var(--card); box-shadow: 0 0 0 1px var(--border); min-width: 0; }
.account-card > :last-child { margin-bottom: 0; }
.account-card h2 { margin-bottom: 8px; }
.account-card.rows-card { margin: 0; padding: 0; border-radius: 0; box-shadow: none; background: none; }
.account-card.list-card { padding-top: 4px; padding-bottom: 4px; }
.account-card.list-card > p { margin: 12px 0; }
.setting-row { display: grid; grid-template-columns: 198px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row.list-row { grid-template-columns: 198px minmax(0, 1fr); align-items: start; }
.setting-label { font-weight: 500; }
.setting-row.list-row > .setting-label { padding-top: 6px; }
.setting-value { min-width: 0; overflow-wrap: anywhere; padding-left: 10px; }
.setting-row.list-row > .setting-value { padding-left: 0; display: flex; flex-direction: column; gap: 2px; }
.setting-row.list-row > .setting-value > p.small, .setting-row.list-row > .setting-value > p.muted { margin: 6px 0 6px 10px; }
.setting-row > code.setting-value { background: none; padding: 0 0 0 10px; }
.org-identity { display: flex; gap: 12px; align-items: center; padding-left: 4px; }
.org-identity strong { font-weight: 500; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.entry-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.entry { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; min-height: 30px; padding: 4px 4px 4px 10px; min-width: 0; }
.entry-main { display: flex; gap: 10px; align-items: center; flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.entry-main strong { font-weight: 400; }
.entry-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.entry-title { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.entry-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--soft); box-shadow: 0 0 0 1px var(--border); color: var(--muted); flex: none; }
.entry-icon .icon { width: 18px; height: 18px; }
.entry-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.entry-actions form { margin: 0; }
.entry-actions form.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.entry-empty { margin: 6px 0 6px 10px; }
.setting-value > form.entry-add, .setting-value > form > .btn { margin-top: 4px; }
.scope-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.account-body .scope-chips .badge { white-space: normal; overflow-wrap: anywhere; }
.inline-panel { margin-top: 12px; padding: 16px; border-radius: 8px; background: var(--soft); box-shadow: 0 0 0 1px var(--border); }
.inline-panel h2 { font-size: 13px; line-height: 18px; }
.inline-panel form { margin: 0; }
.entry > dialog.modal[open]:not(:modal) { flex-basis: 100%; }
.profile-image { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.image-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.token-value { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.account-body .token-value code { flex: 1; min-width: 0; padding: 6px 10px; border-radius: 6px; background: var(--card); box-shadow: 0 0 0 1px var(--border); }
.account-body .mfa-codes { margin-top: 12px; }
.pager { display: flex; gap: 8px; justify-content: flex-start; margin: 8px 0 0 10px; }

.danger-title { font-size: 17px; line-height: 24px; font-weight: 700; margin: 32px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.account-body h2.danger-title { font-size: 17px; line-height: 24px; margin: 32px 0 0; }
.account-card.danger-zone { border: 0; }
.danger-card { display: flex; gap: 12px 24px; align-items: center; flex-wrap: wrap; margin-top: 24px; padding: 16px; border-radius: 8px; background: var(--card); box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 35%, var(--border)); }
.account-body .danger-card h2 { color: var(--danger); font-size: 13px; line-height: 18px; margin: 0 0 4px; }
.danger-card p { margin: 0; }
.danger-card .grow { flex: 1 1 280px; }

.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin: 16px 0 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.account-body .tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 2px 9px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap; }
.account-body .tab:hover { color: var(--text); }
.account-body .tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab .count { font-size: 11px; line-height: 16px; min-width: 16px; padding: 0 5px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border); text-align: center; color: var(--muted); }
.tab .count.attention { color: var(--warn); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }

.grid-toolbar, .filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0 12px; }
.grid-toolbar > .btn.primary { margin-left: auto; }
.grid-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 320px; min-width: 0; margin: 0; }
.search-box { position: relative; display: flex; flex: 0 1 240px; min-width: 0; }
.search-box .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 14px; height: 14px; }
.account-body .search-box .input { padding-left: 30px; flex: 1; min-width: 0; }
.account-body .grid-search select.input, .account-body .grid-toolbar select.input { width: auto; max-width: 100%; flex: 0 1 auto; }
.account-body .grid-search .input:not(select) { flex: 1 1 200px; }
.js .grid-search [data-grid-search] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; border: 0; }
.account-card.grid-card { padding: 0; margin-top: 0; }
.grid-empty { padding: 16px; margin: 0; }
.data-grid { width: 100%; border-collapse: collapse; }
.data-grid th { font-size: 12px; font-weight: 400; color: var(--muted); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: none; text-transform: none; letter-spacing: 0; }
.data-grid th a { color: inherit; text-decoration: none; }
.data-grid th a:hover { color: var(--text); }
.data-grid th[aria-sort="ascending"] a::after { content: " ▲"; font-size: 9px; }
.data-grid th[aria-sort="descending"] a::after { content: " ▼"; font-size: 9px; }
.data-grid td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-grid th:first-child, .data-grid td:first-child { padding-left: 16px; }
.data-grid th:last-child, .data-grid td:last-child { padding-right: 12px; }
.data-grid tbody tr:last-child td { border-bottom: 0; }
.data-grid tbody tr:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.data-grid tbody tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.data-grid tbody tr:last-child td:last-child { border-bottom-right-radius: 8px; }
.data-grid .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.data-grid .col-actions > * { vertical-align: middle; }
.data-grid .col-actions form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.data-grid .col-actions form + form, .data-grid .col-actions form + a, .data-grid .col-actions a + a { margin-left: 6px; }
.data-grid .cell-main { display: flex; gap: 10px; align-items: center; min-width: 0; color: inherit; text-decoration: none; }
.account-body .data-grid .cell-main { color: inherit; }
.data-grid .cell-main strong { font-weight: 500; }
.data-grid .cell-main:hover strong { text-decoration: underline; }
.data-grid .cell-text { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.data-grid .cell-wrap, .break-any { overflow-wrap: anywhere; min-width: 0; }
.data-grid .cell-nowrap { white-space: nowrap; font-size: 12px; }
.data-grid strong { font-weight: 500; }
.data-grid .member-roles { margin-top: 0; }
.grid-footer { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 8px 12px 8px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.pager-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.audit-data { margin: 4px 0 0; font-size: 12px; }
.audit-data pre { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); padding: 8px; border-radius: 6px; }

.member-head { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.member-head .grow { min-width: 0; }
.member-head .muted { overflow-wrap: anywhere; }
.member-head .member-roles { margin-top: 6px; }
.section-row { display: grid; grid-template-columns: 198px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: start; }
.account-body .section-row h2 { font-size: 13px; line-height: 18px; font-weight: 500; margin: 0 0 4px; }
.section-row .section-info p { margin: 0; }
.section-row form { margin: 0; }
.member-sections > form > .role-picker > .section-row:last-child, .member-sections > .section-row:last-child { border-bottom: 0; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.field-grid, .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field-grid .field-wide { grid-column: 1 / -1; }
.inline-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 0; }
.inline-fields .field { flex: 1 1 200px; margin: 0; }
.inline-fields .confirm-block { margin: 0; }
.inline-fields .btn { flex: none; }
.account-body .confirm-block { margin: 8px 0; }
.dns-record { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; margin: 8px 0; width: 100%; }
.dns-record code { overflow-wrap: anywhere; word-break: break-all; }
.dns-record > .btn { justify-self: start; width: auto; }
.account-body .item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.account-body .item:last-child { border-bottom: 0; }
.account-body .item .grow { min-width: 180px; overflow-wrap: anywhere; }
.account-body .item form { margin: 0; }
.account-body .item form.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.account-body .item select.input.sm { width: auto; max-width: 100%; }
.account-body .item.scim-actions { flex-direction: column; align-items: stretch; gap: 8px; }
.account-body .item.scim-actions form.inline .input.sm { flex: 1 1 11rem; }
.account-body .item.scim-actions form.inline .btn { min-width: 9.5rem; }

.role-checks { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.role-checks .check { margin: 0; }
.role-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.role-key { margin-top: 2px; font-size: 11px; }
.check-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 2px 12px; }
.check-group .check { margin-bottom: 6px; }
.check-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-body .check-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--card); box-shadow: 0 0 0 1px var(--border); cursor: pointer; margin: 0; min-height: 44px; }
.account-body .check-card:hover { box-shadow: 0 0 0 1px var(--brand); }
.account-body .check-card:has(input:checked) { box-shadow: 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--card)); }
.account-body .check-card input { width: 16px; height: 16px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.role-picker-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.role-picker-compact > .role-details { grid-column: 1 / -1; }
.role-details { border-radius: 8px; box-shadow: 0 0 0 1px var(--border); padding: 0 12px; margin-bottom: 16px; }
.role-details > summary { cursor: pointer; padding: 8px 0; font-weight: 500; min-height: 36px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.role-details[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.role-details .hint { margin: 0 0 8px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; padding-bottom: 12px; }
.check-grid .check { margin: 0; min-height: 28px; align-items: flex-start; }
.add-member-card { padding: 0; }
.add-member-card .add-mode { margin: 16px 16px 0; }
.add-mode { display: flex; gap: 4px; padding: 3px; background: var(--soft); border-radius: 8px; box-shadow: 0 0 0 1px var(--border); }
.account-body .seg { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 12px; border-radius: 6px; color: var(--muted); font-weight: 500; text-decoration: none; text-align: center; }
.account-body .seg[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(38, 33, 26, .12), 0 0 0 1px var(--border); }

dialog.modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px; background: var(--card); color: var(--text); box-shadow: var(--shadow); overflow: auto; }
dialog.modal::backdrop { background: var(--scrim); }
dialog.modal[open]:not(:modal) { position: relative; margin: 16px auto 24px; inset: auto; box-shadow: 0 0 0 1px var(--border); }
.modal-head { display: flex; gap: 12px; align-items: flex-start; padding: 20px 24px 4px; }
.account-body .modal-head h2 { font-size: 17px; line-height: 24px; font-weight: 700; margin: 0 0 2px; }
.modal-head p { margin: 0; }
.modal-head .icon-btn { margin: -2px -8px 0 0; }
.modal-body { padding: 12px 24px 8px; }
.modal-body > :last-child { margin-bottom: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 16px 24px 20px; }
.modal-form { margin: 0; }
dialog.modal .add-mode { margin: 8px 24px 0; }

.simple-shell { flex-direction: column; width: min(560px, calc(100% - 32px)); min-height: 0; }
.simple-shell.wide-shell { width: min(880px, calc(100% - 32px)); }
.simple-shell main.account-panel { border-radius: 12px 12px 8px 8px; }
.simple-shell .account-foot { display: flex; justify-content: flex-end; padding: 10px 12px; }
.simple-shell .account-foot .preferences { width: 300px; max-width: 100%; }
.switch-list { display: flex; flex-direction: column; margin-top: 12px; }
.switch-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.switch-row:last-child { border-bottom: 0; }
.switch-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 44px; padding: 6px 10px; border-radius: 6px; text-decoration: none; overflow-wrap: anywhere; }
.account-body .switch-link { color: var(--text); }
.switch-link strong { font-weight: 500; }
.switch-link:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.switch-row.active .switch-link { background: color-mix(in srgb, var(--brand) 8%, transparent); box-shadow: inset 2px 0 0 var(--brand); }
.switch-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.card-notice { text-align: center; padding: 24px 0; }
.card-notice h1 { font-size: 17px; line-height: 24px; margin: 0 0 4px; }

.home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 16px 24px; }
.home-hero .identity-orbit { margin-bottom: 28px; }
.home-hero .identity-orbit-core { background-color: var(--brand); color: var(--brand-contrast); }
.home-hero .identity-orbit-ring { border-color: var(--border); }
.home-hero .bg-primary { background-color: var(--brand); }
.home-hero .bg-success { background-color: var(--success); }
.home-hero .bg-info { background-color: var(--info); }
.home-hero .bg-warning { background-color: var(--warn); }
.account-panel .home-hero h1 { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; padding: 0; border: 0; }
.home-hero .home-subtitle { font-size: 15px; line-height: 22px; font-weight: 600; max-width: 640px; }
.home-hero .muted { max-width: 640px; }

@media (max-width: 760px) {
  .account-head { height: 56px; padding: 10px 16px; gap: 10px; }
  .account-head .brandname img { max-height: 24px; max-width: 110px; }
  .account-head .brandname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-head .brandname .logo-full { display: none; }
  .account-head .brandname .logo-small { display: block; height: 26px; width: auto; }
  .account-head:has(.org-switch) .brandname img { max-width: 80px; }
  .account-head:has(.org-switch) .brandname span { display: none; }
  .org-switch { gap: 6px; min-height: 44px; padding: 0 6px; }
  .org-switch-name { max-width: 34vw; }
  .account-body .user-button { width: 44px; height: 44px; }
  .user-button .avatar { width: 36px; height: 36px; }
  .user-menu .menu { position: fixed; left: 8px; right: 8px; top: 56px; min-width: 0; }

  .account-shell { flex-direction: column; width: auto; min-height: calc(100vh - 72px); margin: 4px 12px 12px; }
  .shell-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 6px 12px 6px 6px; }
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; color: var(--text); flex: none; }
  .account-body .nav-toggle { color: var(--text); }
  .nav-toggle .icon { width: 20px; height: 20px; }
  .shell-title { font-size: 17px; line-height: 24px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .org-nav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(300px, 85vw); padding: 12px 12px 16px; background: var(--card); box-shadow: 8px 0 24px rgba(38, 33, 26, .18); overflow-y: auto; transform: translateX(-105%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  .account-shell.nav-open .org-nav, .org-nav:target { transform: none; visibility: visible; }
  .nav-head { margin: 0 0 12px 8px; }
  .nav-title { font-size: 20px; line-height: 26px; flex: 1; }
  .nav-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; color: var(--muted); flex: none; }
  .account-body .nav-close { color: var(--muted); }
  .nav-sub { display: none; }
  .org-nav .nav-link { min-height: 44px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
  .org-nav .nav-link .icon { width: 18px; height: 18px; }
  .nav-foot { display: none; }
  .account-shell.nav-open .nav-scrim, .org-nav:target + .nav-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: var(--scrim); }

  main.account-panel { flex: 1; padding: 20px 16px; border-radius: 12px 12px 0 0; }
  .simple-shell main.account-panel { border-radius: 12px 12px 0 0; }
  .account-foot, .simple-shell .account-foot { display: flex; padding: 10px 12px 12px; background: var(--soft); border-radius: 0 0 12px 12px; }
  .account-foot .preferences, .simple-shell .account-foot .preferences { width: 100%; gap: 8px; }
  .mini { height: 44px; padding: 0 8px; }

  .account-body .btn, .account-body .btn.sm, .account-body .input, .account-body .input.sm, .account-body .icon-btn { min-height: 44px; }
  .account-body .input, .account-body .input.sm { font-size: 16px; }
  .account-body .icon-btn { width: 44px; height: 44px; }
  .account-body .setting-row > .btn, .account-body .entry-actions .btn:not(.primary):not(.danger), .account-body .btn.entry-add, .account-body .switch-row > .btn { min-height: 44px; padding: 0 8px; }

  .setting-row, .setting-row.list-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; }
  .setting-row.list-row > .setting-label { padding-top: 0; }
  .setting-row > .btn, .setting-row > .hint { justify-self: start; }
  .setting-value, .setting-row > code.setting-value { padding-left: 4px; }
  .entry { min-height: 44px; padding: 0 0 0 4px; align-items: center; }
  .entry-main { flex: 1 1 160px; }
  .entry-actions form.inline { width: 100%; }
  .entry-actions form.inline .input.sm { flex: 1 1 8rem; width: auto; }
  .entry-empty, .setting-row.list-row > .setting-value > p.small, .setting-row.list-row > .setting-value > p.muted { margin-left: 4px; }

  .tabs { margin-top: 10px; }
  .account-body .tab { min-height: 44px; padding: 0 2px; }
  .grid-toolbar { flex-wrap: nowrap; align-items: flex-start; margin: 12px 0 4px; }
  .grid-search { flex: 1 1 auto; }
  .search-box, .account-body .grid-search .input:not(select), .account-body .grid-search select.input { flex: 1 1 100%; width: 100%; }
  .grid-toolbar > .btn.primary { margin-left: 0; width: 44px; padding: 0; flex: none; }
  .grid-toolbar > .btn.primary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .grid-toolbar > .btn.primary .icon { width: 18px; height: 18px; }
  .account-card.grid-card { box-shadow: none; background: none; border-radius: 0; }
  .data-grid thead { display: none; }
  .data-grid, .data-grid tbody { display: block; width: 100%; }
  .data-grid tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .data-grid tbody tr:hover { background: none; }
  .data-grid td, .data-grid td:first-child, .data-grid td:last-child { grid-column: 1; display: block; padding: 0; border: 0; text-align: left; min-width: 0; border-radius: 0; }
  .data-grid td[data-label]:not(:has(.member-roles))::before { content: attr(data-label) " · "; color: var(--muted); font-size: 12px; }
  .data-grid td.col-actions { grid-column: 2; grid-row: 1 / span 6; align-self: start; width: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
  .data-grid .col-actions form + form, .data-grid .col-actions form + a, .data-grid .col-actions a + a { margin-left: 0; }
  .data-grid td .input.sm { width: 100%; }
  .data-grid .cell-nowrap { white-space: normal; }
  .grid-footer { padding: 10px 0 0; border-top: 0; justify-content: space-between; }

  .section-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .field-grid, .grid2, .check-cards, .role-picker-compact { grid-template-columns: minmax(0, 1fr); }
  .form-actions .btn, .inline-fields .btn { flex: 1 1 auto; }
  .inline-fields .btn { width: 100%; }
  .danger-card .btn, .danger-card form { width: 100%; }
  .dns-record { grid-template-columns: minmax(0, 1fr); }
  .member-head { align-items: flex-start; }

  dialog.modal { width: 100vw; max-width: 100vw; max-height: 100vh; margin: auto 0 0; border-radius: 12px 12px 0 0; }
  dialog.modal[open]:not(:modal) { margin: 16px 0; border-radius: 12px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  dialog.modal .add-mode, .add-member-card .add-mode { margin-left: 16px; margin-right: 16px; }
  .modal-foot .btn { flex: 1 1 auto; }
  .switch-actions .btn { flex: 1 1 auto; }
}
