:root {
  color-scheme: dark;
  --auth-bg: #05080f;
  --auth-bg-soft: #080d16;
  --auth-panel: #0b121e;
  --auth-panel-strong: #101a2a;
  --auth-surface: #131f31;
  --auth-line: #202d41;
  --auth-line-strong: #30435f;
  --auth-text: #eef5ff;
  --auth-muted: #8d9bb0;
  --auth-faint: #5e6b7e;
  --auth-blue: #1683ff;
  --auth-blue-bright: #53a7ff;
  --auth-blue-soft: rgba(22, 131, 255, .12);
  --auth-danger: #ff5c73;
  --auth-danger-soft: rgba(255, 92, 115, .1);
  --auth-warning: #ffbd59;
  --auth-warning-soft: rgba(255, 189, 89, .1);
  --auth-radius: 12px;
  --auth-shadow: 0 32px 90px rgba(0, 0, 0, .42);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--auth-bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--auth-text); background: var(--auth-bg); font-size: 16px; line-height: 1.55; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; }
[hidden] { display: none !important; }

.auth-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.auth-skip {
  position: fixed;
  z-index: 1300;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--auth-blue);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .16s ease;
}
.auth-skip:focus { transform: translateY(0); }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(83, 167, 255, .82);
  outline-offset: 3px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--auth-text);
  text-decoration: none;
}
.auth-brand img { filter: drop-shadow(0 0 15px rgba(22, 131, 255, .3)); }
.auth-brand > span { display: flex; flex-direction: column; font-size: 15px; font-weight: 400; letter-spacing: .02em; line-height: 1.06; }
.auth-brand b { font-weight: 800; }
.auth-brand small { margin-top: 5px; color: var(--auth-muted); font: 500 8px/1 "IBM Plex Mono", monospace; letter-spacing: .15em; }
.auth-brand-large > span { font-size: 18px; }
.auth-brand-large small { font-size: 9px; }

.auth-eyebrow,
.auth-panel-head span,
.auth-stat-grid article > span,
.auth-access-note > span {
  color: var(--auth-blue-bright);
  font: 600 10px/1.3 "IBM Plex Mono", monospace;
  letter-spacing: .15em;
}

/* Login and invitation */
.auth-login-shell {
  display: grid;
  grid-template-columns: minmax(380px, .9fr) minmax(500px, 1.1fr);
  min-height: 100vh;
  overflow: hidden;
}
.auth-login-context {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(36px, 5vw, 72px);
  border-right: 1px solid var(--auth-line);
  background:
    radial-gradient(circle at 10% 88%, rgba(22, 131, 255, .17), transparent 36%),
    linear-gradient(145deg, #0a1321 0%, #070c14 65%, #05080f 100%);
}
.auth-login-context::before,
.auth-login-context::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.auth-login-context::before {
  inset: 0;
  opacity: .13;
  background-image: linear-gradient(rgba(83, 167, 255, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(83, 167, 255, .22) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 78%, transparent);
}
.auth-login-context::after {
  width: 420px;
  height: 420px;
  right: -230px;
  bottom: 8%;
  border: 1px solid rgba(83, 167, 255, .17);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(83, 167, 255, .025), 0 0 0 108px rgba(83, 167, 255, .018);
}
.auth-context-copy { max-width: 610px; margin: auto 0 42px; }
.auth-context-copy h1 { margin: 18px 0; max-width: 600px; font-size: clamp(40px, 5vw, 68px); line-height: 1.02; letter-spacing: -.045em; }
.auth-context-copy p { max-width: 570px; margin: 0; color: #a9b6c8; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; }
.auth-security-list { display: grid; gap: 0; margin: 0 0 46px; padding: 0; list-style: none; border-top: 1px solid var(--auth-line); }
.auth-security-list li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--auth-line); }
.auth-security-list i { color: var(--auth-blue-bright); font: 600 11px/1.5 "IBM Plex Mono", monospace; font-style: normal; }
.auth-security-list span { display: flex; flex-direction: column; color: var(--auth-muted); font-size: 13px; }
.auth-security-list b { margin-bottom: 3px; color: var(--auth-text); font-size: 14px; }
.auth-login-context footer { display: flex; align-items: center; gap: 9px; color: var(--auth-muted); font: 500 10px/1.4 "IBM Plex Mono", monospace; letter-spacing: .09em; text-transform: uppercase; }
.auth-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-blue-bright); box-shadow: 0 0 12px rgba(83, 167, 255, .8); }

