:root {
  --auth-ink: #07163a;
  --auth-muted: #687797;
  --auth-line: #d9e2f2;
  --auth-blue: #173aff;
  --auth-blue-dark: #0e32e8;
  --auth-cyan: #10b9ee;
  --auth-green: #08b95e;
  --auth-surface: #ffffff;
}

html,
body.atlas-login {
  min-height: 100%;
  width: 100%;
}

body.atlas-login {
  margin: 0;
  background:
    radial-gradient(circle at 10% 4%, rgba(95, 130, 255, 0.08), transparent 31%),
    radial-gradient(circle at 94% 88%, rgba(30, 130, 255, 0.07), transparent 30%),
    #f5f8ff;
  color: var(--auth-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.atlas-login #container,
body.atlas-login .main,
body.atlas-login #content-start,
body.atlas-login #content {
  min-width: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  background: transparent;
}

body.atlas-login #footer,
body.atlas-login .clear {
  display: none;
}

body.atlas-login .toggle-nav-sidebar,
body.atlas-login #nav-sidebar {
  display: none !important;
}

body.atlas-login .main {
  display: block !important;
}

body.atlas-login #content {
  float: none !important;
  display: flex;
  width: 100vw !important;
  max-width: none !important;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 !important;
  padding: clamp(48px, 8vh, 72px) 48px !important;
}

body.atlas-login .skip-to-content-link:focus {
  z-index: 20;
}

.atlas-auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(1120px, calc(100vw - 96px));
  min-height: min(620px, calc(100vh - 144px));
  margin: 0 auto;
  overflow: visible;
  border: 1px solid rgba(190, 203, 226, 0.85);
  border-radius: 24px;
  background: var(--auth-surface);
  box-shadow: 0 22px 70px rgba(29, 53, 102, 0.17), 0 3px 12px rgba(29, 53, 102, 0.08);
}

.atlas-auth-story,
.atlas-auth-access {
  position: relative;
  min-width: 0;
}

.atlas-auth-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 68px 62px 60px;
  border-radius: 23px 0 0 23px;
  background:
    radial-gradient(circle at 62% 14%, rgba(255, 255, 255, 0.98) 0 2px, rgba(255, 255, 255, 0.48) 3px, transparent 30px),
    linear-gradient(145deg, #edf4ff 0%, #f5f9ff 47%, #e9f0ff 100%);
}

.atlas-auth-story::before,
.atlas-auth-story::after,
.atlas-auth-access::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.atlas-auth-story::before {
  right: -76px;
  bottom: 66px;
  width: 210px;
  height: 310px;
  border: 1px solid rgba(75, 123, 255, 0.14);
  border-radius: 50%;
  transform: rotate(28deg);
}

.atlas-auth-story::after {
  left: 70px;
  bottom: -54px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(75, 123, 255, 0.2);
  border-radius: 50%;
}

.atlas-pitch-mark {
  position: absolute;
  border: 1px solid rgba(75, 123, 255, 0.15);
  pointer-events: none;
}

.atlas-pitch-mark-top {
  top: 34px;
  left: -22px;
  width: 176px;
  height: 92px;
  transform: rotate(14deg);
}

.atlas-pitch-mark-side {
  top: 196px;
  left: -62px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
}

.atlas-tactic-dots {
  position: absolute;
  top: 34px;
  right: 62px;
  width: 92px;
  height: 78px;
  opacity: 0.48;
  background-image: radial-gradient(circle, #74bcff 1.5px, transparent 1.7px);
  background-size: 17px 17px;
}

.atlas-auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.atlas-auth-brand img {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(22, 79, 212, 0.16));
}

.atlas-auth-brand h1 {
  margin: 7px 0 2px;
  color: #06143a;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.7px;
  line-height: 1.05;
}

.atlas-auth-brand p {
  margin: 6px 0 0;
  color: #607198;
  font-size: 17px;
  line-height: 1.35;
}

.atlas-auth-promise {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 370px;
  margin-top: 27px;
}

.atlas-auth-promise h2 {
  margin: 0;
  color: #07163c;
  font-size: clamp(25px, 1.7vw, 28px);
  font-weight: 800;
  letter-spacing: -1.25px;
  line-height: 1.12;
}

