:root { color-scheme: only light; }
* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: only light; }

body.esos-auth-page {
  --auth-text: #101827;
  --auth-muted: #49647a;
  --auth-line: rgba(23,32,51,.18);
  --auth-accent: #0d6fa8;
  --auth-accent-strong: #07598a;
  --auth-soft: rgba(13,111,168,.12);
  --auth-control: rgba(255,255,255,.88);
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--auth-text);
  -webkit-text-fill-color: currentColor;
  background: linear-gradient(160deg, #78c7ff 0%, #9dd8ff 52%, #bee9ff 100%) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.esos-auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(122deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 26%, transparent 50%);
}

body.esos-auth-page :where(button, input, select, textarea) { color-scheme: only light; }

.auth-shell {
  position: relative;
  width: min(100% - 28px, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 0 max(36px, env(safe-area-inset-bottom));
}

.auth-brand {
  width: fit-content;
  min-height: 52px;
  margin: 0;
  padding: 7px 14px 7px 7px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--auth-line);
  border-radius: 17px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 28px rgba(15,75,116,.11);
}

.auth-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--auth-accent-strong), var(--auth-accent));
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 19px;
  font-weight: 900;
}

.auth-brand-name { color: var(--auth-text); font-size: 16px; font-weight: 850; }
.auth-brand-subtitle { display: none; }

.auth-card {
  margin-top: clamp(48px, 8vh, 72px);
  padding: 22px;
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 12px 34px rgba(16,24,39,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-eyebrow {
  margin-bottom: 9px;
  color: var(--auth-accent-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(36px, 8vw, 48px);
  line-height: 1;
  letter-spacing: -.045em;
}

.auth-lead {
  max-width: 500px;
  margin: 16px 0 26px;
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(23,32,51,.10);
}

.auth-field {
  display: grid;
  gap: 8px;
  color: var(--auth-text);
  font-size: 15px;
  font-weight: 800;
}

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 72px; }

.auth-field input {
  width: 100%;
  min-height: 56px;
  border: 1.5px solid var(--auth-line);
  border-radius: 16px;
  outline: none;
  padding: 13px 16px;
  background: var(--auth-control) !important;
  color: var(--auth-text) !important;
  -webkit-text-fill-color: var(--auth-text) !important;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,24,39,.06), inset 0 1px 0 rgba(255,255,255,.62);
}

.auth-field input:focus {
  border-color: var(--auth-accent);
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 0 0 3px rgba(13,111,168,.14);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  padding: 7px 9px;
  color: var(--auth-accent-strong);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.auth-primary {
  min-height: 56px;
  margin-top: 3px;
  border: 1.5px solid var(--auth-accent);
  border-radius: 16px;
  background: rgba(255,255,255,.90) !important;
  color: var(--auth-text) !important;
  -webkit-text-fill-color: var(--auth-text) !important;
  box-shadow: inset 0 0 0 1px rgba(13,111,168,.16), 0 2px 5px rgba(16,24,39,.08);
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
}

.auth-primary:disabled { opacity: .62; cursor: default; }
.auth-hint,
.auth-footnote { color: var(--auth-muted); font-size: 12px; line-height: 1.5; }
.auth-hint { margin: -6px 0 0; }
.auth-footnote { margin: 18px 0 0; text-align: left; }

.auth-role-note,
.auth-status {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.auth-role-note { color: #164c79; background: rgba(255,255,255,.62); }
.auth-status-success { color: #176347; background: rgba(221,247,237,.82); }
.auth-status-error { color: #9c2736; background: rgba(255,231,235,.88); }

@media (max-width: 520px) {
  .auth-shell { width: min(100% - 20px, 620px); padding-top: max(16px, env(safe-area-inset-top)); }
  .auth-card { margin-top: 42px; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
