:root {
  --ink: #142d3b;
  --muted: #647a84;
  --mist: #e7eef1;
  --paper: #f8fbfa;
  --line: #c7d4d8;
  --tide: #287c77;
  --ochre: #c58a2d;
  --persimmon: #d85b43;
  --navy: #102a37;
  --body: "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --display: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
  --utility: "Noto Sans Mono CJK SC", "Noto Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--navy);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background:
    linear-gradient(135deg, rgba(16, 42, 55, 0.98), rgba(24, 56, 72, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(255, 255, 255, 0.04) 27px 28px);
  -webkit-font-smoothing: antialiased;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  width: min(1050px, calc(100% - 48px));
  min-height: 640px;
  margin: 0 auto;
  padding: max(42px, 7vh) 0;
}

.login-context,
.login-panel {
  position: relative;
  overflow: hidden;
}

.login-context {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  padding: 48px;
  color: #edf6f5;
  border: 1px solid rgba(231, 238, 241, 0.2);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  background:
    radial-gradient(circle at 76% 18%, rgba(197, 138, 45, 0.2), transparent 28%),
    rgba(11, 35, 47, 0.65);
}

.login-context::after {
  position: absolute;
  right: -65px;
  bottom: 86px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(231, 238, 241, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(231, 238, 241, 0.035),
    0 0 0 68px rgba(231, 238, 241, 0.022);
  content: "";
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup p,
.eyebrow {
  margin: 0;
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.brand-lockup p {
  color: rgba(237, 246, 245, 0.62);
}

.brand-lockup strong {
  display: block;
  margin-top: 2px;
  font-family: var(--display);
  font-size: 20px;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(237, 246, 245, 0.45);
  border-radius: 50%;
}

.brand-mark i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #edf6f5;
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) {
  background: var(--ochre);
}

.context-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
}

.context-copy .eyebrow {
  color: #d8ac67;
}

.context-copy h1 {
  margin: 17px 0 20px;
  font-family: var(--display);
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.context-copy > p:last-child {
  max-width: 430px;
  margin: 0;
  color: rgba(237, 246, 245, 0.68);
  font-size: 14px;
  line-height: 1.8;
}

.security-ledger {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(237, 246, 245, 0.16);
}

.security-ledger div {
  padding: 16px 15px 0 0;
}

.security-ledger dt {
  color: rgba(237, 246, 245, 0.48);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.security-ledger dd {
  margin: 5px 0 0;
  font-size: 11px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 62px;
  border-radius: 0 16px 16px 0;
  background:
    linear-gradient(rgba(20, 45, 59, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 45, 59, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}

.simulation-stamp {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 9px;
  color: var(--persimmon);
  border: 1px solid rgba(216, 91, 67, 0.4);
  border-radius: 4px;
  font-family: var(--utility);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.login-panel header .eyebrow {
  color: var(--tide);
}

.login-panel h2 {
  margin: 10px 0 7px;
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: -0.035em;
}

.login-panel header > p:last-child {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 13px;
}

.login-error {
  margin: -10px 0 20px;
  padding: 10px 12px;
  color: #9d3827;
  border: 1px solid rgba(216, 91, 67, 0.35);
  border-radius: 6px;
  background: #f7dcd6;
  font-size: 12px;
}

form {
  display: grid;
  gap: 9px;
}

label {
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus {
  border-color: var(--tide);
  box-shadow: 0 0 0 3px rgba(40, 124, 119, 0.12);
}

button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  margin-top: 19px;
  padding: 0 17px;
  color: #f5fbfa;
  border: 0;
  border-radius: 7px;
  background: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

button:hover {
  background: #183f50;
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 3px solid rgba(197, 138, 45, 0.55);
  outline-offset: 3px;
}

.login-note {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
    width: min(580px, calc(100% - 28px));
    padding: 20px 0;
  }

  .login-context {
    min-height: auto;
    padding: 30px;
    border-right: 1px solid rgba(231, 238, 241, 0.2);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
  }

  .context-copy {
    margin: 56px 0 44px;
  }

  .context-copy h1 {
    font-size: 44px;
  }

  .security-ledger {
    display: none;
  }

  .login-panel {
    padding: 58px 30px 38px;
    border-radius: 0 0 14px 14px;
  }
}

@media (max-width: 430px) {
  .login-context {
    padding: 24px;
  }

  .context-copy {
    margin: 42px 0 26px;
  }

  .context-copy h1 {
    font-size: 38px;
  }

  .context-copy > p:last-child {
    display: none;
  }

  .login-panel {
    padding-inline: 24px;
  }
}

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