:root {
  --sh-blue: #174f9b;
  --sh-blue-bright: #2d7fd1;
  --sh-sky: #55b9e8;
  --sh-ink: #172033;
  --sh-muted: #68748a;
  --sh-line: #dfe5ee;
  --sh-bg: #f5f7fb;
  --sh-surface: #fff;
  --sh-success: #16845b;
  --shadow: 0 18px 50px rgba(27, 67, 121, .1);
  --shadow-soft: 0 8px 24px rgba(27, 67, 121, .07);
  --radius: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="contrast"] { --sh-ink: #071326; --sh-muted: #485469; --sh-line: #aeb9ca; --sh-bg: #eef2f7; }
[data-density="compact"] { --section-gap: 18px; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; background: var(--sh-bg); color: var(--sh-ink); font-family: var(--font); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--sh-muted); }
.eyebrow { margin: 0 0 8px; color: var(--sh-blue-bright); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--sh-muted); }
.loader { width: 36px; height: 36px; border: 3px solid var(--sh-line); border-top-color: var(--sh-blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr); }
.login-identity { position: relative; display: grid; place-items: center; overflow: hidden; padding: 60px; background: linear-gradient(145deg, #0e3c7d, #2369b2 56%, #43a9dc); color: #fff; }
.login-identity::before, .login-identity::after { position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; content: ""; }
.login-identity::before { width: 540px; height: 540px; right: -250px; top: -250px; }
.login-identity::after { width: 420px; height: 420px; left: -250px; bottom: -230px; }
.login-identity-content { position: relative; z-index: 1; width: min(100%, 610px); }
.login-identity img { width: 210px; height: 138px; margin: 0 0 40px; border-radius: 12px; background: #fff; object-fit: contain; padding: 10px; }
.login-identity .eyebrow { color: #bde8fb; }
.login-identity h1 { margin: 0; font-size: clamp(46px, 6vw, 76px); letter-spacing: -.05em; }
.login-tagline { max-width: 520px; margin: 16px 0 38px; color: rgba(255,255,255,.86); font-size: clamp(19px, 2vw, 24px); line-height: 1.5; }
.login-module-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.login-module-preview span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.1); padding: 9px 13px; font-size: 13px; backdrop-filter: blur(8px); }
.login-module-preview .icon { width: 17px; height: 17px; }
.login-panel { display: grid; place-items: center; padding: 40px; background: var(--sh-surface); }
.login-card { width: min(100%, 430px); display: grid; gap: 19px; }
.login-card h2 { margin: -3px 0 -12px; font-size: 34px; letter-spacing: -.035em; }
.login-card > p { margin-top: 0; }
.login-card label { display: grid; gap: 8px; font-size: 14px; font-weight: 750; }
.login-card input { width: 100%; min-height: 52px; border: 1px solid var(--sh-line); border-radius: 12px; outline: none; padding: 0 15px; color: var(--sh-ink); transition: border-color .15s, box-shadow .15s; }
.login-card input:focus { border-color: var(--sh-blue-bright); box-shadow: 0 0 0 4px rgba(45,127,209,.12); }
.primary-button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--sh-blue), var(--sh-blue-bright)); color: #fff; padding: 0 20px; font-weight: 800; box-shadow: 0 10px 24px rgba(23,79,155,.22); }
.primary-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.primary-button:disabled { opacity: .65; transform: none; }
.security-note { color: var(--sh-muted); font-size: 12px; text-align: center; }
.form-error { border: 1px solid #f4b6b6; border-radius: 10px; background: #fff4f4; color: #a32626; padding: 11px 13px; font-size: 13px; }
.mobile-login-logo { display: none; }

.portal-shell { min-height: 100vh; }
.topbar { position: sticky; z-index: 30; top: 0; height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--sh-line); background: rgba(255,255,255,.96); padding: 0 30px; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { width: 104px; height: 64px; object-fit: contain; }
.brand > span { display: grid; min-width: 0; }
.brand strong { color: var(--sh-blue); font-size: 22px; letter-spacing: -.025em; }
.brand small { color: var(--sh-muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.notification-button, .icon-button { position: relative; display: grid; place-items: center; border: 1px solid var(--sh-line); border-radius: 12px; background: var(--sh-surface); color: var(--sh-muted); }
.notification-button { width: 46px; height: 46px; }
.notification-count { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 999px; background: #e84949; color: #fff; font-size: 10px; font-weight: 800; }
.profile-chip { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px; text-align: left; }
.profile-chip > span:last-child { display: grid; gap: 2px; }
.profile-chip strong { font-size: 13px; }
.profile-chip small { color: var(--sh-muted); font-size: 11px; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--sh-blue), var(--sh-sky)); color: #fff; font-size: 13px; font-weight: 850; }
.mobile-menu-button, .sidebar-close { display: none; }

.portal-layout { min-height: calc(100vh - 88px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 88px; height: calc(100vh - 88px); display: flex; flex-direction: column; border-right: 1px solid var(--sh-line); background: var(--sh-surface); padding: 25px 16px 18px; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 12px; color: var(--sh-muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 11px; background: transparent; color: var(--sh-muted); padding: 0 13px; text-align: left; font-weight: 700; }
.nav-item span { flex: 1; }
.nav-item b { min-width: 22px; border-radius: 999px; background: #e84949; color: #fff; padding: 3px 6px; font-size: 10px; text-align: center; }
.nav-item:hover { background: var(--sh-bg); color: var(--sh-blue); }
.nav-item.is-active { background: #edf5fd; color: var(--sh-blue); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--sh-line); padding: 18px 10px 0; }
.sidebar-footer p { margin: 0; font-weight: 800; }
.sidebar-footer > span { color: var(--sh-muted); font-size: 11px; }
.logout-button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--sh-muted); margin-top: 14px; padding: 10px 0; font-weight: 650; }
.logout-button:hover { color: #aa2d2d; }
.sidebar-overlay { display: none; }

.portal-main { width: 100%; max-width: 1480px; margin: 0 auto; padding: 38px clamp(24px, 4vw, 58px) 60px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.page-header h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; }
.page-header p:last-child { margin: 8px 0 0; color: var(--sh-muted); font-size: 16px; }
.role-pill, .status-pill { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; background: #edf5fd; color: var(--sh-blue); padding: 7px 11px; font-size: 11px; font-weight: 800; }
.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.quick-stats article { display: flex; align-items: center; gap: 14px; border: 1px solid var(--sh-line); border-radius: var(--radius); background: var(--sh-surface); padding: 18px; box-shadow: var(--shadow-soft); }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: #edf5fd; color: var(--sh-blue); }
.quick-stats article div { display: grid; gap: 2px; }
.quick-stats strong { font-size: 20px; }
.quick-stats article div span { color: var(--sh-muted); font-size: 12px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 18px; }
.section-heading h2 { margin: 0; font-size: 23px; }
.section-heading p { margin: 6px 0 0; color: var(--sh-muted); font-size: 13px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--sh-blue); padding: 8px; font-weight: 750; }
.text-button .icon { width: 18px; }

.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.module-card { min-height: 270px; display: flex; flex-direction: column; gap: 23px; border: 1px solid var(--sh-line); border-radius: var(--radius); background: var(--sh-surface); padding: 22px; box-shadow: var(--shadow-soft); transition: transform .18s, border-color .18s, box-shadow .18s; }
.module-card:hover { border-color: #bed4ea; box-shadow: var(--shadow); transform: translateY(-3px); }
.module-card.is-coming { box-shadow: none; }
.module-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.module-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--module-color, var(--sh-blue)) 12%, white); color: var(--module-color, var(--sh-blue)); }
.module-icon .icon { width: 27px; height: 27px; }
.module-icon--claims { background: #eef0ff; color: #5551b8; }
.module-icon--hr { background: #f1ebfb; color: #7540aa; }
.module-icon--documents { background: #e8f7f4; color: #197a6d; }
.module-icon--management { background: #fff3e3; color: #a45e0f; }
.status-pill { background: #f0f2f5; color: var(--sh-muted); }
.status-pill.is-available { background: #e4f7ee; color: var(--sh-success); }
.module-card-controls { display: flex; align-items: center; gap: 8px; }
.favorite-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--sh-line); border-radius: 10px; background: var(--sh-surface); color: #a4adba; font-size: 18px; }
.favorite-button.is-favorite { border-color: #f1c45b; background: #fff8df; color: #c88a00; }
.module-card h3 { margin: 0 0 8px; font-size: 19px; }
.module-card p { margin: 0; color: var(--sh-muted); font-size: 13px; line-height: 1.55; }
.module-action { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: stretch; border: 1px solid var(--sh-line); border-radius: 10px; background: var(--sh-surface); color: var(--sh-blue); margin-top: auto; padding: 0 13px; font-size: 13px; font-weight: 800; }
.module-action:not(:disabled):hover { border-color: var(--sh-blue-bright); background: #f7fbff; }
.module-action:disabled { color: #8993a3; }
.module-action .icon { width: 17px; }
.welcome-panel { display: flex; align-items: center; gap: 20px; border: 1px solid #c6dcf1; border-radius: var(--radius); background: linear-gradient(135deg, #edf6ff, #f7fbff); margin-top: 30px; padding: 24px; }
.welcome-icon { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 16px; background: var(--sh-blue); color: #fff; font-weight: 900; }
.welcome-panel h2 { margin: 0 0 5px; font-size: 18px; }
.welcome-panel p { margin: 0; color: var(--sh-muted); font-size: 13px; line-height: 1.5; }

.notification-list { display: grid; gap: 12px; }
.notification-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; border: 1px solid var(--sh-line); border-radius: 15px; background: var(--sh-surface); padding: 20px; }
.notification-card.is-unread { border-left: 4px solid var(--sh-blue-bright); }
.notification-card-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #edf5fd; color: var(--sh-blue); }
.notification-title { display: flex; align-items: center; gap: 9px; }
.notification-title h3 { margin: 0; font-size: 16px; }
.notification-title span { border-radius: 999px; background: #eaf4fd; color: var(--sh-blue); padding: 4px 7px; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.notification-card p { margin: 7px 0 0; color: var(--sh-muted); font-size: 13px; }
.notification-toolbar { display: flex; justify-content: flex-end; margin: -16px 0 18px; }
.notification-read-button { border: 0; background: transparent; color: var(--sh-blue); margin-top: 10px; padding: 0; font-size: 12px; font-weight: 750; }

.dashboard-secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 34px; }
.dashboard-secondary-grid > section { min-width: 0; }
.dashboard-list { display: grid; gap: 9px; }
.dashboard-list > button, .dashboard-list > div { width: 100%; display: grid; gap: 4px; border: 1px solid var(--sh-line); border-radius: 12px; background: var(--sh-surface); color: var(--sh-ink); padding: 13px 14px; text-align: left; }
.dashboard-list span { overflow: hidden; color: var(--sh-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.profile-card, .settings-card { border: 1px solid var(--sh-line); border-radius: var(--radius); background: var(--sh-surface); padding: 28px; box-shadow: var(--shadow-soft); }
.profile-hero { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--sh-line); padding-bottom: 24px; }
.profile-avatar { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(135deg, var(--sh-blue), var(--sh-sky)); color: #fff; font-size: 22px; font-weight: 900; }
.profile-hero h2 { margin: 0; font-size: 22px; }
.profile-hero p { margin: 4px 0 9px; color: var(--sh-muted); }
.profile-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin: 25px 0 0; }
.profile-details div { display: grid; gap: 6px; }
.profile-details dt { color: var(--sh-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.profile-details dd { margin: 0; font-weight: 650; }
.active-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sh-success); }
.profile-form { display: grid; gap: 24px; margin-top: 24px; }
.profile-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-field { display: grid; gap: 7px; color: var(--sh-muted); font-size: 12px; font-weight: 750; }
.profile-field input { width: 100%; min-height: 46px; border: 1px solid var(--sh-line); border-radius: 11px; outline: none; padding: 0 13px; color: var(--sh-ink); }
.profile-field input:focus { border-color: var(--sh-blue-bright); box-shadow: 0 0 0 3px rgba(45,127,209,.1); }
.profile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; border-top: 1px solid var(--sh-line); padding-top: 20px; }
.profile-actions span { color: var(--sh-success); font-size: 13px; }
.settings-card { display: grid; gap: 30px; }
.settings-card fieldset { border: 0; margin: 0; padding: 0; }
.settings-card legend { font-size: 18px; font-weight: 800; }
.settings-card fieldset > p { margin: 5px 0 15px; color: var(--sh-muted); font-size: 13px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.preference-option { position: relative; display: flex; align-items: center; gap: 12px; border: 1px solid var(--sh-line); border-radius: 13px; padding: 15px; cursor: pointer; }
.preference-option:has(input:checked) { border-color: var(--sh-blue-bright); background: #f4f9fe; }
.preference-option input { width: 18px; height: 18px; accent-color: var(--sh-blue); }
.preference-option span { display: grid; gap: 3px; }
.preference-option small { color: var(--sh-muted); }
.settings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; border-top: 1px solid var(--sh-line); padding-top: 20px; }
.settings-actions span { color: var(--sh-success); font-size: 13px; }

@media (max-width: 1080px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-layout { grid-template-columns: .9fr 1.1fr; }
  .login-identity { padding: 42px; }
}

@media (max-width: 800px) {
  .login-layout { display: block; background: linear-gradient(160deg, #eef5fc, #fff 50%); padding: 24px; }
  .login-identity { display: none; }
  .login-panel { min-height: calc(100vh - 48px); border: 1px solid var(--sh-line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
  .mobile-login-logo { display: block; text-align: center; }
  .mobile-login-logo img { width: 172px; height: 110px; object-fit: contain; }
  .mobile-menu-button { display: grid; width: 43px; height: 43px; }
  .topbar { height: 76px; padding: 0 16px; }
  .brand img { width: 82px; height: 52px; }
  .brand small { display: none; }
  .brand strong { font-size: 18px; }
  .profile-chip > span:last-child { display: none; }
  .portal-layout { min-height: calc(100vh - 76px); display: block; }
  .sidebar { position: fixed; z-index: 50; top: 0; left: 0; width: min(84vw, 300px); height: 100vh; transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: grid; width: 36px; height: 36px; }
  .sidebar-overlay { position: fixed; z-index: 40; inset: 0; background: rgba(12,28,51,.45); }
  .sidebar-overlay.is-visible { display: block; }
  .portal-main { padding: 28px 20px 50px; }
  .quick-stats { grid-template-columns: 1fr; }
  .dashboard-secondary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .login-layout { padding: 0; }
  .login-panel { min-height: 100vh; border: 0; border-radius: 0; padding: 25px 22px; }
  .login-card { gap: 16px; }
  .login-card h2 { font-size: 29px; }
  .topbar { gap: 9px; }
  .brand { gap: 7px; }
  .brand img { width: 67px; }
  .brand strong { font-size: 16px; }
  .topbar-actions { gap: 5px; }
  .notification-button { width: 40px; height: 40px; }
  .avatar { width: 38px; height: 38px; }
  .page-header { display: grid; margin-bottom: 23px; }
  .page-header h1 { font-size: 31px; }
  .dashboard-header .role-pill { order: -1; }
  .section-heading { align-items: flex-start; }
  .section-heading .text-button { display: none; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 245px; }
  .welcome-panel { align-items: flex-start; }
  .welcome-icon { width: 46px; height: 46px; }
  .profile-card, .settings-card { padding: 20px; }
  .profile-hero { align-items: flex-start; }
  .profile-avatar { width: 58px; height: 58px; }
  .profile-details, .profile-form-grid, .option-grid { grid-template-columns: 1fr; }
  .profile-actions { align-items: stretch; flex-direction: column; }
  .settings-actions { align-items: stretch; flex-direction: column; }
}

/* SH Core 0.3 — administration centralisée des utilisateurs */
.admin-subnav { display: flex; flex-wrap: wrap; gap: 7px; border-bottom: 1px solid var(--sh-line); margin: -10px 0 28px; padding-bottom: 12px; }
.admin-subnav button { border: 0; border-radius: 10px; background: transparent; color: var(--sh-muted); padding: 10px 14px; font-weight: 750; }
.admin-subnav button.is-active { background: #edf5fd; color: var(--sh-blue); }
.authorization-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.authorization-card { display: flex; min-height: 235px; flex-direction: column; align-items: flex-start; gap: 14px; border: 1px solid var(--sh-line); border-radius: var(--radius); background: var(--sh-surface); padding: 20px; box-shadow: var(--shadow-soft); }
.authorization-card h3 { margin: 14px 0 4px; }
.authorization-card p { color: var(--sh-muted); line-height: 1.5; }
.authorization-card > .text-button { margin-top: auto; }
.admin-dialog--wide { width: min(980px, calc(100vw - 32px)); }
.dialog-textarea { display: grid; gap: 7px; margin-top: 14px; color: var(--sh-muted); font-size: 11px; font-weight: 800; }
.dialog-textarea textarea { min-height: 90px; resize: vertical; border: 1px solid var(--sh-line); border-radius: 10px; padding: 11px; font: inherit; }
.checkbox-field { display: flex !important; grid-column: auto; align-items: center; flex-direction: row; }
.checkbox-field input { width: auto !important; min-height: 0 !important; accent-color: var(--sh-blue); }
.permission-picker { margin-top: 22px !important; }
.permission-picker > section { border-top: 1px solid var(--sh-line); padding: 14px 0; }
.permission-picker h3 { margin: 0 0 10px; font-size: 14px; }
.permission-picker section > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.permission-picker label { display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--sh-line); border-radius: 10px; padding: 10px; }
.permission-picker label span { display: grid; gap: 3px; }
.permission-picker label small { color: var(--sh-muted); font-family: monospace; }
.permission-picker input { accent-color: var(--sh-blue); }
.password-change-layout { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(145deg, #edf5fd, #fff); padding: 24px; }
.password-change-layout .login-card { width: min(100%, 480px); }
.password-change-logo { width: 190px; height: 90px; object-fit: contain; margin: 0 auto 8px; }
.admin-page-header { align-items: center; }
.admin-toolbar { display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(5, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-toolbar label, .admin-form-grid label, .edit-preferences label { display: grid; gap: 6px; color: var(--sh-muted); font-size: 11px; font-weight: 800; }
.admin-toolbar input, .admin-toolbar select, .admin-form-grid input, .admin-form-grid select, .edit-preferences input, .edit-preferences select { width: 100%; min-height: 43px; border: 1px solid var(--sh-line); border-radius: 10px; background: var(--sh-surface); color: var(--sh-ink); padding: 0 11px; }
.admin-table-card { border: 1px solid var(--sh-line); border-radius: var(--radius); background: var(--sh-surface); box-shadow: var(--shadow-soft); overflow: hidden; }
.admin-table-summary { border-bottom: 1px solid var(--sh-line); padding: 14px 18px; color: var(--sh-muted); font-size: 12px; }
.admin-table-summary strong { color: var(--sh-ink); }
.admin-table-scroll { overflow-x: auto; }
.users-table { width: 100%; min-width: 1180px; border-collapse: collapse; }
.users-table th { background: #f7f9fc; color: var(--sh-muted); padding: 12px 14px; text-align: left; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.users-table td { border-top: 1px solid var(--sh-line); padding: 13px 14px; vertical-align: middle; font-size: 12px; }
.users-table td > strong, .users-table td > small { display: block; }
.users-table td > small { color: var(--sh-muted); margin-top: 4px; }
.user-identity { display: flex; align-items: center; gap: 10px; min-width: 215px; }
.user-identity .sh-core-avatar { flex: 0 0 auto; }
.user-identity span { display: grid; gap: 3px; }
.user-identity small { color: var(--sh-muted); }
.application-pills { display: flex; flex-wrap: wrap; gap: 4px; max-width: 230px; }
.application-pills span { border-radius: 999px; background: #eef5fc; color: var(--sh-blue); padding: 4px 7px; font-size: 9px; font-weight: 750; }
.user-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; }
.user-status::before { width: 7px; height: 7px; border-radius: 50%; background: #9aa5b3; content: ""; }
.user-status.is-active { color: var(--sh-success); }
.user-status.is-active::before { background: var(--sh-success); }
.user-status.is-inactive { color: #9b3d3d; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; min-width: 160px; }
.row-actions button { border: 1px solid var(--sh-line); border-radius: 8px; background: #fff; color: var(--sh-blue); padding: 6px 8px; font-size: 10px; font-weight: 750; }
.row-actions .danger-action { color: #a52d2d; }
.admin-empty { padding: 40px; text-align: center; color: var(--sh-muted); }
.admin-feedback { position: fixed; z-index: 120; right: 24px; bottom: 24px; border-radius: 10px; background: #e4f7ee; color: var(--sh-success); padding: 12px 16px; box-shadow: var(--shadow); }
.admin-feedback:empty { display: none; }
.admin-feedback.is-error { background: #fff0f0; color: #a52d2d; }
.admin-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); border: 0; border-radius: 20px; background: var(--sh-surface); padding: 26px; box-shadow: 0 24px 80px rgba(12, 36, 65, .25); overflow: auto; }
.admin-dialog::backdrop { background: rgba(12, 28, 51, .56); backdrop-filter: blur(2px); }
.admin-dialog--small { width: min(520px, calc(100vw - 32px)); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.dialog-heading h2 { margin: 0; font-size: 26px; }
.dialog-close { width: 38px; height: 38px; border: 1px solid var(--sh-line); border-radius: 10px; background: #fff; color: var(--sh-muted); font-size: 24px; }
.wizard-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; list-style: none; margin: 0 0 25px; padding: 0; counter-reset: wizard; }
.wizard-progress li { display: grid; gap: 5px; color: var(--sh-muted); font-size: 10px; font-weight: 750; counter-increment: wizard; }
.wizard-progress li::before { height: 5px; border-radius: 99px; background: #e4e9ef; content: ""; }
.wizard-progress li.is-active { color: var(--sh-blue); }
.wizard-progress li.is-active::before { background: var(--sh-blue-bright); }
.admin-dialog fieldset { border: 0; margin: 0; padding: 0; }
.admin-dialog legend { margin-bottom: 18px; font-size: 18px; font-weight: 850; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--sh-line); margin-top: 24px; padding-top: 18px; }
.wizard-actions > button:not(.primary-button) { border: 1px solid var(--sh-line); border-radius: 10px; background: #fff; padding: 0 16px; font-weight: 750; }
.role-choice, .applications-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-choice label, .applications-choice label { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--sh-line); border-radius: 12px; padding: 14px; cursor: pointer; }
.role-choice label:has(input:checked), .applications-choice label:has(input:checked) { border-color: var(--sh-blue-bright); background: #f2f8fe; }
.role-choice input, .applications-choice input { margin-top: 3px; accent-color: var(--sh-blue); }
.role-choice span, .applications-choice span { display: grid; gap: 4px; }
.role-choice small, .applications-choice small { color: var(--sh-muted); line-height: 1.4; }
.creation-summary { border: 1px solid #c8dff4; border-radius: 14px; background: #f2f8fe; padding: 18px; }
.creation-summary p { margin: 8px 0 0; color: var(--sh-muted); line-height: 1.6; }
.immutable-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-radius: 12px; background: #f7f9fc; margin-bottom: 18px; padding: 13px; color: var(--sh-muted); font-size: 11px; }
.immutable-fields span { display: grid; gap: 4px; }
.edit-applications, .edit-preferences { margin-top: 22px !important; }
.settings-checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.settings-checks label { display: flex; align-items: center; gap: 8px; color: var(--sh-ink); font-size: 12px; font-weight: 700; }
.settings-checks input { accent-color: var(--sh-blue); }
.history-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.history-grid div { border-radius: 12px; background: #f7f9fc; padding: 14px; }
.history-grid dt { color: var(--sh-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.history-grid dd { margin: 6px 0 0; font-weight: 700; line-height: 1.5; }
.temporary-password { display: block; border: 1px dashed var(--sh-blue-bright); border-radius: 12px; background: #f2f8fe; margin: 20px 0; padding: 18px; color: var(--sh-blue); font-size: 20px; text-align: center; user-select: all; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

@media (max-width: 1180px) { .admin-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .admin-page-header { align-items: stretch; }
  .admin-toolbar { grid-template-columns: 1fr 1fr; }
  .admin-search { grid-column: 1 / -1; }
  .admin-form-grid, .role-choice, .applications-choice, .history-grid { grid-template-columns: 1fr; }
  .wizard-progress li { font-size: 0; }
  .immutable-fields { grid-template-columns: 1fr; }
  .authorization-card-grid, .permission-picker section > div { grid-template-columns: 1fr; }
}
