:root {
  --ink: #17202a;
  --muted: #667085;
  --line: #dce1e7;
  --soft: #f3f5f7;
  --green: #15a66a;
  --green-dark: #0b7e4d;
  --blue: #2563eb;
  --danger: #c73b45;
  --white: #ffffff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #eef1f4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
  background: var(--white);
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(36px, 6vw, 86px);
  overflow: hidden;
  color: #f8fafc;
  background:
    linear-gradient(145deg, rgba(10, 79, 57, 0.96), rgba(19, 50, 74, 0.96)),
    #12384a;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: auto -12% -16% 18%;
  height: 42%;
  border-top: 1px solid rgba(255,255,255,.14);
  transform: skewY(-9deg);
  background: rgba(255,255,255,.035);
  pointer-events: none;
}

.auth-brand img {
  position: relative;
  z-index: 1;
  width: min(238px, 68%);
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

.auth-brand > div { position: relative; z-index: 1; max-width: 560px; }
.auth-brand > div > span { display: block; margin-bottom: 14px; color: #8ce0ba; font-size: 12px; font-weight: 700; letter-spacing: 0; }
.auth-brand h1 { margin: 0; max-width: 520px; font-size: clamp(34px, 4.2vw, 62px); line-height: 1.08; letter-spacing: 0; }
.auth-brand p { margin: 22px 0 0; max-width: 460px; color: rgba(248,250,252,.72); font-size: 16px; line-height: 1.8; }

.auth-signals { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 48px 0 0; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.13); }
.auth-signals div { min-width: 0; padding: 18px 16px; background: rgba(10,38,46,.58); }
.auth-signals dt { color: rgba(248,250,252,.55); font-size: 11px; }
.auth-signals dd { margin: 7px 0 0; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }

.auth-panel { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: #f7f8fa; }
.auth-panel-inner { width: min(420px, 100%); }
.auth-head { margin-bottom: 26px; }
.auth-kicker { color: var(--green-dark); font-size: 11px; font-weight: 750; }
.auth-head h2 { margin: 9px 0 0; font-size: 28px; letter-spacing: 0; }
.auth-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 44px; padding: 3px; margin-bottom: 22px; border: 1px solid var(--line); background: #eef1f4; }
.auth-tab { border: 0; color: var(--muted); background: transparent; font-size: 14px; font-weight: 650; }
.auth-tab.is-active { color: var(--ink); background: var(--white); box-shadow: 0 1px 4px rgba(16,24,40,.08); }

.auth-message { margin-bottom: 16px; padding: 11px 13px; border-left: 3px solid var(--blue); color: #24436f; background: #eef5ff; font-size: 13px; line-height: 1.55; }
.auth-message.is-error { border-left-color: var(--danger); color: #8b2630; background: #fff1f2; }
.auth-message.is-success { border-left-color: var(--green); color: #0e6d46; background: #edfbf4; }

.auth-form { display: grid; gap: 16px; }
.auth-field { display: grid; gap: 7px; }
.auth-field > span { font-size: 12px; font-weight: 650; color: #344054; }
.auth-field input { width: 100%; height: 46px; border: 1px solid #cfd6de; border-radius: 6px; padding: 0 13px; outline: none; color: var(--ink); background: var(--white); transition: border-color .18s ease, box-shadow .18s ease; }
.auth-field input:focus { border-color: #3b8d6d; box-shadow: 0 0 0 3px rgba(21,166,106,.11); }
.auth-field input::placeholder { color: #98a2b3; }

.password-field { position: relative; display: grid; grid-template-columns: 1fr auto; }
.password-field input { grid-column: 1 / -1; padding-right: 48px; }
.password-toggle { position: absolute; top: 5px; right: 5px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 4px; color: #667085; background: transparent; }
.password-toggle:hover { color: var(--ink); background: var(--soft); }
.password-toggle svg { width: 17px; height: 17px; }
.auth-primary { height: 46px; border-radius: 6px; font-weight: 700; }
.auth-primary { border: 1px solid var(--green-dark); color: var(--white); background: var(--green-dark); box-shadow: 0 5px 14px rgba(11,126,77,.16); }
.auth-primary:hover { background: #086942; }
.auth-primary:disabled { cursor: not-allowed; opacity: .55; }

.turnstile-slot { min-height: 8px; overflow: hidden; }
.auth-foot { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.auth-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(21,166,106,.11); }

@media (max-width: 880px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; padding: 26px 24px; }
  .auth-brand img { width: 178px; }
  .auth-brand > div { margin-top: 54px; }
  .auth-brand h1 { font-size: 32px; }
  .auth-brand p { margin-top: 14px; }
  .auth-signals { margin-top: 34px; }
  .auth-panel { min-height: auto; padding: 42px 22px 56px; }
}

@media (max-width: 560px) {
  .auth-brand > div { margin-top: 38px; }
  .auth-signals { grid-template-columns: 1fr; }
  .auth-signals div { padding: 12px 14px; }
  .auth-panel { padding-inline: 18px; }
}

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