:root {
  color-scheme: light;
  --ink: #102331;
  --ink-soft: #52616a;
  --navy: #0b1d2d;
  --navy-line: rgba(255, 255, 255, 0.16);
  --paper: #fffefa;
  --canvas: #f1f0eb;
  --line: #d9ddd9;
  --accent: #8f1f2b;
  --accent-dark: #731721;
  --error: #a2222f;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
}

button, input { font: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
}

.trust-panel {
  min-height: 100vh;
  padding: clamp(34px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.trust-panel::after {
  content: "";
  position: absolute;
  width: min(42vw, 580px);
  aspect-ratio: 1;
  border: 1px solid var(--navy-line);
  border-radius: 50%;
  right: -28%;
  bottom: -18%;
  box-shadow: 0 0 0 72px rgba(255, 255, 255, 0.025), 0 0 0 144px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
}

.brand-mark svg {
  width: 25px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand-lockup div { display: flex; flex-direction: column; line-height: 1.08; }
.brand-lockup strong { font-size: 17px; letter-spacing: .08em; }
.brand-lockup span:not(.brand-mark) { margin-top: 4px; color: rgba(255,255,255,.62); font-size: 12px; letter-spacing: .28em; }

.trust-copy {
  margin: auto 0;
  max-width: 590px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: #d7aeb2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.trust-copy h1 {
  margin: 22px 0 24px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.trust-copy p {
  max-width: 500px;
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 16px;
  line-height: 1.8;
}

.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--navy-line);
  position: relative;
  z-index: 1;
}

.trust-list li {
  min-width: 0;
  padding: 21px 16px 0 0;
  display: flex;
  gap: 11px;
}

.trust-list li > span { color: #c78c92; font: 700 11px/1.4 ui-monospace, monospace; }
.trust-list div { display: flex; flex-direction: column; gap: 5px; }
.trust-list strong { font-size: 13px; }
.trust-list small { color: rgba(255,255,255,.52); font-size: 11px; line-height: 1.5; }

.login-panel {
  min-height: 100vh;
  padding: clamp(28px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login-card { width: min(100%, 470px); }
.login-card header { margin-bottom: 34px; }
.mobile-brand { display: none; }
.section-kicker { margin: 0 0 11px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .15em; }

.login-card h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(32px, 4vw, 45px);
  font-weight: 500;
  letter-spacing: -.025em;
}

.login-card header > p:last-child { margin: 13px 0 0; color: var(--ink-soft); font-size: 14px; }

#login-form { display: flex; flex-direction: column; }
#login-form > label { margin: 0 0 9px; font-size: 13px; font-weight: 700; }
#login-form > label:not(:first-child) { margin-top: 22px; }

input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #bbc3c2;
  border-radius: 4px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

input:hover { border-color: #889696; }
input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(143,31,43,.1); }
input:disabled { color: #778083; background: #e9e9e5; }

.password-field { position: relative; }
.password-field input { padding-right: 64px; }
.password-field button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  padding: 8px;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.login-message {
  min-height: 20px;
  margin: 14px 0 9px;
  color: var(--error);
  font-size: 13px;
  line-height: 1.55;
}

.login-message[data-tone="success"] { color: #287153; }
.login-message[data-tone="notice"] { color: #766112; }

.primary-action {
  height: 54px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--accent);
  font-weight: 750;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.primary-action:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.primary-action:disabled { cursor: wait; opacity: .62; }
.primary-action span:last-child { font-size: 21px; font-weight: 400; }

.security-note {
  margin-top: 23px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.security-note svg { width: 25px; flex: 0 0 auto; fill: none; stroke: #596c70; stroke-width: 1.7; }
.security-note p { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.security-note strong { font-size: 12px; }
.security-note span { color: var(--ink-soft); font-size: 11px; }

.sso-entry {
  margin-top: 21px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-soft);
  font-size: 12px;
}

.sso-entry a { color: var(--accent); font-weight: 750; text-decoration: none; }
.sso-entry a:hover { text-decoration: underline; }
.login-panel footer { width: min(100%, 470px); margin-top: 54px; color: #7b8586; font-size: 11px; text-align: center; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: minmax(300px, .75fr) minmax(430px, 1fr); }
  .trust-list { grid-template-columns: 1fr; gap: 10px; }
  .trust-list li { padding-top: 13px; }
  .trust-list li:not(:first-child) { display: none; }
}

@media (max-width: 720px) {
  .login-shell { display: block; min-height: 100dvh; }
  .trust-panel { display: none; }
  .login-panel { min-height: 100dvh; padding: 30px 22px 24px; justify-content: center; }
  .login-card { max-width: 440px; }
  .mobile-brand { display: block; margin-bottom: 46px; color: var(--navy); font-size: 14px; font-weight: 800; letter-spacing: .08em; }
  .login-card header { margin-bottom: 28px; }
  .login-card h2 { font-size: 35px; }
  .sso-entry { flex-direction: column; gap: 8px; }
  .login-panel footer { margin-top: 38px; }
}

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