.auth-login-stage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 72px);
  background:
    radial-gradient(circle at 90% 5%, rgba(22, 131, 255, .08), transparent 28%),
    var(--auth-bg);
}
.auth-login-card { width: min(100%, 520px); min-height: 580px; padding: clamp(28px, 4.5vw, 52px); border: 1px solid var(--auth-line); border-radius: 16px; background: linear-gradient(155deg, rgba(16, 26, 42, .95), rgba(8, 13, 22, .98)); box-shadow: var(--auth-shadow); }
.auth-card-head { margin-bottom: 30px; }
.auth-card-head h1,
.auth-card-head h2 { margin: 12px 0 9px; font-size: clamp(28px, 4vw, 38px); line-height: 1.16; letter-spacing: -.035em; }
.auth-card-head p { margin: 0; color: var(--auth-muted); font-size: 15px; line-height: 1.65; }
.auth-legal { width: min(100%, 520px); margin: 20px 0 0; color: var(--auth-faint); font-size: 11px; text-align: center; }

.auth-loading,
.auth-page-loading { display: grid; place-items: center; gap: 18px; min-height: 460px; color: var(--auth-muted); text-align: center; }
.auth-loading p,
.auth-page-loading p { margin: 0; }
.auth-loading-inline { min-height: 180px; }
.auth-spinner { width: 34px; height: 34px; border: 2px solid var(--auth-line-strong); border-top-color: var(--auth-blue); border-radius: 50%; animation: auth-spin .85s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-form { display: grid; gap: 11px; }
.auth-form label { color: #cdd8e8; font-size: 13px; font-weight: 700; }
.auth-field-head { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.auth-form input,
.auth-form select,
.auth-form textarea,
.auth-search input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--auth-line-strong);
  border-radius: 8px;
  color: var(--auth-text);
  background: #080e18;
  caret-color: var(--auth-blue-bright);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-form input:hover,
.auth-form select:hover,
.auth-form textarea:hover,
.auth-search input:hover { border-color: #405778; }
.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus,
.auth-search input:focus { border-color: var(--auth-blue); background: #0a111d; box-shadow: 0 0 0 4px rgba(22, 131, 255, .1); outline: 0; }
.auth-form input[readonly] { color: #b7c4d5; background: #0a101a; cursor: not-allowed; }
.auth-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8292a9 50%), linear-gradient(135deg, #8292a9 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.auth-field-help { display: block; margin: -4px 0 3px; color: var(--auth-muted); font-size: 11px; line-height: 1.55; }
.auth-text-button { min-height: 38px; padding: 5px 0 5px 14px; border: 0; color: var(--auth-blue-bright); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }

.auth-turnstile-frame { display: grid; min-height: 93px; margin-top: 12px; padding: 12px; border: 1px solid var(--auth-line); border-radius: 9px; background: rgba(4, 9, 16, .72); overflow: hidden; }
.auth-turnstile-frame [data-turnstile] { min-height: 65px; }
.auth-turnstile-frame p { margin: 5px 0 0; color: var(--auth-muted); font-size: 11px; }

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, opacity .14s ease;
}
.auth-button:not(:disabled):hover { transform: translateY(-1px); }
.auth-button:disabled { opacity: .48; cursor: not-allowed; }
.auth-button-primary { color: #fff; background: linear-gradient(135deg, #0877f4, #258eff); box-shadow: 0 12px 28px rgba(22, 131, 255, .18); }
.auth-button-secondary { border-color: var(--auth-line-strong); color: #d9e6f8; background: #111b29; }
.auth-button-secondary:hover { border-color: #476288; background: #162235; }
.auth-button-danger { border-color: rgba(255, 92, 115, .4); color: #ff9aaa; background: var(--auth-danger-soft); }
.auth-button-danger:hover { border-color: var(--auth-danger); background: rgba(255, 92, 115, .15); }
.auth-form > .auth-button { width: 100%; margin-top: 8px; min-height: 52px; }
.auth-secondary-link { display: block; padding: 10px; color: var(--auth-muted); font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; }
.auth-secondary-link:hover { color: var(--auth-text); }
.auth-form-foot { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: 12px; line-height: 1.6; text-align: center; }
.auth-message,
.auth-page-message { padding: 12px 14px; border: 1px solid rgba(255, 92, 115, .34); border-radius: 8px; color: #ffb0bc; background: var(--auth-danger-soft); font-size: 13px; line-height: 1.55; }
.auth-message { margin-bottom: 19px; }
.auth-page-message { position: sticky; z-index: 20; top: 14px; margin-bottom: 18px; box-shadow: 0 14px 35px rgba(0, 0, 0, .3); }
.auth-message[data-tone="success"],
.auth-page-message[data-tone="success"] { border-color: rgba(83, 167, 255, .38); color: #b9dcff; background: var(--auth-blue-soft); }
.auth-message[data-tone="warning"],
.auth-page-message[data-tone="warning"] { border-color: rgba(255, 189, 89, .36); color: #ffd99c; background: var(--auth-warning-soft); }
.auth-invite-seal,
.auth-access-verified { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid rgba(83, 167, 255, .24); border-radius: 9px; background: var(--auth-blue-soft); }
.auth-invite-seal { margin-bottom: 8px; }
.auth-invite-seal > span,
.auth-access-verified > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--auth-blue); font-weight: 800; }
.auth-invite-seal div,
.auth-access-verified div { display: flex; flex-direction: column; }
.auth-invite-seal b,
.auth-access-verified b { font-size: 12px; }
.auth-invite-seal small,
.auth-access-verified small { margin-top: 2px; color: var(--auth-muted); font-size: 10px; }

/* Account and admin content inside the canonical PortalShell. */
.auth-app-main { min-height: 100vh; padding: 34px clamp(24px, 4vw, 64px) 80px; background: radial-gradient(circle at 94% 3%, rgba(22, 131, 255, .08), transparent 24%), var(--auth-bg); }
.auth-app-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; padding-bottom: 25px; border-bottom: 1px solid var(--auth-line); }
.auth-app-topbar h1 { margin: 7px 0 4px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.04em; }
.auth-app-topbar p { margin: 0; color: var(--auth-muted); font-size: 14px; }
.auth-user-chip { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 8px 12px 8px 8px; border: 1px solid var(--auth-line); border-radius: 9px; background: var(--auth-panel); }
.auth-user-chip > span,
.auth-identity-mark { display: grid; place-items: center; border: 1px solid rgba(83, 167, 255, .3); color: #dcecff; background: var(--auth-blue-soft); font: 700 12px/1 "IBM Plex Mono", monospace; }
.auth-user-chip > span { width: 37px; height: 37px; border-radius: 8px; }
.auth-user-chip div { display: flex; min-width: 0; flex-direction: column; }
.auth-user-chip b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.auth-user-chip small { color: var(--auth-muted); font: 600 9px/1.5 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.auth-topbar-actions { display: flex; align-items: center; gap: 12px; }
.auth-access-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid rgba(83, 167, 255, .24); border-radius: 999px; color: #b8dbff; background: var(--auth-blue-soft); font: 600 10px/1 "IBM Plex Mono", monospace; letter-spacing: .07em; }
.auth-access-pill i { font-style: normal; }

.auth-page-loading { min-height: 55vh; }
.auth-identity-banner { display: grid; grid-template-columns: 62px 1fr auto; gap: 18px; align-items: center; margin-bottom: 20px; padding: 22px; border: 1px solid rgba(83, 167, 255, .2); border-radius: var(--auth-radius); background: linear-gradient(120deg, rgba(22, 131, 255, .1), rgba(11, 18, 30, .95) 55%); }
.auth-identity-mark { width: 62px; height: 62px; border-radius: 12px; font-size: 17px; }
.auth-identity-banner h2 { margin: 5px 0 1px; font-size: 23px; }
.auth-identity-banner p { margin: 0; color: var(--auth-muted); font-size: 12px; }
.auth-role-badge,
.auth-table-status,
.auth-live-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 27px; padding: 5px 9px; border: 1px solid rgba(83, 167, 255, .26); border-radius: 999px; color: #b9dcff; background: var(--auth-blue-soft); font: 600 9px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; font-style: normal; }
.auth-table-status[data-status="DISABLED"],
.auth-table-status[data-status="REVOKED"] { border-color: rgba(255, 92, 115, .3); color: #ff9bad; background: var(--auth-danger-soft); }
.auth-table-status[data-status="INVITED"],
.auth-table-status[data-status="EXPIRED"],
.auth-table-status[data-status="LOCKED"] { border-color: rgba(255, 189, 89, .3); color: #ffd596; background: var(--auth-warning-soft); }

.auth-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.auth-panel { min-width: 0; padding: 22px; border: 1px solid var(--auth-line); border-radius: var(--auth-radius); background: linear-gradient(145deg, rgba(16, 26, 42, .82), rgba(9, 15, 25, .94)); box-shadow: 0 18px 50px rgba(0, 0, 0, .14); }
.auth-panel-wide { margin-top: 20px; }
.auth-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.auth-panel-head h2 { margin: 7px 0 0; font-size: 19px; letter-spacing: -.02em; }
.auth-panel-head p { max-width: 700px; margin: 5px 0 0; color: var(--auth-muted); font-size: 12px; }
.auth-panel-head-action { align-items: center; }
.auth-detail-list { margin: 0 0 22px; }
.auth-detail-list div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--auth-line); }
.auth-detail-list dt { color: var(--auth-muted); font-size: 12px; }
.auth-detail-list dd { margin: 0; font: 500 11px/1.5 "IBM Plex Mono", monospace; text-align: right; }
.auth-posture-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.auth-posture-list li { display: grid; grid-template-columns: 30px 1fr; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--auth-line); }
.auth-posture-list li > span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(83, 167, 255, .3); border-radius: 50%; color: var(--auth-blue-bright); background: var(--auth-blue-soft); font-size: 10px; }
.auth-posture-list div { display: flex; flex-direction: column; }
.auth-posture-list b { font-size: 12px; }
.auth-posture-list small { margin-top: 3px; color: var(--auth-muted); font-size: 10px; }

.auth-password-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
.auth-password-form > div,
.auth-invite-form > div { display: grid; gap: 7px; }
.auth-password-form > .auth-button,
.auth-invite-form > .auth-button { width: auto; min-width: 190px; margin: 0; }

/* Admin */
.auth-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.auth-stat-grid article { min-width: 0; padding: 18px; border: 1px solid var(--auth-line); border-radius: 10px; background: linear-gradient(145deg, rgba(16, 26, 42, .78), rgba(8, 13, 22, .95)); }
.auth-stat-grid strong { display: block; margin: 9px 0 4px; font-size: 29px; line-height: 1; letter-spacing: -.04em; }
.auth-stat-grid small { color: var(--auth-muted); font-size: 10px; }
.auth-invite-form { grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.2fr) minmax(180px, .7fr) auto; align-items: end; }
.auth-panel-note { margin: 15px 0 0; padding: 11px 13px; border-left: 2px solid var(--auth-blue); color: var(--auth-muted); background: rgba(22, 131, 255, .055); font-size: 11px; }
.auth-panel-note b { color: #cfe5ff; }
.auth-search { min-width: min(320px, 100%); }
.auth-search input { min-height: 42px; }

.auth-table-scroll { width: 100%; overflow-x: auto; scrollbar-color: var(--auth-line-strong) transparent; }
.auth-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.auth-table th { padding: 10px 12px; border-bottom: 1px solid var(--auth-line-strong); color: var(--auth-muted); font: 600 9px/1.3 "IBM Plex Mono", monospace; letter-spacing: .08em; text-align: left; white-space: nowrap; }
.auth-table td { min-width: 115px; padding: 13px 12px; border-bottom: 1px solid var(--auth-line); color: #cbd7e7; vertical-align: middle; }
.auth-table td:first-child { min-width: 180px; }
.auth-table tr:last-child td { border-bottom: 0; }
.auth-table-identity { display: flex; min-width: 0; flex-direction: column; }
.auth-table-identity b { color: var(--auth-text); font-size: 12px; }
.auth-table-identity small { overflow: hidden; max-width: 260px; color: var(--auth-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.auth-table select { min-width: 110px; min-height: 36px; padding: 7px 24px 7px 9px; border: 1px solid var(--auth-line-strong); border-radius: 6px; color: #dce8f8; background: #0b131f; font-size: 11px; }
.auth-table-actions { display: flex; gap: 7px; align-items: center; }
.auth-table-action { min-height: 36px; padding: 7px 10px; border: 1px solid var(--auth-line-strong); border-radius: 6px; color: #bad9ff; background: rgba(22, 131, 255, .07); font-size: 10px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.auth-table-action[data-danger="true"] { border-color: rgba(255, 92, 115, .28); color: #ff9cac; background: var(--auth-danger-soft); }
.auth-table-action:disabled,
.auth-table select:disabled { opacity: .45; cursor: not-allowed; }
.auth-empty { margin: 0; padding: 28px 10px; color: var(--auth-muted); text-align: center; }

/* One-time setup */
.auth-setup-shell { display: grid; place-items: center; min-height: 100vh; padding: 28px; background: radial-gradient(circle at 50% 10%, rgba(22, 131, 255, .14), transparent 34%), var(--auth-bg); }
.auth-setup-card { width: min(100%, 620px); padding: clamp(28px, 5vw, 52px); border: 1px solid var(--auth-line); border-radius: 16px; background: linear-gradient(155deg, rgba(16, 26, 42, .96), rgba(8, 13, 22, .99)); box-shadow: var(--auth-shadow); }
.auth-setup-card > .auth-brand { margin-bottom: 43px; }
.auth-access-verified { margin: 0 0 22px; }

/* Dialogs */
.auth-dialog { width: min(calc(100% - 32px), 590px); padding: 0; border: 1px solid var(--auth-line-strong); border-radius: 13px; color: var(--auth-text); background: #0c1421; box-shadow: var(--auth-shadow); }
.auth-dialog::backdrop { background: rgba(1, 4, 9, .78); backdrop-filter: blur(4px); }
.auth-dialog form { padding: 28px; }
.auth-dialog header h2 { margin: 9px 0 0; font-size: 24px; }
.auth-dialog p { color: var(--auth-muted); font-size: 13px; }
.auth-dialog label { display: block; margin: 20px 0 7px; font-size: 12px; font-weight: 700; }
.auth-dialog textarea { width: 100%; min-height: 105px; padding: 12px; border: 1px solid var(--auth-line-strong); border-radius: 8px; color: #cde4ff; background: #070d16; font: 500 11px/1.55 "IBM Plex Mono", monospace; resize: none; }
.auth-dialog .auth-expiry { margin: 9px 0 0; font-size: 11px; }
.auth-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

@media (max-width: 1120px) {
  .auth-login-shell { grid-template-columns: minmax(320px, .78fr) minmax(460px, 1.22fr); }
  .auth-login-context { padding: 38px; }
  .auth-security-list { margin-bottom: 30px; }
  .auth-context-copy h1 { font-size: 45px; }
  .auth-password-form { grid-template-columns: 1fr 1fr; }
  .auth-password-form > .auth-button { min-height: 50px; }
  .auth-invite-form { grid-template-columns: 1fr 1fr; }
  .auth-stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .auth-login-shell { display: block; }
  .auth-login-context { min-height: auto; padding: 24px; border-right: 0; border-bottom: 1px solid var(--auth-line); }
  .auth-context-copy { margin: 54px 0 25px; }
  .auth-context-copy h1 { max-width: 700px; font-size: clamp(34px, 8vw, 54px); }
  .auth-context-copy p { max-width: 680px; }
  .auth-security-list { display: none; }
  .auth-login-context footer { margin-top: 16px; }
  .auth-login-stage { min-height: auto; padding: 32px 18px 48px; }
  .auth-login-card { min-height: 520px; }
  .auth-app-main { padding: 26px 18px 60px; }
  .auth-app-topbar { align-items: flex-start; }
  .auth-account-grid { grid-template-columns: 1fr; }
  .auth-password-form { grid-template-columns: 1fr; }
  .auth-password-form > .auth-button { width: 100%; }
  .auth-invite-form { grid-template-columns: 1fr 1fr; }
  .auth-invite-form > .auth-button { width: 100%; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .auth-brand > span { font-size: 14px; }
  .auth-login-context { padding: 20px; }
  .auth-context-copy { margin-top: 42px; }
  .auth-context-copy h1 { font-size: 36px; }
  .auth-context-copy p { font-size: 15px; }
  .auth-login-card { min-height: 500px; padding: 27px 20px; border-radius: 12px; }
  .auth-card-head h1,
  .auth-card-head h2 { font-size: 29px; }
  .auth-app-topbar { display: grid; }
  .auth-user-chip { width: 100%; }
  .auth-topbar-actions { flex-wrap: wrap; }
  .auth-identity-banner { grid-template-columns: 52px 1fr; padding: 17px; }
  .auth-identity-mark { width: 52px; height: 52px; }
  .auth-role-badge { grid-column: 1 / -1; justify-self: start; }
  .auth-panel { padding: 17px; }
  .auth-panel-head-action { display: grid; }
  .auth-panel-head-action .auth-button,
  .auth-search { width: 100%; }
  .auth-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .auth-stat-grid article { padding: 15px; }
  .auth-stat-grid strong { font-size: 25px; }
  .auth-invite-form { grid-template-columns: 1fr; }
  .auth-table-scroll { overflow: visible; }
  .auth-table,
  .auth-table tbody,
  .auth-table tr,
  .auth-table td { display: block; width: 100%; }
  .auth-table thead { display: none; }
  .auth-table tbody { display: grid; gap: 12px; }
  .auth-table tr { padding: 9px 14px; border: 1px solid var(--auth-line); border-radius: 9px; background: rgba(5, 10, 18, .48); }
  .auth-table td { display: grid; grid-template-columns: minmax(105px, .7fr) minmax(0, 1.3fr); gap: 12px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--auth-line); text-align: right; }
  .auth-table td:last-child { border-bottom: 0; }
  .auth-table td::before { content: attr(data-label); color: var(--auth-muted); font: 600 9px/1.5 "IBM Plex Mono", monospace; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
  .auth-table-identity { align-items: flex-end; }
  .auth-table-actions { justify-content: flex-end; flex-wrap: wrap; }
  .auth-table select { margin-left: auto; }
  .auth-dialog form { padding: 22px 18px; }
  .auth-dialog-actions { flex-direction: column; }
  .auth-dialog-actions .auth-button { width: 100%; }
  .auth-setup-shell { padding: 14px; }
  .auth-setup-card { padding: 27px 20px; }
}

@media (max-width: 390px) {
  .auth-stat-grid { grid-template-columns: 1fr; }
  .auth-turnstile-frame { margin-inline: -5px; padding-inline: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .auth-button,
  .auth-panel,
  .auth-login-card,
  .auth-table tr { border: 1px solid CanvasText; }
  .auth-status-dot { forced-color-adjust: none; }
}
