:root {
  --ima-navy: #0a2d44;
  --ima-navy-strong: #06243a;
  --ima-blue: #155f83;
  --ima-orange: #e98224;
  --ima-orange-soft: #fff3e8;
  --ima-ink: #172a3a;
  --ima-muted: #617487;
  --ima-line: #d8e2e8;
  --ima-soft: #f3f7f9;
  --ima-white: #ffffff;
  --ima-danger: #a82b20;
  --ima-danger-soft: #fff1ef;
  --ima-success: #087443;
  --ima-success-soft: #edf8f2;
  --ima-shadow: 0 24px 64px rgba(10, 45, 68, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 8% 15%, rgba(233, 130, 36, 0.1), transparent 30%),
    radial-gradient(circle at 92% 5%, rgba(21, 95, 131, 0.12), transparent 29%),
    var(--ima-soft);
  color: var(--ima-ink);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ima-blue);
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(233, 130, 36, 0.42);
  outline-offset: 3px;
}

.auth-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(20px, 5vw, 68px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--ima-line);
  backdrop-filter: blur(16px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ima-navy);
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.auth-brand img {
  width: 43px;
  height: 43px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 5px 16px rgba(10, 45, 68, 0.12);
}

.auth-brand span {
  display: grid;
  gap: 1px;
}

