:root {
  color-scheme: light;
  --ink: #16191d;
  --ink-soft: #343a40;
  --muted: #6b737c;
  --muted-light: #949ba3;
  --orange: #ff6b0b;
  --orange-bright: #ff873d;
  --orange-dark: #d84b00;
  --orange-soft: #fff3eb;
  --line: #e8e9eb;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --bad: #a62929;
  --good: #28613b;
  --shadow: 0 30px 80px rgba(25, 26, 28, .12), 0 4px 18px rgba(25, 26, 28, .06);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: #f4f3f1;
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange-dark); text-underline-offset: 3px; }
a:hover { color: var(--orange); }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(390px, 44%) minmax(520px, 1fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background: #17191c;
}

.brand-panel__media {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("img/login_background.jpg") center 48% / cover no-repeat;
  filter: saturate(.72) contrast(1.08);
  transform: translate3d(0, 3.5%, 0) scale(1.1);
  transform-origin: center;
  will-change: transform;
  animation: brand-panel-drift 24s ease-in-out -6s infinite alternate;
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(10, 11, 13, .18), rgba(10, 11, 13, .88)),
    linear-gradient(125deg, rgba(255, 107, 11, .5), transparent 48%);
}

.brand-panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: -190px;
  bottom: -220px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .035), 0 0 0 140px rgba(255, 255, 255, .025);
}

.brand-panel__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.24) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent 5%, #000 48%, transparent 100%);
}

.brand-panel__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 72px);
}

.brand-panel__identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.brand-panel__logo {
  display: block;
  width: clamp(104px, 8vw, 132px);
  height: auto;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .38))
  drop-shadow(0 5px 9px rgba(0, 0, 0, .22))
  drop-shadow(0 0 5px rgba(224, 178, 145, .38));
}

.brand-panel__badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(20, 21, 24, .32);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand-panel__badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-bright);
  box-shadow: 0 0 0 5px rgba(255, 107, 11, .18);
}

.brand-panel__story { max-width: 590px; margin: auto 0; padding: 70px 0; }
.brand-panel__eyebrow {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .74);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.brand-panel__story h2 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.brand-panel__story > p:last-child {
  max-width: 520px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, .74);
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.65;
}

.brand-panel__trust { display: flex; flex-wrap: wrap; gap: 9px; }
.brand-panel__trust span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: rgba(12, 13, 15, .28);
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.auth-content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 107, 11, .1), transparent 26%),
    radial-gradient(circle at 5% 92%, rgba(255, 175, 122, .1), transparent 24%),
    #f7f6f4;
}

.shell { display: grid; place-items: center; padding: clamp(36px, 6vh, 74px) clamp(22px, 5vw, 80px); }
.shell > form { display: grid; place-items: center; width: 100%; }