.atlas-auth-promise p {
  margin: 16px 0 0;
  color: #53688f;
  font-size: 15px;
  line-height: 1.48;
}

.atlas-auth-capabilities {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 8px;
  margin-top: auto;
}

.atlas-auth-capabilities span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(197, 210, 232, 0.9);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: #536586;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(62, 92, 145, 0.06);
}

.atlas-auth-capabilities svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #174dff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.atlas-auth-capabilities .atlas-capability-shield {
  stroke: #0abf62;
}

.atlas-auth-access {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 62px 68px;
  border-left: 1px solid #dbe3f1;
  border-radius: 0 23px 23px 0;
  background: #ffffff;
}

.atlas-auth-access::after {
  right: -18px;
  bottom: 18px;
  width: 146px;
  height: 88px;
  border: 1px solid rgba(56, 105, 236, 0.12);
  transform: rotate(-17deg);
}

.atlas-login-form-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
}

.atlas-auth-eyebrow {
  margin: 0 0 19px;
  color: #53678f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.35px;
  line-height: 1;
  text-transform: uppercase;
}

.atlas-login-form-wrap h2 {
  margin: 0;
  color: #06143a;
  font-size: clamp(34px, 2.5vw, 38px);
  font-weight: 800;
  letter-spacing: -1.8px;
  line-height: 1.05;
}

.atlas-login-intro {
  margin: 10px 0 28px;
  color: #5f7093;
  font-size: 15px;
  line-height: 1.45;
}

.atlas-auth-error {
  margin: -16px 0 22px;
  padding: 12px 15px;
  border: 1px solid #ffb9b9;
  border-radius: 10px;
  background: #fff4f4;
  color: #a62626;
  font-size: 14px;
  line-height: 1.4;
}

.atlas-auth-error p {
  margin: 0;
}

.atlas-auth-field {
  margin-bottom: 20px;
}

.atlas-auth-field label {
  display: block;
  margin: 0 0 8px;
  color: #07163a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.atlas-auth-control {
  position: relative;
  display: flex;
  align-items: center;
  height: 54px;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.atlas-auth-control:focus-within {
  border-color: #6d83ff;
  box-shadow: 0 0 0 4px rgba(23, 58, 255, 0.1);
}

.atlas-auth-field.has-error .atlas-auth-control {
  border-color: #e75b5b;
}

.atlas-auth-control > svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-left: 16px;
  fill: none;
  stroke: #7c8dac;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.atlas-auth-control input {
  min-width: 0;
  height: 100%;
  flex: 1;
  margin: 0;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #102146;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
}

.atlas-auth-control input::placeholder {
  color: #b5c0d6;
  font-weight: 500;
  opacity: 1;
}

.atlas-auth-control .errorlist {
  display: none;
}

.atlas-password-toggle {
  display: grid;
  width: 46px;
  height: 100%;
  flex: 0 0 46px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7285a8;
  cursor: pointer;
}

.atlas-password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.atlas-password-toggle:focus-visible {
  outline: 3px solid rgba(23, 58, 255, 0.22);
  outline-offset: -5px;
  border-radius: 8px;
}

.atlas-field-error {
  margin: 7px 0 0;
  color: #b52b2b;
  font-size: 13px;
  font-weight: 600;
}

.atlas-auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -1px 0 25px;
  min-height: 21px;
  color: #223251;
  font-size: 13px;
  font-weight: 600;
}

.atlas-auth-options a {
  color: #1640f5;
  text-decoration: none;
}

.atlas-auth-options a:hover {
  text-decoration: underline;
}

.atlas-remember-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: default;
}

.atlas-remember-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.atlas-remember-control > span {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid #aebbd2;
  border-radius: 4px;
  background: #ffffff;
}

.atlas-remember-control input:checked + span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid #2f58ee;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.atlas-sign-in-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(100deg, var(--auth-blue) 0%, #0d49ff 58%, #173aff 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 11px 25px rgba(23, 58, 255, 0.2);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.atlas-sign-in-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.atlas-sign-in-button:hover {
  background: linear-gradient(100deg, #1235ec 0%, #0b43eb 58%, #1235ec 100%);
  box-shadow: 0 14px 28px rgba(23, 58, 255, 0.25);
  transform: translateY(-1px);
}