.auth-brand small {
  color: var(--ima-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auth-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 9px;
  color: var(--ima-navy);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.auth-nav a:hover {
  background: #edf4f7;
}

.auth-nav .nav-primary {
  background: var(--ima-navy);
  color: var(--ima-white);
}

.auth-nav .nav-primary:hover {
  background: var(--ima-navy-strong);
}

.auth-main {
  width: 100%;
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(30px, 6vw, 72px) 20px;
}

.auth-layout {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(420px, 540px);
  align-items: center;
  gap: clamp(30px, 6vw, 76px);
}

.auth-layout--compact {
  width: min(100%, 510px);
  display: block;
}

.auth-context {
  max-width: 400px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--ima-blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.auth-context h1 {
  margin: 0;
  color: var(--ima-navy);
  font-family: Montserrat, Inter, sans-serif;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.auth-context h1 em {
  color: var(--ima-orange);
  font-style: normal;
}

.auth-context > p {
  margin: 20px 0 0;
  color: var(--ima-muted);
  font-size: 16px;
  line-height: 1.7;
}

.auth-points {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #385064;
  font-size: 14px;
  font-weight: 700;
}

.auth-points b {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ima-orange-soft);
  color: var(--ima-orange);
}

.auth-card {
  width: 100%;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid rgba(216, 226, 232, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--ima-shadow);
}

.auth-card__header {
  margin-bottom: 24px;
}

.auth-card__header h1,
.auth-card__header h2 {
  margin: 0;
  color: var(--ima-navy);
  font-family: Montserrat, Inter, sans-serif;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.auth-card__header p {
  margin: 9px 0 0;
  color: var(--ima-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 17px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field-label {
  color: var(--ima-ink);
  font-size: 14px;
  font-weight: 780;
}

.required {
  color: var(--ima-danger);
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #c6d3dc;
  border-radius: 10px;
  background: var(--ima-white);
  color: var(--ima-ink);
}

.field input::placeholder {
  color: #8a9aa8;
}

.field input:hover,
.field select:hover {
  border-color: #aebfca;
}

.field input:focus,
.field select:focus {
  border-color: var(--ima-blue);
  outline: 3px solid rgba(21, 95, 131, 0.16);
  outline-offset: 0;
}

.field-help {
  margin: 0;
  color: var(--ima-muted);
  font-size: 12px;
  line-height: 1.45;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 82px;
}

.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 66px;
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ima-blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle:hover {
  background: #edf5f8;
}

.password-hint {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
  margin: -4px 0 0;
  padding: 0;
  color: var(--ima-muted);
  font-size: 12px;
  list-style: none;
}

.password-hint li::before {
  content: "○";
  display: inline-block;
  width: 17px;
}

.password-hint li.is-valid {
  color: var(--ima-success);
}

.password-hint li.is-valid::before {
  content: "✓";
  font-weight: 900;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #465b6e;
  font-size: 13px;
  line-height: 1.5;
}

.check-field input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 2px 0 0;
  accent-color: var(--ima-blue);
}

.check-field label {
  cursor: pointer;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.text-link {
  color: var(--ima-blue);
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.primary-button,
.secondary-button,
.google-button {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 10px;
  font-weight: 820;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
  border: 1px solid var(--ima-navy);
  background: var(--ima-navy);
  color: var(--ima-white);
}

.primary-button:hover:not(:disabled) {
  background: var(--ima-navy-strong);
  box-shadow: 0 10px 24px rgba(10, 45, 68, 0.18);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid #b8c7d0;
  background: var(--ima-white);
  color: var(--ima-navy);
}

.secondary-button:hover:not(:disabled) {
  background: #f3f8fa;
}

.google-button {
  border: 1px solid #c8d4db;
  background: var(--ima-white);
  color: #203548;
}

.google-button:hover:not(:disabled) {
  border-color: #9fb2bf;
  background: #f8fafb;
}

.google-button .fa-google {
  color: #4285f4;
  font-size: 18px;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ima-muted);
  font-size: 12px;
  text-transform: lowercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--ima-line);
}

.auth-message {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-message[data-state="error"],
.auth-message[data-state="success"],
.auth-message[data-state="info"] {
  padding: 11px 13px;
  border: 1px solid;
}

.auth-message[data-state="error"] {
  border-color: #f1c3be;
  background: var(--ima-danger-soft);
  color: var(--ima-danger);
}

.auth-message[data-state="success"] {
  border-color: #b7dfca;
  background: var(--ima-success-soft);
  color: var(--ima-success);
}

.auth-message[data-state="info"] {
  border-color: #bfd9e5;
  background: #eef7fa;
  color: #245e79;
}

.auth-links {
  margin: 21px 0 0;
  color: var(--ima-muted);
  font-size: 14px;
  text-align: center;
}

.auth-links a {
  font-weight: 800;
}

.verify-screen {
  text-align: center;
}

.verify-icon,
.status-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--ima-success-soft);
  color: var(--ima-success);
  font-size: 27px;
}

.verify-email {
  color: var(--ima-navy);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.verify-actions {
  display: grid;
  gap: 11px;
  margin-top: 24px;
}

.cooldown {
  min-height: 19px;
  margin: 10px 0 0;
  color: var(--ima-muted);
  font-size: 12px;
}

.onboarding-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 13px;
  border-radius: 12px;
  background: #f3f8fa;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ima-navy);
  color: var(--ima-white);
  font-weight: 850;
}

.onboarding-profile strong,
.onboarding-profile span {
  display: block;
}

.onboarding-profile span {
  margin-top: 2px;
  color: var(--ima-muted);
  font-size: 12px;
}

.auth-footer {
  padding: 20px;
  border-top: 1px solid var(--ima-line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ima-muted);
  font-size: 12px;
  text-align: center;
}

.auth-footer a {
  margin: 0 5px;
  color: var(--ima-muted);
}

.hidden {
  display: none !important;
}

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

@media (max-width: 820px) {
  .auth-layout {
    grid-template-columns: 1fr;
    width: min(100%, 580px);
    gap: 26px;
  }

  .auth-context {
    max-width: none;
    text-align: center;
  }

  .auth-context h1 {
    font-size: 36px;
  }

  .auth-context > p {
    margin-top: 12px;
  }

  .auth-points {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: left;
  }

  .auth-points li {
    align-items: flex-start;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .auth-header {
    min-height: 66px;
    padding: 10px 20px;
  }

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

  .auth-brand small {
    display: none;
  }

  .auth-nav a:not(.nav-primary) {
    display: none;
  }

  .auth-nav .nav-primary {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .auth-main {
    place-items: start center;
    padding: 24px 20px 38px;
  }

  .auth-context {
    text-align: left;
  }

  .auth-context h1 {
    font-size: 30px;
  }

  .auth-context > p {
    font-size: 14px;
    line-height: 1.55;
  }

  .auth-points {
    display: none;
  }

  .auth-card {
    padding: 25px 20px;
    border-radius: 16px;
  }

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

  .form-options {
    align-items: flex-start;
    flex-direction: column;
  }
}

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