:root {
  --auth-ink: #18323c;
  --auth-ink-soft: #607680;
  --auth-line: #dce5e9;
  --auth-surface: #ffffff;
  --auth-bg: #f4f6f7;
  --auth-navy: #0d1b24;
  --auth-navy-soft: #132832;
  --auth-accent: #2f6074;
  --auth-accent-deep: #244e60;
  --auth-danger: #a65449;
  --auth-danger-bg: #fbf4f2;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body.ethos-auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--auth-bg);
  color: var(--auth-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

.ethos-auth-shell {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(520px, 1.1fr);
  min-height: 100vh;
}

.ethos-auth-brand {
  position: relative;
  display: flex;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 17%, rgba(108, 154, 170, 0.16), transparent 32%),
    linear-gradient(155deg, var(--auth-navy-soft), var(--auth-navy) 68%);
  color: #fff;
}

.ethos-auth-brand::before,
.ethos-auth-brand::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.ethos-auth-brand::before {
  width: 470px;
  height: 470px;
  right: -300px;
  top: 80px;
}

.ethos-auth-brand::after {
  width: 290px;
  height: 290px;
  right: -160px;
  top: 170px;
}

.ethos-auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 640px;
  min-height: 100%;
  padding: clamp(42px, 6vw, 76px);
  flex-direction: column;
}

.ethos-wordmark,
.ethos-mobile-wordmark {
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
}

.ethos-wordmark-main {
  font-size: 1.18rem;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.ethos-wordmark-sub {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.57rem;
  font-weight: 750;
  letter-spacing: 0.34em;
}

.ethos-brand-copy {
  margin: auto 0;
  padding: 72px 0 56px;
}

.ethos-kicker {
  display: block;
  color: #80939d;
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ethos-auth-brand .ethos-kicker {
  color: rgba(255, 255, 255, 0.52);
}

.ethos-brand-copy h1 {
  max-width: 510px;
  margin: 15px 0 18px;
  font-size: clamp(2.25rem, 4.3vw, 4.1rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.ethos-brand-copy > p {
  max-width: 510px;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
  line-height: 1.65;
}

.ethos-brand-points {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ethos-brand-points > div {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 13px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ethos-brand-points > div > span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ethos-brand-points p,
.ethos-brand-points strong,
.ethos-brand-points small {
  display: block;
  margin: 0;
}

.ethos-brand-points strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 760;
}

.ethos-brand-points small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.69rem;
}

.ethos-brand-footnote {
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.69rem;
}

.ethos-auth-access {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: clamp(30px, 5vw, 76px);
  background:
    radial-gradient(circle at 100% 0%, rgba(70, 111, 130, 0.05), transparent 28%),
    var(--auth-bg);
}

.ethos-login-wrap { width: min(100%, 470px); }
.ethos-mobile-wordmark { display: none; }

.ethos-login-security {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  padding: 6px 9px 6px 7px;
  border: 1px solid #d8e2e6;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #69808a;
  font-size: 0.68rem;
  font-weight: 730;
  box-shadow: 0 6px 24px rgba(17, 42, 52, 0.025);
}

.ethos-lock {
  display: grid;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #eef3f5;
  place-items: center;
}

.ethos-lock svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #557582;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.ethos-login-header h2 {
  margin: 8px 0 9px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1;
}

.ethos-login-header p {
  max-width: 410px;
  margin: 0;
  color: var(--auth-ink-soft);
  font-size: 0.91rem;
  line-height: 1.55;
}

.ethos-login-alerts {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.ethos-login-alert {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid #ead6d1;
  border-radius: 10px;
  background: var(--auth-danger-bg);
  color: #7f4941;
  font-size: 0.78rem;
}

.ethos-login-alert > span {
  display: grid;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #f2dfdb;
  font-size: 0.7rem;
  font-weight: 850;
  place-items: center;
}

.ethos-login-alert p { margin: 2px 0 0; }

.ethos-login-form {
  display: grid;
  gap: 19px;
  margin-top: 34px;
}

.ethos-field-label {
  display: block;
  margin-bottom: 7px;
  color: #3d5661;
  font-size: 0.75rem;
  font-weight: 760;
}

.ethos-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d3dee3;
  border-radius: 10px;
  outline: 0;
  background: var(--auth-surface);
  color: var(--auth-ink);
  font-size: 0.9rem;
  box-shadow: 0 5px 18px rgba(19, 45, 55, 0.025);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.ethos-input::placeholder { color: #a4b0b6; }
.ethos-input:hover { border-color: #becdd4; }

.ethos-input:focus {
  border-color: #688b99;
  box-shadow: 0 0 0 4px rgba(66, 110, 129, 0.1);
}

.ethos-input.is-invalid {
  border-color: #c77b70;
  background: #fffdfc;
}

.ethos-field-errors {
  margin-top: 6px;
  color: var(--auth-danger);
  font-size: 0.7rem;
}

.ethos-field-errors p { margin: 0; }

.ethos-login-submit {
  width: 100%;
  min-height: 49px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--auth-accent);
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 780;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 25px rgba(36, 78, 96, 0.16);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.ethos-login-submit:hover {
  background: var(--auth-accent-deep);
  box-shadow: 0 12px 29px rgba(36, 78, 96, 0.2);
  transform: translateY(-1px);
}

.ethos-login-submit:focus-visible {
  outline: 3px solid rgba(47, 96, 116, 0.2);
  outline-offset: 3px;
}

.ethos-login-private-note {
  display: grid;
  grid-template-columns: 7px 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--auth-line);
  color: #8a999f;
  font-size: 0.68rem;
  line-height: 1.5;
}

.ethos-login-private-note > span {
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 50%;
  background: #87a3af;
}

.ethos-login-private-note p { margin: 0; }

@media (max-width: 980px) {
  .ethos-auth-shell {
    grid-template-columns: minmax(330px, 0.75fr) minmax(430px, 1fr);
  }

  .ethos-auth-brand-inner { padding: 42px; }
  .ethos-brand-copy h1 { font-size: 2.6rem; }
  .ethos-auth-access { padding: 42px; }
}

@media (max-width: 760px) {
  .ethos-auth-shell { display: block; }
  .ethos-auth-brand { display: none; }

  .ethos-auth-access {
    min-height: 100vh;
    padding: 28px 20px;
  }

  .ethos-login-wrap { width: min(100%, 440px); }

  .ethos-mobile-wordmark {
    display: inline-flex;
    margin-bottom: 58px;
    color: var(--auth-ink);
  }

  .ethos-mobile-wordmark > span {
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: 0.18em;
  }

  .ethos-mobile-wordmark small {
    margin-top: 3px;
    color: #87979f;
    font-size: 0.5rem;
    font-weight: 780;
    letter-spacing: 0.3em;
  }

  .ethos-login-security { margin-bottom: 27px; }
  .ethos-login-header h2 { font-size: 2.2rem; }
  .ethos-login-form { margin-top: 29px; }
}

@media (max-width: 420px) {
  .ethos-auth-access {
    align-items: start;
    padding-top: 24px;
  }

  .ethos-mobile-wordmark { margin-bottom: 46px; }
  .ethos-input { height: 47px; }
}