.atlas-sign-in-button:focus-visible {
  outline: 4px solid rgba(23, 58, 255, 0.2);
  outline-offset: 3px;
}

.atlas-auth-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  background: #ffffff;
  color: #24385e;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.atlas-auth-secondary-button:hover {
  border-color: #b9c8e4;
  box-shadow: 0 10px 24px rgba(38, 61, 105, 0.1);
  transform: translateY(-1px);
}

.atlas-auth-secondary-button:focus-visible {
  outline: 4px solid rgba(23, 58, 255, 0.2);
  outline-offset: 3px;
}

.atlas-password-shell {
  width: min(1040px, calc(100vw - 96px));
  min-height: min(580px, calc(100vh - 144px));
}

.atlas-password-shell .atlas-auth-story {
  padding-top: 62px;
  padding-bottom: 56px;
}

.atlas-password-shell .atlas-auth-access {
  padding: 56px 64px;
}

.atlas-password-form-wrap {
  width: min(100%, 420px);
}

.atlas-password-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.atlas-password-done-button {
  margin-top: 8px;
  text-decoration: none;
}

.atlas-auth-protection {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 0;
  color: #657797;
  font-size: 14px;
  font-weight: 600;
}

.atlas-auth-protection svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--auth-green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.atlas-system-status {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -23px;
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  padding: 0 23px;
  border: 1px solid #d3deee;
  border-radius: 13px;
  background: #ffffff;
  color: #08a957;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(38, 61, 105, 0.17);
  transform: translateX(-50%);
}

.atlas-system-status span {
  width: 13px;
  height: 13px;
  border: 3px solid #d8f6e6;
  border-radius: 50%;
  background: #0abd60;
  box-shadow: 0 0 0 1px rgba(10, 189, 96, 0.18);
}

@media (max-width: 980px) {
  body.atlas-login #content {
    min-height: auto;
    padding: 32px 15px 56px !important;
  }

  .atlas-auth-shell {
    grid-template-columns: 1fr;
    width: min(680px, calc(100vw - 30px));
    margin: 0 auto;
  }

  .atlas-auth-story {
    min-height: 330px;
    padding: 52px 40px 42px;
    border-radius: 23px 23px 0 0;
  }

  .atlas-auth-brand img {
    width: 98px;
    height: 98px;
  }

  .atlas-auth-brand h1 {
    font-size: 31px;
  }

  .atlas-auth-brand p {
    font-size: 16px;
  }

  .atlas-auth-promise {
    margin-top: 22px;
    text-align: center;
  }

  .atlas-auth-promise h2 {
    font-size: 27px;
  }

  .atlas-auth-promise p {
    display: none;
  }

  .atlas-auth-capabilities {
    margin-top: 30px;
  }

  .atlas-auth-access {
    padding: 64px 46px 82px;
    border-top: 1px solid #dbe3f1;
    border-left: 0;
    border-radius: 0 0 23px 23px;
  }

  .atlas-password-shell {
    width: min(680px, calc(100vw - 30px));
  }

  .atlas-password-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body.atlas-login #content {
    padding: 10px 10px 44px !important;
  }

  .atlas-auth-shell {
    width: calc(100vw - 20px);
    border-radius: 18px;
  }

  .atlas-auth-story {
    min-height: auto;
    padding: 38px 20px 30px;
    border-radius: 17px 17px 0 0;
  }

  .atlas-auth-promise h2 {
    font-size: 24px;
  }

  .atlas-auth-capabilities {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 260px;
  }

  .atlas-auth-capabilities span {
    justify-content: center;
  }

  .atlas-auth-access {
    padding: 48px 22px 72px;
    border-radius: 0 0 17px 17px;
  }

  .atlas-login-form-wrap h2 {
    font-size: 36px;
  }

  .atlas-login-intro {
    margin-bottom: 30px;
    font-size: 15px;
  }

  .atlas-auth-control,
  .atlas-sign-in-button {
    min-height: 56px;
    height: 56px;
  }

  .atlas-system-status {
    bottom: -24px;
    min-height: 47px;
    padding: 0 20px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-auth-control,
  .atlas-sign-in-button {
    transition: none;
  }
}
