:root { font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { background: var(--ui-bg); color: var(--ui-text); }
button, input { font: inherit; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(390px, 46%) minmax(460px, 54%);
  width: min(1380px, calc(100vw - 40px));
  min-height: min(820px, calc(100vh - 40px));
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid #202a31;
  border-radius: 18px;
  background: #0c1115;
  box-shadow: var(--ui-shadow);
}

.auth-panel { display: flex; flex-direction: column; padding: clamp(32px, 5vw, 72px); }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; color: inherit; text-decoration: none; }
.auth-brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #34424b; border-radius: 11px; background: #151c21; }
.auth-brand img { width: 28px; height: 28px; object-fit: contain; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 14px; letter-spacing: .02em; }
.auth-brand small { margin-top: 3px; color: #718089; font: 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; text-transform: uppercase; }

.auth-copy { margin: auto 0 36px; }
.auth-kicker { margin: 0 0 18px; color: var(--ui-accent); font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; }
.auth-copy h1 { margin: 0; font-size: clamp(42px, 5vw, 68px); font-weight: 610; line-height: .98; letter-spacing: -.055em; }
.auth-copy > p:last-child { max-width: 360px; margin: 24px 0 0; color: var(--ui-muted); font-size: 14px; line-height: 1.75; }

.auth-form { display: grid; gap: 18px; }
.password-toggle { border: 0; padding: 5px 0 5px 8px; color: #76868f; background: transparent; font-size: 11px; cursor: pointer; }
.password-toggle:hover { color: var(--ui-accent); }

.ui-button-primary { margin-top: 2px; }
.auth-error { margin: -4px 0 0; border-left: 2px solid var(--ui-danger); padding: 7px 10px; color: #f2a1a6; background: rgba(241, 139, 145, .06); font-size: 12px; line-height: 1.5; }

.auth-panel footer { display: flex; align-items: center; gap: 8px; margin-top: 30px; color: #607079; font-size: 10px; letter-spacing: .05em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ui-accent); box-shadow: 0 0 0 4px rgba(100, 210, 202, .08); }

.auth-visual { position: relative; min-height: 700px; overflow: hidden; border-left: 1px solid #202a31; background: #0b1014; isolation: isolate; }
.visual-grid { position: absolute; inset: 0; opacity: .74; background: linear-gradient(rgba(117, 144, 157, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(117, 144, 157, .08) 1px, transparent 1px); background-size: 54px 54px; }
.visual-grid::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 58% 45%, rgba(84, 190, 183, .13), transparent 34%), linear-gradient(145deg, transparent 45%, rgba(255,255,255,.025)); }
.visual-caption { position: absolute; top: 28px; left: 30px; right: 30px; display: flex; justify-content: space-between; color: #63737c; font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.frame { position: absolute; border: 1px solid rgba(124, 151, 163, .28); background: rgba(13, 20, 24, .54); backdrop-filter: blur(8px); box-shadow: 0 26px 65px rgba(0,0,0,.25); }
.frame span { position: absolute; left: 0; bottom: -24px; color: #64747d; font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.frame-primary { left: 15%; top: 18%; width: 58%; aspect-ratio: 4 / 5; }
.frame-primary::before, .frame-primary::after { content: ""; position: absolute; background: rgba(100,210,202,.32); }
.frame-primary::before { left: 50%; top: -8px; bottom: -8px; width: 1px; }
.frame-primary::after { top: 52%; left: -8px; right: -8px; height: 1px; }
.frame-subject { position: absolute; left: 28%; top: 17%; width: 44%; height: 66%; border-radius: 48% 48% 32% 32%; background: linear-gradient(155deg, rgba(126, 194, 188, .34), rgba(51, 78, 84, .09) 64%); filter: blur(.2px); clip-path: polygon(38% 0, 62% 0, 70% 16%, 86% 35%, 76% 100%, 24% 100%, 14% 35%, 30% 16%); }
.frame-detail { right: 7%; top: 25%; width: 24%; aspect-ratio: 1; transform: translateY(10px); }
.frame-detail div { position: absolute; inset: 22%; border: 1px solid rgba(100,210,202,.42); border-radius: 50%; box-shadow: inset 0 0 26px rgba(100,210,202,.12); }
.frame-light { right: 12%; bottom: 14%; width: 33%; aspect-ratio: 16 / 10; }
.frame-light div { position: absolute; inset: 18%; background: linear-gradient(112deg, transparent 25%, rgba(117,218,209,.23) 48%, transparent 65%); transform: skewX(-12deg); }
.visual-axis { position: absolute; z-index: -1; background: rgba(100,210,202,.15); }
.axis-x { left: 0; right: 0; top: 52%; height: 1px; }
.axis-y { top: 0; bottom: 0; left: 57%; width: 1px; }
.visual-note { position: absolute; right: 8%; bottom: 6%; margin: 0; color: #9dacb2; font-size: clamp(16px, 1.6vw, 23px); font-weight: 450; line-height: 1.55; letter-spacing: -.02em; }

@media (prefers-reduced-motion: no-preference) {
  .frame-primary { animation: reveal 700ms cubic-bezier(.22,1,.36,1) both; }
  .frame-detail { animation: reveal 700ms 100ms cubic-bezier(.22,1,.36,1) both; }
  .frame-light { animation: reveal 700ms 180ms cubic-bezier(.22,1,.36,1) both; }
  @keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
}

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; width: min(560px, calc(100vw - 24px)); min-height: calc(100vh - 24px); margin: 12px auto; }
  .auth-panel { min-height: calc(100vh - 24px); padding: 28px clamp(22px, 7vw, 48px); }
  .auth-copy { margin-top: auto; }
  .auth-visual { display: none; }
}

@media (max-height: 720px) and (min-width: 881px) {
  .auth-shell { min-height: calc(100vh - 24px); margin: 12px auto; }
  .auth-panel { padding-block: 28px; }
  .auth-copy { margin-bottom: 24px; }
  .auth-copy h1 { font-size: 48px; }
}
