/* Accounts and personal settings share the Monitor's existing palette and drawers. */
.accounts-eyebrow { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .12em; margin: 0 0 8px; }
#accounts-page .page-hero { padding: 5px 0 24px; border-bottom: 0; background: transparent; }
#accounts-page h1 { font-size: clamp(27px, 3vw, 35px); font-weight: 450; letter-spacing: -.035em; }
#accounts-page .page-heading > div > p:last-child { margin-top: 6px; }
#accounts-page .account-status-filters { gap: 8px; margin: 0 0 22px; padding: 0; border: 0; }
#accounts-page .account-status-filters button { padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); gap: 12px; min-height: 42px; }
#accounts-page .account-status-filters button > span { padding: 2px 7px; min-width: 24px; border-radius: 6px; color: var(--secondary-ink); background: var(--control); font-size: 11px; }
#accounts-page .account-status-filters button[aria-pressed=true] { background: var(--hover); color: var(--primary); border-color: var(--line-strong); }
#accounts-page .account-status-filters button[aria-pressed=true] > span { color: var(--accent-ink); background: var(--accent); }
#accounts-page .accounts-layout { display: block; }
#accounts-page .accounts-directory { padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
#accounts-page .account-filters { padding: 20px 22px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#accounts-page .account-filters .queue-search { flex: 1; max-width: 460px; min-width: 180px; }
#accounts-page .account-filters .picker-wrap { width: 180px; margin-left: auto; }
#account-list-status:empty { display: none; }
#account-list-status:not(:empty) { margin: 0 22px 12px; }
.account-table-heading, #account-list .account-directory-row { display: grid; grid-template-columns: minmax(185px,1.6fr) minmax(115px,.9fr) minmax(110px,.8fr) minmax(130px,1fr) 112px 20px; gap: 16px; align-items: center; }
.account-table-heading { padding: 11px 24px; border-block: 1px solid var(--line); font-size: 10px; color: var(--muted); background: var(--chrome); letter-spacing: .025em; }
#account-list { margin: 0; padding: 0 9px; list-style: none; }
#account-list > li { border: 0; padding: 0; }
#account-list > li + li { border-top: 1px solid var(--line); }
#account-list .account-directory-row { width: 100%; min-height: 80px; padding: 16px 15px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; transition: background-color 140ms ease, border-color 140ms ease; }
#account-list .account-directory-row:hover { border-color: var(--line); background: var(--hover); }
.account-directory-person { display: flex; align-items: center; min-width: 0; gap: 13px; }
.account-directory-person .account-avatar { width: 42px; height: 42px; flex: none; background: linear-gradient(140deg,#435e87,#273e60); font-size: 13px; border-color: #58749b66; }
.account-directory-person .account-person { gap: 4px; }
.account-directory-person strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.account-directory-person small { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.account-you { display: inline-flex; margin-left: 8px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 9px !important; vertical-align: middle; }
.account-directory-role { color: var(--secondary-ink); font-size: 12px; }
.account-pin-state { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--secondary-ink); }
.account-pin-state .nav-icon { width: 14px; height: 14px; flex: none; }
.account-pin-state.muted { color: var(--muted); }
.account-last-seen { font-size: 11px; color: var(--muted); }
.account-status { display: inline-flex; align-items: center; gap: 6px; justify-self: start; white-space: nowrap; padding: 4px 8px; border: 1px solid #95dfba30; border-radius: 20px; background: #95dfba0d; color: var(--positive); font-size: 10px; line-height: 1.5; }
.account-status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.account-status-pending { color: var(--warm); border-color: #efc89330; background: #efc8930a; }
.account-status-blocked { color: var(--danger); border-color: #ffadb930; background: #ffadb908; }
.account-row-arrow { justify-self: end; color: var(--muted); font-size: 23px; font-weight: 300; transition: transform 140ms ease; }
.account-directory-row:hover .account-row-arrow { transform: translateX(3px); color: var(--accent); }
.accounts-directory-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 24px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); }
.accounts-directory-footer > span { display: flex; align-items: center; gap: 8px; }
.accounts-directory-footer .nav-icon { width: 13px; height: 13px; }
.accounts-guidance { margin-top: 26px; display: flex; align-items: center; gap: 16px; padding: 18px 4px; }
.accounts-guidance > .nav-icon { color: var(--accent); flex: none; margin-inline: 9px; }
.accounts-guidance strong { font-size: 13px; font-weight: 450; }
.accounts-guidance p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.accounts-guidance button { flex: none; margin-left: auto; font-size: 11px; }
#account-list .accounts-empty { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; color: var(--muted); font-size: 12px; }
.accounts-empty .nav-icon { width: 24px; height: 24px; color: var(--accent); }
.accounts-empty strong { font-size: 16px; font-weight: 450; color: var(--primary); }

dialog.identity-drawer { width: min(560px,calc(100vw - 24px)); max-width: none; max-height: none; padding: 0; overflow: hidden; background: var(--panel); }
dialog.identity-drawer[open] { display: flex; flex-direction: column; }
dialog.identity-drawer > .page-heading:first-child { position: static; flex: none; margin: 0; padding: 17px 24px; min-height: 74px; gap: 16px; background: var(--chrome); border-bottom: 1px solid var(--line); }
.identity-drawer .page-heading .accounts-eyebrow { margin-bottom: 4px; font-size: 9px; }
.identity-drawer .page-heading h2 { font-size: 19px; font-weight: 450; letter-spacing: -.02em; }
.identity-drawer h2:focus { outline: 0; }
.identity-drawer .drawer-close { align-self: center; flex: none; }
.identity-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; padding: 24px; scrollbar-gutter: stable; }
.identity-drawer label { gap: 8px; font-size: 12px; }
.identity-drawer input:not([type=checkbox]), .identity-drawer .picker-trigger { min-height: 42px; width: 100%; border-color: var(--line-strong); background: var(--field); }
.identity-drawer .picker-wrap { width: 100%; }
.identity-drawer input:focus { border-color: var(--accent); }
.identity-drawer p { font-size: 12px; line-height: 1.65; }
.identity-drawer h3 { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.personal-identity { display: flex; gap: 13px; align-items: center; margin-bottom: 24px; min-width: 0; }
.personal-identity .identity-avatar { flex: none; width: 48px; height: 48px; font-size: 16px; background: linear-gradient(135deg,#47638e,#2d4465); border: 1px solid #91aee34d; }
.personal-identity > div { display: grid; gap: 5px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.personal-identity strong { font-size: 18px; font-weight: 450; letter-spacing: -.02em; }
.personal-identity small { font-size: 11px; }
.identity-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 25px; border: 1px solid var(--line); border-radius: 11px; background: var(--background); }
.identity-tabs button { min-height: 36px; border: 0; flex: 1; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; padding: 6px; transition: background-color 140ms ease,color 140ms ease; }
.identity-tabs [aria-selected=true] { background: var(--hover); color: var(--primary); box-shadow: 0 2px 5px #0002; }
.identity-drawer [role=tabpanel]:not([hidden]) { animation: identity-pane-in 150ms ease-out; }
@keyframes identity-pane-in { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.identity-section { display: grid; gap: 17px; margin: 0; padding: 0 0 24px; border: 0; }
.identity-section + .identity-section, #account-history-section { border-top: 1px solid var(--line); padding-top: 22px; }
.identity-section > p { margin: 0; }
.identity-section .save-row { align-items: center; gap: 10px; }
.identity-section .save-row > span { color: var(--positive); font-size: 11px; }
.identity-tip { padding: 13px 15px; background: #9caef109; border: 1px solid #9caef12b; border-radius: 9px; color: var(--secondary-ink); font-size: 11px !important; }
.identity-error { color: var(--danger) !important; }
.identity-drawer [role=status]:not(:empty) { font-size: 12px; overflow-wrap: anywhere; }
#account-editor-note:not(:empty), #profile-load-note:not(:empty) { padding: 12px 14px; margin: 0 0 18px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--control); }
#account-editor-note.identity-error, #profile-load-note.identity-error { border-color: #ffadb950; background: #ffadb908; }
.identity-collapse { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; min-height: 40px; padding: 9px 8px; margin-inline: -8px; box-sizing: content-box; border: 0; border-radius: 8px; background: transparent; font-size: 13px; }
.identity-collapse .nav-chevron { margin-left: auto; transition: transform 160ms ease; }
.identity-collapse[aria-expanded=true] .nav-chevron { transform: rotate(180deg); }
.identity-collapse:hover { background: var(--hover); }
.identity-section form { display: grid; gap: 16px; }
.identity-footer { flex: none; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding: 16px 24px; background: var(--chrome); color: var(--muted); font-size: 10px; }
.identity-footer > .nav-icon { width: 13px; height: 13px; }
.personal-save-bar { justify-content: space-between; }
.personal-save-bar > span { display: flex; align-items: center; gap: 8px; }
.personal-save-bar > button { font-size: 12px; }
.identity-actions { gap: 8px; }
.identity-actions > span { flex: 1; font-size: 10px; }
.identity-actions > button { flex: none; font-size: 12px; }
.identity-switch { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.identity-switch > span { display: grid; gap: 5px; }
.identity-switch strong { font-size: 13px; font-weight: 450; }
.identity-switch small { font-size: 11px; line-height: 1.6; color: var(--muted); }
.identity-switch input[type=checkbox] { appearance: none; width: 36px; height: 21px; min-height: 0; padding: 0; position: relative; flex: none; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--field); cursor: pointer; transition: background-color 140ms ease; }
.identity-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--muted); transition: transform 140ms ease,background-color 140ms ease; }
.identity-switch input:checked { background: var(--accent); border-color: var(--accent); }
.identity-switch input:checked::after { background: var(--background); transform: translateX(15px); }
.identity-switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.identity-switch[hidden] { display: none; }
#desktop-remember-option { margin: 1px 0 4px; padding: 9px 0 13px; }
.notification-permission { display: grid; gap: 10px; font-size: 11px; padding: 13px 0; }
.notification-permission button { justify-self: start; font-size: 11px; }
.account-role-preview { display: grid; gap: 10px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--chrome); }
.account-role-preview strong { color: var(--secondary-ink); font-size: 12px; font-weight: 500; }
.account-role-preview ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.account-role-preview li { display: flex; gap: 9px; color: var(--muted); font-size: 11px; }
.account-role-preview li > span { color: var(--positive); }
.identity-drawer .danger-action { background: #ffadb90b; border-color: #ffadb94d; color: var(--danger); }
.identity-drawer .danger-action:hover { background: #ffadb91a; border-color: #ffadb980; }
#account-block-confirm, #account-editor-invite { display: grid; gap: 16px; }
#account-editor-code { font: 13px ui-monospace,Consolas,monospace; letter-spacing: .025em; }
#account-editor-reload, #profile-reload { margin-bottom: 20px; }
.identity-history { list-style: none; padding: 2px 0 0; display: grid; gap: 0; margin: 0; }
.identity-history li { display: flex; gap: 14px; padding: 0 0 22px; position: relative; }
.identity-history li:not(:last-child)::before { content: ''; position: absolute; left: 3px; top: 9px; bottom: 0; border-left: 1px solid var(--line-strong); }
.identity-history-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 5px; }
.identity-history li > div { display: grid; gap: 5px; }
.identity-history strong { font-size: 12px; font-weight: 450; }
.identity-history small { font-size: 10px; }
.identity-history p { margin: 0; font-size: 11px; }
.icon-history::before { inset: 2px; border: 1px solid; border-radius: 50%; }
.icon-history::after { left: 7px; top: 4px; width: 3px; height: 4px; border-left: 1px solid; border-bottom: 1px solid; }
#personal-pin-state { margin-bottom: 2px; }
#pin-form { display: grid; gap: 18px; margin-top: 7px; }
#pin-form .pin-entry { display: grid; gap: 8px; }
#pin-form .pin-actions { margin-top: 2px; }
#pin-output { margin-top: 20px; padding: 16px; border-radius: 9px; background: var(--background); }
#pin-output .pin-value { margin-top: 8px; }
#pin-output input { font-family: ui-monospace,Consolas,monospace; letter-spacing: .13em; }
.monitor-notification { position: fixed; inset: auto 20px 88px auto; margin: 0; width: min(390px,calc(100vw - 32px)); padding: 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); color: var(--primary); box-shadow: 0 14px 45px #0006; }
.monitor-notification:popover-open { display: flex; align-items: flex-start; gap: 12px; animation: drawer-in 180ms ease-out; }
.monitor-notification > .nav-icon { margin-top: 5px; flex: none; color: var(--accent); }
#monitor-notification-open { display: grid; gap: 6px; border: 0; padding: 0; text-align: left; background: transparent; min-width: 0; flex: 1; }
#monitor-notification-title { font-size: 13px; font-weight: 500; }
#monitor-notification-body { font-size: 11px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#monitor-notification-body[hidden] { display: none; }
.monitor-notification .drawer-close { width: 25px; min-height: 24px; flex: none; font-size: 17px; }
@media (max-width: 1150px) {
  .account-table-heading, #account-list .account-directory-row { grid-template-columns: minmax(150px,1.4fr) 110px 110px 104px 20px; gap: 12px; }
  .account-table-heading > :nth-child(4), .account-last-seen { display: none; }
}
@media (max-width: 800px) {
  .account-table-heading, #account-list .account-directory-row { grid-template-columns: minmax(140px,1fr) 100px 20px; gap: 10px; }
  .account-table-heading > :nth-child(2), .account-table-heading > :nth-child(3), .account-directory-role, .account-pin-state { display: none; }
  .accounts-guidance { align-items: flex-start; flex-wrap: wrap; }
  .accounts-guidance > div { flex: 1; }
  .accounts-guidance button { margin-left: 48px; }
  #accounts-page .page-heading { align-items: flex-start; }
}
@media (max-width: 540px) {
  dialog.identity-drawer { width: calc(100vw - 12px); }
  .identity-scroll { padding: 20px 17px; }
  dialog.identity-drawer > .page-heading:first-child { padding: 14px 17px; }
  .identity-footer { padding: 13px 17px; }
  .identity-actions > span { display: none; }
  .identity-actions { justify-content: flex-end; }
  #accounts-page .account-filters { padding: 16px; }
  #accounts-page .account-filters .queue-search { width: 100%; max-width: none; }
  #accounts-page .account-filters .picker-wrap { width: 100%; }
  #accounts-page .account-status-filters { gap: 4px; }
  #accounts-page .account-status-filters button { padding: 7px 9px; gap: 6px; font-size: 11px; }
  .account-table-heading { display: none; }
  #account-list .account-directory-row { grid-template-columns: minmax(0,1fr) auto 12px; padding: 14px 7px; gap: 8px; }
  .account-directory-person { gap: 9px; }
  .account-directory-person strong { font-size: 12px; }
  .account-directory-person .account-avatar { width: 34px; height: 34px; font-size: 11px; }
  .account-status { padding: 4px 6px; font-size: 9px; }
  .personal-identity { flex-wrap: wrap; }
  .personal-identity .account-status { margin-left: 61px; }
  .accounts-directory-footer { padding: 15px 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .identity-drawer *, #accounts-page *, .monitor-notification { animation: none !important; transition: none !important; }
}
