:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --auth-blue: #2767d7;
  --auth-ink: #172c49;
  --auth-muted: #687b96;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--auth-ink); background: #edf4ff; }
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(370px, 0.75fr);
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 16% 78%, rgba(176, 208, 246, 0.38), transparent 42%),
    linear-gradient(135deg, #f4f8ff 0%, #e8f1fd 52%, #e3edfb 100%);
}
.auth-brand {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}
.auth-brand-copy {
  position: absolute;
  z-index: 2;
  top: clamp(42px, 8vh, 86px);
  left: clamp(28px, 5vw, 74px);
  right: 24px;
  pointer-events: none;
}
.auth-brand-copy h1 { margin: 0 0 8px; font-size: clamp(48px, 6vw, 76px); line-height: 1; letter-spacing: -0.055em; font-weight: 680; }
.auth-brand-copy p { margin: 0; color: var(--auth-muted); font-size: clamp(16px, 1.8vw, 22px); letter-spacing: 0.02em; }
.auth-scene-wrap {
  position: absolute;
  inset: 20% 3% 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.auth-scene {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.9;
  -webkit-mask: url('/zivis-auth/tea-feather.svg') center / 100% 100% no-repeat;
  mask: url('/zivis-auth/tea-feather.svg') center / 100% 100% no-repeat;
}
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 36px clamp(24px, 4vw, 62px); }
.auth-card {
  width: min(100%, 410px);
  padding: clamp(26px, 3.5vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--zivis-radius-panel);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 48px rgba(47, 83, 132, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.auth-card-heading { margin-bottom: 24px; }
.auth-card h2 { margin: 0; font-size: 27px; letter-spacing: -0.03em; font-weight: 650; }
.auth-role-group { margin-bottom: 12px; }
.auth-role-group > p { margin: 0 0 9px; color: var(--auth-muted); font-size: 13px; }
.auth-role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-role-option {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #ccd9eb;
  border-radius: var(--zivis-radius-control);
  background: rgba(255, 255, 255, 0.58);
  color: var(--auth-ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.auth-role-option:hover { border-color: #91add3; background: rgba(255, 255, 255, 0.82); }
.auth-role-option.is-selected { border-color: var(--auth-blue); background: #e9f1ff; color: #1c56b5; box-shadow: inset 0 0 0 1px rgba(39, 103, 215, 0.08); }
.auth-role-option:focus-visible { outline: 3px solid rgba(39, 103, 215, 0.24); outline-offset: 2px; }
.auth-role-option:disabled { cursor: not-allowed; opacity: 0.55; }
#zivis-login-form[hidden] { display: none; }
.auth-field { margin-bottom: 17px; }
.auth-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.auth-field input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  border: 1px solid #cbd9ed;
  border-radius: var(--zivis-radius-control);
  outline: none;
  background: rgba(255, 255, 255, 0.76);
  color: var(--auth-ink);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.auth-field input:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(39, 103, 215, 0.12); }
.auth-field input:disabled { cursor: not-allowed; opacity: 0.58; }
.auth-error { min-height: 24px; margin: 2px 0 10px; color: #b32835; font-size: 13px; line-height: 1.65; }
.auth-error:empty { display: none; }
.auth-submit {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: var(--zivis-radius-control);
  background: #2868d3;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(39, 103, 215, 0.18);
}
.auth-submit:hover { background: #225fc4; }
.auth-submit:focus-visible { outline: 3px solid rgba(39, 103, 215, 0.28); outline-offset: 3px; }
.auth-submit:disabled { cursor: wait; opacity: 0.64; }
@media (max-width: 820px) {
  .auth-shell { display: block; min-height: 100dvh; overflow-y: auto; }
  .auth-brand { min-height: 0; padding-top: 30px; }
  .auth-brand-copy { position: static; padding: 0 25px; }
  .auth-brand-copy h1 { font-size: 44px; }
  .auth-brand-copy p { font-size: 16px; }
  .auth-scene-wrap { position: static; margin: 12px 6px 4px; }
  .auth-panel { padding: 0 16px 30px; }
  .auth-card { width: min(100%, 480px); padding: 25px 22px; border-radius: var(--zivis-radius-panel); }
}
@media (max-width: 390px) {
  .auth-card-heading { margin-bottom: 20px; }
  .auth-card h2 { font-size: 24px; }
  .auth-role-option { padding: 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