.card {
  width: min(100%, 540px);
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 28px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-card { animation: card-enter .55s cubic-bezier(.22, .8, .26, 1) both; }
.auth-logo { display: block; width: 150px; height: auto; margin: 0 auto 31px; object-fit: contain; }
.auth-logo--compact { width: 124px; margin-bottom: 26px; }
.card-heading { text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-align: center;
}

p { margin: 12px 0 24px; color: var(--muted); }
.card-heading p { margin: 12px auto 28px; text-align: center; }
.field-group + .field-group { margin-top: 18px; }
label { display: block; margin: 0 0 8px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.label-row label { margin-bottom: 8px; }
.label-row a { margin-bottom: 8px; font-size: 12px; font-weight: 700; text-decoration: none; }

input[type=email], input[type=password], input[type=text] {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #d9dbde;
  border-radius: 13px;
  background: rgba(250, 250, 250, .82);
  color: var(--ink);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder { color: #a1a6ac; }
input:hover { border-color: #c5c8cc; background: #fff; }
input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(255, 107, 11, .12); }

.password-field { position: relative; }
.password-field input { padding-right: 70px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  width: auto;
  min-width: 52px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--orange-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}
.password-toggle:hover { background: var(--orange-soft); }

.remember-control {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  margin: 20px 0 0;
  cursor: pointer;
}
.remember-control input { position: absolute; opacity: 0; pointer-events: none; }
.remember-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid #c9ccd0;
  border-radius: 7px;
  background: #fff;
  transition: .18s ease;
}
.remember-box span { width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; opacity: 0; transform: rotate(-45deg) translateY(-1px); }
.remember-control input:checked + .remember-box { border-color: var(--orange); background: var(--orange); box-shadow: 0 4px 12px rgba(255, 107, 11, .24); }
.remember-control input:checked + .remember-box span { opacity: 1; }
.remember-control input:focus-visible + .remember-box { outline: 3px solid rgba(255, 107, 11, .2); outline-offset: 2px; }
.remember-copy { display: flex; flex-direction: column; line-height: 1.35; }
.remember-copy strong { color: var(--ink-soft); font-size: 13px; }
.remember-copy small { margin-top: 2px; color: var(--muted-light); font-size: 11px; font-weight: 500; }

.register-card { width: min(100%, 620px); padding: 24px 28px; }
.register-card h1 { font-size: clamp(28px, 2.6vw, 34px); }
.register-card > p:first-of-type { margin: 6px 0 14px; text-align: center; }
.register-card .message { margin-bottom: 12px; padding: 9px 12px; }
.register-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.register-fields .field-group + .field-group { margin-top: 0; }
.register-field-email { grid-column: 1 / -1; }
.register-card label { margin-bottom: 5px; font-size: 12px; }
.register-card input[type=email], .register-card input[type=password], .register-card input[type=text] { min-height: 44px; padding: 10px 12px; border-radius: 11px; }
.register-card .hint { margin-top: 5px; font-size: 10px; line-height: 1.3; }
.signup-policy { margin-top: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.terms-control { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; align-items: start; margin: 0; font-size: 13px; font-weight: 650; line-height: 1.45; }
.terms-control input { position: absolute; opacity: 0; pointer-events: none; }
.terms-box { display: grid; place-items: center; width: 22px; height: 22px; margin: 1px 0 0; border: 1px solid #c9ccd0; border-radius: 7px; background: #fff; cursor: pointer; transition: .18s ease; }
.terms-box > span:first-child { width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; opacity: 0; transform: rotate(-45deg) translateY(-1px); }
.terms-control input:checked + .terms-box { border-color: var(--orange); background: var(--orange); box-shadow: 0 4px 12px rgba(255, 107, 11, .24); }
.terms-control input:checked + .terms-box > span:first-child { opacity: 1; }
.terms-control input:focus-visible + .terms-box { outline: 3px solid rgba(255, 107, 11, .2); outline-offset: 2px; }
.terms-control a, .privacy-notice a { font-weight: 800; }
.register-card .terms-control { grid-template-columns: 20px minmax(0, 1fr); gap: 9px; font-size: 12px; line-height: 1.35; }
.register-card .terms-box { width: 20px; height: 20px; margin-top: 0; }
.privacy-notice { margin: 13px 0 0 33px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.register-card .privacy-notice { margin: 7px 0 0 29px; font-size: 11px; line-height: 1.35; }
.external-consent-card strong { color: var(--ink-soft); }
.turnstile-control { width: 100%; margin-top: 18px; }
.register-card .turnstile-control { margin-top: 11px; }
.register-card button[type=submit] { min-height: 46px; margin-top: 10px; padding: 10px 16px; border-radius: 11px; }
.register-card .links { margin-top: 9px; }
.register-card .links a { font-size: 12px; }

button[type=submit], .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 12px 18px;
  border: 0;
  border-radius: 13px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 107, 11, .22);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
button[type=submit]:hover, .button:hover { color: #fff; background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 13px 28px rgba(216, 75, 0, .26); }
button[type=submit]:active, .button:active { transform: translateY(0); }
button[type=submit]:disabled { cursor: wait; opacity: .78; transform: none; }
.button-arrow { margin-left: auto; font-size: 19px; font-weight: 500; line-height: 1; }

.divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; color: var(--muted-light); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.provider {
  margin-top: 15px;
  border: 1px solid #dcdee1;
  background: #fff;
  color: var(--ink-soft);
  box-shadow: none;
}
.provider:hover { border-color: #c9ccd0; background: var(--surface-soft); color: var(--ink); box-shadow: none; }
.provider-mark { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: #f0f1f2; color: var(--ink); font-size: 12px; font-weight: 900; }
.apple .provider-mark { background: var(--ink); color: #fff; }

.account-prompt { margin-top: 25px; color: var(--muted); font-size: 13px; text-align: center; }
.account-prompt a { font-weight: 800; text-decoration: none; }
.quiet-link { display: block; margin: 10px auto 0; color: var(--muted-light); font-size: 11px; text-align: center; text-decoration: none; }
.quiet-link:hover { color: var(--orange-dark); }

.message { margin-bottom: 20px; padding: 12px 14px; border: 1px solid #cce5d3; border-radius: 12px; background: #f0faf3; color: var(--good); font-size: 13px; }
.message.error, .error { border-color: #f1cece; background: #fff3f3; color: var(--bad); }
.hint { margin-top: 7px; font-size: 12px; }
.links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.links a, .text-link { color: var(--orange-dark); font-size: 13px; font-weight: 700; }
.secondary { border: 1px solid #d7d9dc; background: #fff; color: var(--ink-soft); box-shadow: none; }
.secondary:hover { border-color: #c4c7ca; background: var(--surface-soft); color: var(--ink); box-shadow: none; }
pre { max-width: 100%; overflow: auto; padding: 15px; border-radius: 12px; background: #f3f3f4; }

.account-settings-card { width: min(100%, 760px); }
.account-form-card { width: min(100%, 620px); }
.account-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.account-back:hover { color: var(--orange-dark); }
.settings-heading { margin-bottom: 27px; }
.settings-heading h1 { font-size: clamp(30px, 3vw, 39px); }
.settings-heading p { margin-bottom: 0; }

.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e5e6e8;
  border-radius: 17px;
  background: linear-gradient(135deg, #fff, var(--surface-soft));
}
.profile-initial {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--orange), var(--orange-bright));
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 107, 11, .2);
}
.profile-summary > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.profile-summary small { color: var(--muted-light); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-summary strong { overflow: hidden; margin: 2px 0 1px; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.profile-summary > span:last-child > span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.settings-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.settings-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}
.settings-item + .settings-item { border-top: 1px solid var(--line); }
.settings-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 900;
}
.settings-copy { min-width: 0; }
.settings-title-row { display: flex; align-items: center; gap: 9px; }
.settings-copy strong { color: var(--ink-soft); font-size: 14px; }
.settings-copy p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; }
.status-pill { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.status-good { background: #eaf7ee; color: var(--good); }
.status-warning { background: #fff1e7; color: var(--orange-dark); }
.status-neutral { background: #eff0f1; color: var(--muted); }
.button.settings-action {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px;
  white-space: nowrap;
}
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 18px; }
.account-actions .button { margin-top: 0; }

.read-only-field { color: var(--muted) !important; background: #f0f1f2 !important; cursor: not-allowed; }
.field-group .hint { margin-bottom: 0; }
.security-note, .mfa-status-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 13px;
  border: 1px solid #dbeadd;
  border-radius: 14px;
  background: #f2faf4;
}
.security-note > span:first-child, .mfa-status-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #def1e3;
  color: var(--good);
  font-size: 13px;
  font-weight: 900;
}
.security-note > span:last-child, .mfa-status-panel > span:last-child { display: flex; flex-direction: column; }
.security-note strong, .mfa-status-panel strong { color: var(--ink-soft); font-size: 12px; }
.security-note small, .mfa-status-panel small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.setup-steps { display: grid; gap: 12px; margin: 0 0 22px; padding: 0; list-style: none; }
.setup-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 11px; align-items: start; }
.setup-steps li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
}
.setup-steps strong { color: var(--ink-soft); font-size: 13px; }
.setup-steps p { margin: 2px 0 0; font-size: 12px; line-height: 1.5; }
.setup-steps .setup-key { margin-top: 7px; }
.setup-key code { display: inline-block; max-width: 100%; padding: 8px 10px; border: 1px solid #e2e3e5; border-radius: 9px; background: #f5f5f6; color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; }
.recovery-panel h2, .danger-zone h2 { margin: 0; color: var(--ink); font-size: 17px; }
.recovery-panel > p, .danger-zone > p { margin: 6px 0 16px; font-size: 12px; }
.recovery-panel pre { max-height: 260px; color: var(--ink); font: 700 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; user-select: all; }
.danger-zone { margin-top: 18px; padding: 17px; border: 1px solid #f0cece; border-radius: 16px; background: #fff8f8; }
button[type=submit].danger { background: var(--bad); box-shadow: 0 10px 24px rgba(166, 41, 41, .16); }
button[type=submit].danger:hover { background: #812020; box-shadow: 0 13px 28px rgba(129, 32, 32, .2); }

.logout-card { max-width: 520px; text-align: center; }
.logout-card > p { max-width: 380px; margin: 13px auto 24px; }
.logout-orbit { position: relative; width: 82px; height: 82px; margin: 0 auto 24px; }
.logout-orbit__core { position: absolute; inset: 21px; border-radius: 50%; background: var(--orange); box-shadow: 0 8px 24px rgba(255, 107, 11, .28); }
.logout-orbit__ring { position: absolute; inset: 3px; border: 1px solid rgba(255, 107, 11, .28); border-radius: 50%; animation: orbit-pulse 2.8s ease-in-out infinite; }
.logout-orbit::before, .logout-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(22, 25, 29, .14); }
.logout-orbit::before { inset: 12px; }
.logout-orbit::after { inset: 0; }
.account-chip, .session-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  text-align: left;
}
.account-chip { margin: 0 auto 12px; }
.account-chip__avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), var(--orange-bright)); color: #fff; font-weight: 900; box-shadow: 0 7px 15px rgba(255, 107, 11, .18); }
.account-chip span:last-child, .session-note span:last-child { display: flex; min-width: 0; flex-direction: column; }
.account-chip small, .session-note small { color: var(--muted-light); font-size: 11px; }
.account-chip strong { overflow: hidden; color: var(--ink-soft); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.session-note { border-color: #e6e6e7; background: #fff; }
.session-note__icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #edf8f0; color: var(--good); font-size: 14px; font-weight: 900; }
.session-note strong { color: var(--ink-soft); font-size: 12px; }
.logout-actions { margin-top: 4px; }
.logout-actions .secondary { margin-top: 10px; }

.organisation-card { width: min(100%, 840px); }
.organisation-heading .auth-logo { margin-bottom: 22px; }
.organisation-heading p { margin-bottom: 22px; }
.organisation-account {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}
.organisation-account__avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-bright));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 8px 18px rgba(255, 107, 11, .2);
}
.organisation-account__copy { display: flex; min-width: 0; flex-direction: column; }
.organisation-account__copy small { color: var(--muted-light); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.organisation-account__copy strong, .organisation-account__copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organisation-account__copy strong { margin-top: 1px; color: var(--ink-soft); font-size: 13px; }
.organisation-account__copy span { color: var(--muted); font-size: 11px; }
.organisation-account > a { color: var(--orange-dark); font-size: 11px; font-weight: 800; text-decoration: none; }

.cas-access-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 13px 15px;
  border: 1px solid #f5d5bf;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff8f3, #fff3eb);
}
.cas-access-note__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.cas-access-note > span:last-child { display: flex; flex-direction: column; }
.cas-access-note strong { color: var(--ink-soft); font-size: 12px; }
.cas-access-note small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.organisation-toolbar { display: flex; align-items: center; gap: 13px; margin: 0 0 11px; }
.organisation-search { position: relative; flex: 1; margin: 0; }
.organisation-search > span::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--muted-light);
  border-radius: 50%;
  transform: translateY(-60%);
  pointer-events: none;
}
.organisation-search > span::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(50% + 5px);
  left: 26px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted-light);
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}
.organisation-search input[type=search] {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 40px;
  border: 1px solid #d9dbde;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}
.organisation-search input[type=search]:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 107, 11, .1); }
.organisation-count { flex: 0 0 auto; color: var(--muted-light); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.organisation-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.organisation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 232px;
  padding: 2px 6px 2px 2px;
  overflow: auto;
  scrollbar-color: #c8cbd0 transparent;
  scrollbar-width: thin;
}
.organisation-option {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  gap: 11px;
  align-items: center;
  min-width: 0;
  min-height: 70px;
  margin: 0;
  padding: 11px;
  border: 1px solid #e1e3e5;
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
  transition: border-color .17s ease, background .17s ease, box-shadow .17s ease, transform .17s ease;
}
.organisation-option:hover { border-color: #f1b188; background: #fffaf7; transform: translateY(-1px); }
.organisation-option[hidden] { display: none; }
.organisation-option:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 3px rgba(255, 107, 11, .09); }
.organisation-option:has(input:focus-visible) { outline: 3px solid rgba(255, 107, 11, .2); outline-offset: 2px; }
.organisation-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.organisation-option__tile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f0f1f2;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  transition: background .17s ease, color .17s ease;
}
.organisation-option input:checked ~ .organisation-option__tile { background: var(--orange); color: #fff; }
.organisation-option__copy { display: flex; min-width: 0; flex-direction: column; }
.organisation-option__copy strong { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.organisation-option__copy small { overflow: hidden; margin-top: 3px; color: var(--muted-light); font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.organisation-option__check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #cfd2d5;
  border-radius: 50%;
  background: #fff;
}
.organisation-option input:checked ~ .organisation-option__check { border: 6px solid var(--orange); }
.organisation-empty { margin: 18px 0 8px; padding: 18px; border: 1px dashed #d8dade; border-radius: 14px; text-align: center; font-size: 12px; }
.organisation-empty[hidden] { display: none; }
.organisation-continue { margin-top: 15px !important; }
.organisation-security { margin: 11px 0 0; color: var(--muted-light); font-size: 10px; text-align: center; }
.organisation-security span { margin-right: 4px; color: var(--good); font-weight: 900; }

@media (min-width: 821px) {
  body:has(.organisation-card) .shell {
    align-items: start;
    padding-top: clamp(4px, .75vh, 8px);
    padding-bottom: clamp(4px, .75vh, 8px);
  }
  body:has(.organisation-card) .shell > form { align-items: start; }
  body:has(.organisation-card) footer { padding-top: 2px; padding-bottom: 4px; }
}

footer { display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding: 18px clamp(22px, 4vw, 54px) 24px; color: var(--muted-light); font-size: 11px; }
footer a { color: var(--muted); font-weight: 700; text-decoration: none; }

button:focus-visible, .button:focus-visible, a:focus-visible { outline: 3px solid rgba(255, 107, 11, .22); outline-offset: 3px; }

@keyframes card-enter { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes orbit-pulse { 0%, 100% { transform: scale(.92); opacity: .55; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes brand-panel-drift {
  from { transform: translate3d(0, 3.5%, 0) scale(1.1); }
  to { transform: translate3d(0, -3.5%, 0) scale(1.18); }
}

@media (max-width: 1100px) {
  .auth-layout { grid-template-columns: minmax(300px, 36%) minmax(490px, 1fr); }
  .brand-panel__content { padding: 36px; }
  .brand-panel__story h2 { font-size: clamp(36px, 5vw, 56px); }
}

@media (max-width: 820px) {
  .auth-layout { display: block; }
  .brand-panel { min-height: 190px; }
  .brand-panel__media { background-position: center 44%; transform: scale(1.025); animation: none; }
  .brand-panel__content { min-height: 190px; padding: 24px; }
  .brand-panel__identity { gap: 10px; }
  .brand-panel__logo { width: 96px; }
  .brand-panel__story { margin: auto 0 0; padding: 28px 0 0; }
  .brand-panel__story h2 { max-width: 520px; font-size: 34px; line-height: 1.02; }
  .brand-panel__story h2 br { display: none; }
  .brand-panel__story > p:last-child, .brand-panel__eyebrow, .brand-panel__trust { display: none; }
  .auth-content { min-height: calc(100vh - 190px); }
  .shell { padding: 34px 18px; }
  footer { justify-content: center; padding: 6px 18px 22px; }
}

@media (max-width: 520px) {
  .brand-panel { min-height: 146px; }
  .brand-panel__content { min-height: 146px; padding: 18px; }
  .brand-panel__identity { gap: 8px; }
  .brand-panel__logo { width: 84px; }
  .brand-panel__badge { padding: 6px 10px; font-size: 10px; }
  .brand-panel__story { padding-top: 18px; }
  .brand-panel__story h2 { font-size: 26px; }
  .auth-content { min-height: calc(100vh - 146px); }
  .shell { align-items: start; padding: 22px 12px; }
  .card { padding: 27px 20px; border-radius: 22px; }
  .auth-logo { width: 130px; margin-bottom: 24px; }
  h1 { font-size: 31px; }
  .provider-grid { grid-template-columns: 1fr; gap: 0; }
  .provider { margin-top: 10px; }
  .links { display: block; }
  .links a { display: block; margin: 8px 0; }
  .settings-item { grid-template-columns: 38px minmax(0, 1fr); padding: 15px; }
  .settings-icon { width: 38px; height: 38px; }
  .button.settings-action { grid-column: 2; justify-self: start; }
  .account-actions { grid-template-columns: 1fr; }
  .organisation-list { grid-template-columns: 1fr; max-height: 232px; overflow: auto; }
  .organisation-toolbar { align-items: stretch; flex-direction: column; gap: 7px; }
  .organisation-count { align-self: flex-end; }
  .organisation-account { grid-template-columns: 42px minmax(0, 1fr); }
  .organisation-account__avatar { width: 42px; height: 42px; }
  .organisation-account > a { grid-column: 2; }
  footer { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .register-card { padding: 24px 20px; }
  .register-fields { grid-template-columns: 1fr; }
  .register-field-email { grid-column: auto; }
}

@media (min-width: 821px) and (max-height: 900px) {
  body:has(.register-card) .shell { padding-block: 14px; }
  body:has(.register-card) footer { padding-top: 5px; padding-bottom: 9px; }
}

@media (min-width: 821px) and (max-height: 800px) {
  body:has(.organisation-card) .shell { padding-block: 2px; }
  body:has(.organisation-card) .organisation-card { padding-block: 16px; }
  body:has(.organisation-card) .organisation-heading .auth-logo { margin-bottom: 10px; }
  body:has(.organisation-card) .organisation-heading .eyebrow { margin-bottom: 9px; }
  body:has(.organisation-card) .organisation-heading p { margin-top: 6px; margin-bottom: 10px; }
  body:has(.organisation-card) .organisation-account,
  body:has(.organisation-card) .cas-access-note { margin-bottom: 6px; }
  body:has(.organisation-card) .organisation-toolbar { margin-bottom: 8px; }
  body:has(.organisation-card) .organisation-continue { margin-top: 8px !important; }
  body:has(.organisation-card) .organisation-security { margin-top: 5px; }
  body:has(.organisation-card) footer { padding-block: 0; }
}

/*
 * Keep identity entry experiences comfortably scaled on high-density desktop
 * displays. The reciprocal viewport preserves the existing 44/56 composition
 * while the transform enlarges the entire identity panel, form and footer as
 * one coordinated interface. Scope this to login, registration and
 * organisation selection so denser account-management screens retain their
 * existing information density.
 */
@media (min-width: 1920px) and (min-height: 1050px) {
  body:has(.login-card, .register-card, .organisation-card) {
    --login-desktop-width: 88.888889vw;
    --login-desktop-height: 88.888889vh;
    --login-desktop-scale: 1.125;
    overflow: hidden;
  }

  body:has(.login-card, .register-card, .organisation-card) .auth-layout {
    width: var(--login-desktop-width);
    height: var(--login-desktop-height);
    min-height: var(--login-desktop-height);
    transform: scale(var(--login-desktop-scale));
    transform-origin: top left;
  }

  body:has(.login-card, .register-card, .organisation-card) .brand-panel,
  body:has(.login-card, .register-card, .organisation-card) .brand-panel__content,
  body:has(.login-card, .register-card, .organisation-card) .auth-content {
    min-height: var(--login-desktop-height);
  }
}

@media (min-width: 2560px) and (min-height: 1300px) {
  body:has(.login-card, .register-card, .organisation-card) {
    --login-desktop-width: 80vw;
    --login-desktop-height: 80vh;
    --login-desktop-scale: 1.25;
  }
}

@media (min-width: 3200px) and (min-height: 1700px) {
  body:has(.login-card, .register-card, .organisation-card) {
    --login-desktop-width: 71.428572vw;
    --login-desktop-height: 71.428572vh;
    --login-desktop-scale: 1.4;
  }
}

@media (min-width: 3840px) and (min-height: 2000px) {
  body:has(.login-card, .register-card, .organisation-card) {
    --login-desktop-width: 66.666667vw;
    --login-desktop-height: 66.666667vh;
    --login-desktop-scale: 1.5;
  }
}

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