/* v22: accessibility fixes independent of page-specific v21 styles */
body.admin-revolution.admin-settings-v19 .admin-nav .nav-item:not(.active):hover,
body.admin-revolution.admin-settings-v19 .admin-nav .nav-item:not(.active):focus-visible {background:#394553!important;color:#fff!important;outline:2px solid #93a8bf;outline-offset:-2px}
body.admin-revolution.admin-settings-v19 .admin-nav .nav-item.active {color:#fff}
.v22-register-link {display:block;margin:14px 0 8px;padding:11px 12px;border:1px solid currentColor;border-radius:11px;text-align:center;text-decoration:none;font-weight:700;color:var(--primary,#2874d0)}
.v22-register-link:hover,.v22-register-link:focus-visible {outline:2px solid currentColor;outline-offset:2px}
.send-icon svg {width:21px;height:21px;display:block}

/* v22: dark-mode hover preserves orange selection but fixes unreadable nonselected items */
body.admin-revolution.admin-settings-v19[data-theme="dark"] .admin-nav .nav-item:not(.active):hover,
body.admin-revolution.admin-settings-v19[data-theme="dark"] .admin-nav .nav-item:not(.active):focus-visible{background:#36485c!important;color:#fff!important}
body.admin-revolution.admin-settings-v19 .admin-nav .nav-item.active,
body.admin-revolution.admin-settings-v19[data-theme="dark"] .admin-nav .nav-item.active{background:#e38a20!important;color:#142134!important;font-weight:800!important}
/* Portal dialogs reside under body: never inherit theme tokens from the main view only. */
body.admin-revolution.admin-settings-v19[data-theme="dark"] .app-dialog,
body.admin-revolution.admin-settings-v19[data-theme="dark"] #temporaryCredentialPanel,
body.admin-revolution.admin-settings-v19[data-theme="dark"] #temporaryCredentialPanel > *,
body.admin-revolution.admin-settings-v19[data-theme="dark"] .credential-panel,
body.admin-revolution.admin-settings-v19[data-theme="dark"] dialog{background:#16243a!important;color:#eef3ff!important;border-color:#52637c!important;color-scheme:dark}
body.admin-revolution.admin-settings-v19[data-theme="dark"] .app-dialog p,
body.admin-revolution.admin-settings-v19[data-theme="dark"] #temporaryCredentialPanel *:not(button),
body.admin-revolution.admin-settings-v19[data-theme="dark"] .credential-panel *:not(button){color:#eef3ff!important}
body.admin-revolution.admin-settings-v19[data-theme="dark"] .app-dialog button,
body.admin-revolution.admin-settings-v19[data-theme="dark"] #temporaryCredentialPanel button{background:#234572;color:#fff;border:1px solid #64748b}
body.admin-revolution.admin-settings-v19[data-theme="dark"] input,
body.admin-revolution.admin-settings-v19[data-theme="dark"] textarea{color-scheme:dark}
.v22-user-filters{display:grid;grid-template-columns:1.2fr 1fr .75fr;gap:12px;margin:16px 0}
.v22-user-filters label{display:flex;flex-direction:column;gap:6px;min-width:0}
.v22-compact-users{width:100%;table-layout:auto}
.v22-compact-users td{padding:9px 10px;vertical-align:middle;white-space:nowrap}
.v22-compact-users td:last-child{min-width:160px;white-space:normal}
.v22-user-details summary{cursor:pointer;user-select:none;font-weight:700}
.v22-user-details .row-actions{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0}
.v22-user-details .row-actions button{font-size:12px}
.v22-user-pagination{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:16px}
.v22-superadmin-district .message-bubble{border:2px solid #e23e39!important}
.v22-superadmin-district .v22-role-label{font-weight:900;color:#e74b45}
.v22-moderator-district .v22-role-label{font-weight:800;color:#198ac0}
.v22-regulation-link{margin:8px 12px;border:1px solid var(--chat-line);border-radius:12px;color:var(--chat-ink);padding:10px;background:transparent;cursor:pointer;font-weight:650}
.v22-login-checking .auth-shell{visibility:hidden}
.v22-login-checking::before{content:"Verifica sessione…";position:fixed;inset:0;display:grid;place-items:center;color:#60758d;font-weight:650;background:var(--bg,#f5f8fc)}
@media(max-width:720px){.v22-user-filters{grid-template-columns:1fr}.v22-compact-users td{padding:6px 4px;font-size:12px}.v22-user-details .row-actions{flex-direction:column}}

body.admin-revolution.admin-settings-v19[data-theme="dark"] .credential-overlay-card{background:#16243a!important;color:#eef3ff!important;border:1px solid #4e6284!important}
body.admin-revolution.admin-settings-v19[data-theme="dark"] .credential-overlay-card .credential-value{background:#243954!important;color:#fff!important}
body.admin-revolution.admin-settings-v19[data-theme="dark"] .credential-overlay-card .warning{color:#ffd38d!important}
body.admin-revolution.admin-settings-v19[data-theme="dark"] .credential-overlay-card dl dt{color:#bcd0ef!important}
body.admin-revolution.admin-settings-v19[data-theme="dark"] .credential-overlay-card dl dd{color:#fff!important}

/* v23: server-side informational status is not an interactive action. */
#view-users .status.compact, #view-users .section-toolbar .status,
#view-users .section-toolbar .status.compact {
 color: #f8fafc !important;
 background: #24394e !important;
 border: 1px solid #849ab3 !important;
 font-weight: 650;
 opacity: 1 !important;
 cursor: default;
}
