:root {
  --brand-ink: #100800;
  --brand-navy: #11132f;
  --brand-blue: #4250f4;
  --brand-cyan: #0097ce;
  --brand-deep: #0c4da2;
  --paper: #ffffff;
  --paper-soft: #f7f8fb;
  --text: #17182c;
  --muted: #66697b;
  --border: #dfe2ea;
  --error: #b42318;
  --focus: #0c4da2;
  --shadow: 0 28px 90px rgb(17 19 47 / 12%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: light;
  font-family: "Roboto", sans-serif;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--paper);
}

button, input { font: inherit; }
button, a, label[for] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--brand-navy);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.login-shell {
  display: grid;
  grid-template-columns: minmax(480px, 1.08fr) minmax(460px, 0.92fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  color: var(--paper);
  isolation: isolate;
  background:
    radial-gradient(circle at 4% 84%, rgb(66 80 244 / 26%), transparent 27%),
    linear-gradient(145deg, #151733 0%, var(--brand-ink) 66%, #090604 100%);
}

.brand-panel::before {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-cyan));
}

.contour-map {
  position: absolute;
  top: -12%;
  right: -25%;
  z-index: -2;
  width: min(92vw, 880px);
  height: min(92vw, 880px);
  opacity: 0.34;
}

.contour-map path {
  fill: none;
  stroke: rgb(255 255 255 / 15%);
  stroke-width: 1.2;
}

.brand-top { display: flex; align-items: center; gap: 24px; }
.brand-top a { display: inline-flex; border-radius: 2px; }

.brand-logo {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: var(--paper);
  box-shadow: 0 16px 35px rgb(0 0 0 / 26%);
}

.brand-rule {
  width: min(180px, 24vw);
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
}

.brand-copy {
  width: min(640px, 92%);
  margin: auto 0;
  padding: 72px 0;
}

.eyebrow, .section-label {
  margin: 0 0 22px;
  font-family: "Poppins", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #8bdcff;
}

.eyebrow::before {
  width: 32px;
  height: 2px;
  content: "";
  background: var(--brand-cyan);
}

.brand-copy h1 {
  max-width: 690px;
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.6rem, 4.7vw, 5.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.brand-description {
  max-width: 570px;
  margin: 30px 0 0;
  color: rgb(255 255 255 / 70%);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.75;
}

.brand-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgb(255 255 255 / 58%);
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-footer svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--brand-cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.ghost-word {
  position: absolute;
  right: -0.12em;
  bottom: -0.22em;
  z-index: -1;
  color: transparent;
  font-family: "Poppins", sans-serif;
  font-size: clamp(8rem, 18vw, 19rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.09em;
  -webkit-text-stroke: 1px rgb(255 255 255 / 6%);
  user-select: none;
}

.access-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(32px, 4vh, 48px) clamp(36px, 7vw, 96px);
  background:
    linear-gradient(rgb(17 19 47 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(17 19 47 / 3%) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

.access-panel__inner {
  width: min(100%, 470px);
  padding: clamp(28px, 4vw, 56px);
  background: rgb(255 255 255 / 96%);
  border: 1px solid rgb(223 226 234 / 82%);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.section-label { color: var(--brand-deep); }

.login-header h2 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 3.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.login-header > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.login-form { display: grid; gap: 22px; margin-top: 38px; }
.field-group { display: grid; gap: 9px; }

.field-group > label {
  font-family: "Poppins", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
}

.input-frame { position: relative; display: flex; align-items: center; }

.input-frame > svg {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #818598;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  pointer-events: none;
}

.input-frame input {
  width: 100%;
  min-height: 54px;
  padding: 0 48px;
  color: var(--text);
  background: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.input-frame input::placeholder { color: #777b8d; }
.input-frame input:hover { border-color: #b8bdca; }

.input-frame input:focus {
  background: var(--paper);
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgb(0 151 206 / 14%);
}

.input-frame input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgb(180 35 24 / 9%);
}

.password-toggle {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #737789;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.password-toggle:hover { color: var(--brand-cyan); background: rgb(0 151 206 / 7%); }

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

.password-toggle .eye-closed, .password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.field-error {
  min-height: 0;
  margin: 0;
  color: var(--error);
  font-size: 0.82rem;
  line-height: 1.35;
}

.field-error:empty { display: none; }

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
}

.remember-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand-blue);
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 24px;
  color: var(--paper);
  cursor: pointer;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-deep), var(--brand-blue));
  background-size: 210% 100%;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgb(66 80 244 / 24%);
  font-family: "Poppins", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background-position 350ms ease;
}

.submit-button:hover {
  background-position: 100% 0;
  box-shadow: 0 15px 34px rgb(66 80 244 / 31%);
  transform: translateY(-2px);
}

.submit-button:active { transform: translateY(0); }

.submit-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button-spinner {
  display: none;
  width: 19px;
  height: 19px;
  border: 2px solid rgb(255 255 255 / 42%);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.submit-button.is-loading .button-spinner { display: block; }
.submit-button.is-loading > svg { display: none; }
.submit-button:disabled { cursor: wait; opacity: 0.86; }

.form-status {
  min-height: 1.2em;
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  padding-top: 22px;
  color: #85899a;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.login-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-deep);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible { outline: 3px solid var(--brand-deep); outline-offset: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: auto; padding: 30px clamp(24px, 7vw, 64px) 48px; }
  .brand-panel::before { inset: auto 0 0; width: auto; height: 4px; }
  .brand-copy { width: min(720px, 100%); padding: 64px 0 48px; }
  .brand-copy h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
  .brand-footer { display: none; }
  .ghost-word { font-size: clamp(8rem, 31vw, 16rem); }
  .access-panel { min-height: auto; padding: 64px 24px 80px; }
}

@media (max-width: 560px) {
  .brand-panel { padding: 24px 20px 36px; }
  .brand-logo { width: 66px; height: 66px; }
  .brand-rule { width: 100px; }
  .brand-copy { padding: 46px 0 24px; }
  .brand-copy h1 { font-size: clamp(2.25rem, 12vw, 3.45rem); }
  .brand-description { margin-top: 22px; line-height: 1.6; }
  .access-panel { display: block; padding: 42px 16px 56px; background-size: 32px 32px; }
  .access-panel__inner { padding: 30px 22px; border-radius: 8px; }
  .login-form { margin-top: 32px; }
  .login-footer { flex-direction: column; 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;
  }
}
