:root {
  color-scheme: light;
  --navy: #0b1930;
  --blue: #2368dc;
  --blue-soft: #e8f0ff;
  --surface: rgba(255, 255, 255, 0.94);
  --background: #edf2f8;
  --ink: #16233a;
  --muted: #68778d;
  --line: #d9e1ec;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --shadow: 0 28px 80px rgba(13, 31, 57, 0.16);
}

* { box-sizing: border-box; }
html { min-width: 320px; }

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--ink);
  font: 400 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.background-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(23, 54, 95, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 54, 95, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.background-glow {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.glow-one {
  top: -20rem;
  right: -14rem;
  width: 48rem;
  height: 48rem;
  background: radial-gradient(circle, rgba(50, 120, 235, 0.2), transparent 68%);
}

.glow-two {
  bottom: -23rem;
  left: -15rem;
  width: 48rem;
  height: 48rem;
  background: radial-gradient(circle, rgba(49, 168, 151, 0.13), transparent 68%);
}

.site-header,
.page-shell,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 54, 95, 0.12);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #3278eb, #1955ba);
  box-shadow: 0 8px 22px rgba(35, 104, 220, 0.25);
}

.brand-mark svg,
.auth-badge svg,
.input-shell svg,
.password-toggle svg,
.auth-footer svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand-mark svg { width: 25px; color: #fff; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 1.05rem; letter-spacing: -0.02em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }

.service-status {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.service-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28a47a;
  box-shadow: 0 0 0 5px rgba(40, 164, 122, 0.12);
}

.page-shell {
  display: grid;
  min-height: calc(100vh - 176px);
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.78fr);
  gap: clamp(48px, 9vw, 132px);
  align-items: center;
  padding-block: 56px;
}

.intro { padding-block: 22px; }
.eyebrow { margin: 0 0 20px; color: var(--blue); font-size: 0.73rem; font-weight: 800; letter-spacing: 0.17em; text-transform: uppercase; }

h1 {
  max-width: 690px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(3.2rem, 6.3vw, 5.8rem);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.intro-text { max-width: 620px; margin: 28px 0 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.15rem); }
.feature-grid { display: grid; gap: 12px; margin-top: 44px; }
.feature-grid article { display: flex; gap: 14px; align-items: center; }

.feature-icon {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(35, 104, 220, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--blue);
  font-size: 0.65rem;
  font-weight: 800;
}

.feature-grid div { display: grid; gap: 2px; }
.feature-grid strong { font-size: 0.88rem; }
.feature-grid small { color: var(--muted); font-size: 0.78rem; }

.auth-column { width: 100%; max-width: 470px; justify-self: end; }
.auth-card {
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-heading { display: flex; gap: 14px; align-items: center; }
.auth-badge { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.auth-badge svg { width: 23px; }
.auth-heading p { margin: 0 0 2px; color: var(--blue); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.auth-heading h2 { margin: 0; color: var(--navy); font-size: 1.65rem; letter-spacing: -0.035em; }
.auth-description { margin: 20px 0 28px; color: var(--muted); font-size: 0.9rem; }

form > label,
.label-row label { display: block; margin: 0 0 8px; color: #394a62; font-size: 0.79rem; font-weight: 700; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.label-row label { margin-bottom: 8px; }
.text-button { margin: 0 0 8px; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 0.75rem; cursor: pointer; }
.text-button:hover { text-decoration: underline; }

.input-shell { position: relative; display: flex; align-items: center; }
.input-shell > span { position: absolute; left: 14px; z-index: 1; display: grid; color: #7a8ba2; pointer-events: none; }
.input-shell > span svg { width: 19px; }

.input-shell input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  padding: 12px 48px 12px 44px;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-shell input::placeholder { color: #98a5b7; }
.input-shell input:focus { border-color: #3278eb; box-shadow: 0 0 0 4px rgba(50, 120, 235, 0.12); }

.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7a8ba2;
  cursor: pointer;
}

.password-toggle:hover { background: #f0f4f9; color: var(--blue); }
.password-toggle svg { width: 20px; }

.error-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #f7c9c4;
  border-radius: 11px;
  background: var(--danger-bg);
  color: var(--danger);
}

.error-message[hidden] { display: none; }
.error-message > span { display: grid; flex: 0 0 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 900; }
.error-message div { display: grid; gap: 2px; }
.error-message strong { font-size: 0.78rem; }
.error-message small { line-height: 1.4; }

.submit-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 50px;
  place-items: center;
  margin-top: 22px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #3278eb, #1f5fc9);
  box-shadow: 0 10px 24px rgba(35, 104, 220, 0.25);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(35, 104, 220, 0.3); }
.submit-button:disabled { cursor: wait; opacity: 0.78; }
.button-loader { display: none; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; }
.submit-button.is-loading .button-label { display: none; }
.submit-button.is-loading .button-loader { display: block; }

.auth-footer { display: flex; gap: 9px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.73rem; }
.auth-footer svg { flex: 0 0 18px; width: 18px; color: #49846f; }
.support-copy { margin: 18px auto 0; color: var(--muted); font-size: 0.73rem; text-align: center; }

.site-footer { display: flex; min-height: 88px; align-items: center; justify-content: space-between; border-top: 1px solid rgba(23, 54, 95, 0.12); color: var(--muted); font-size: 0.72rem; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--blue); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .site-header, .page-shell, .site-footer { width: min(100% - 30px, 1180px); }
  .page-shell { grid-template-columns: 1fr; gap: 42px; padding-block: 48px; }
  .intro { padding-block: 0; }
  .auth-column { max-width: 540px; justify-self: stretch; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid article { align-items: flex-start; }
}

@media (max-width: 620px) {
  .site-header { min-height: 76px; }
  .service-status { font-size: 0; }
  .page-shell { padding-block: 38px; }
  h1 { font-size: clamp(2.7rem, 14vw, 4.4rem); }
  .feature-grid { grid-template-columns: 1fr; margin-top: 34px; }
  .auth-card { border-radius: 18px; }
  .site-footer { flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; }
}

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