:root {
  --red: #e60012;
  --red-dark: #bd0010;
  --yellow: #ffd838;
  --ink: #201b1b;
  --muted: #756b6b;
  --line: #e8e1de;
  --cream: #fffaf4;
  --white: #fff;
  --shadow: 0 28px 80px rgba(68, 22, 22, .14);
  --font: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(390px, .88fr) minmax(520px, 1.12fr); }
.auth-visual { min-height: 100vh; position: relative; padding: 44px clamp(38px, 5vw, 78px); color: #fff; background: linear-gradient(145deg, #f21325 0%, #d90012 60%, #b6000f 100%); overflow: hidden; }
.auth-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 25% 15%, rgba(255,255,255,.15), transparent 28%), linear-gradient(transparent 97%, rgba(255,255,255,.04) 97%); background-size: auto, 100% 44px; }
.auth-brand { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 13px; }
.auth-brand img { width: 88px; height: 53px; border: 1px solid rgba(255,255,255,.45); border-radius: 9px; object-fit: cover; box-shadow: 0 8px 25px rgba(80,0,0,.2); }
.auth-brand span { display: flex; flex-direction: column; line-height: 1; }
.auth-brand strong { font-size: 19px; letter-spacing: .04em; }
.auth-brand small { margin-top: 7px; color: rgba(255,255,255,.7); font-size: 9px; }
.visual-copy { position: relative; z-index: 2; margin-top: clamp(85px, 15vh, 150px); max-width: 560px; }
.visual-kicker, .account-kicker { font-size: 10px; font-weight: 800; letter-spacing: .24em; color: var(--yellow); }
.visual-copy h1 { margin: 16px 0 20px; font-size: clamp(42px, 4.3vw, 66px); line-height: 1.18; letter-spacing: -.06em; }
.visual-copy p { max-width: 440px; margin: 0; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.9; }
.visual-ip { width: 225px; height: 240px; position: absolute; right: 3%; bottom: 0; z-index: 2; object-fit: cover; object-position: center bottom; border-radius: 115px 115px 0 0; box-shadow: 0 -10px 45px rgba(109,0,9,.26); }
.visual-ring { position: absolute; border: 1px dashed rgba(255,255,255,.2); border-radius: 50%; }
.visual-ring--one { width: 410px; height: 410px; right: -130px; bottom: -80px; }
.visual-ring--two { width: 270px; height: 270px; right: -58px; bottom: -8px; }

.auth-panel { min-height: 100vh; min-height: 100dvh; position: relative; display: flex; align-items: center; justify-content: center; padding: 75px clamp(32px, 6vw, 100px) 55px; }
.back-home { position: absolute; top: 28px; right: 35px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; transition: .2s; }
.back-home span { font-size: 18px; }
.back-home:hover { color: var(--red); }
.auth-card, .account-card { width: min(440px, 100%); }
.auth-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; margin-bottom: 34px; border-radius: 14px; background: #f1ebe7; }
.auth-tabs button { height: 43px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; transition: .25s; }
.auth-tabs button.active { color: var(--red); background: #fff; box-shadow: 0 6px 18px rgba(55,30,20,.09); }
.form-view { animation: viewIn .32s ease both; }
.form-view[hidden] { display: none; }
.form-heading { margin-bottom: 28px; }
.form-heading > span { color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .22em; }
.form-heading h2 { margin: 7px 0 4px; font-size: 31px; letter-spacing: -.04em; }
.form-heading p { margin: 0; color: var(--muted); font-size: 12px; }
form > label { display: block; margin: 0 0 16px; font-size: 11px; font-weight: 700; }
.input-wrap { height: 49px; display: flex; align-items: center; margin-top: 7px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: .2s; }
.input-wrap:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(230,0,18,.07); }
.input-wrap i { flex: 0 0 39px; color: #a69a96; text-align: center; font-size: 10px; font-style: normal; }
.input-wrap input { width: 100%; height: 100%; min-width: 0; padding: 0 11px 0 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.input-wrap input::placeholder { color: #b9afac; }
.password-toggle { flex: 0 0 42px; height: 100%; border: 0; background: transparent; color: #aaa09d; font-size: 13px; }
.captcha-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 124px; gap: 10px; align-items: end; }
.captcha-row .input-wrap { min-width: 0; margin-top: 7px; }
.captcha-image { height: 49px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.captcha-image img { width: 100%; height: 100%; display: block; }
.form-alert { min-height: 18px; margin-top: -3px; color: #c53226; font-size: 11px; line-height: 1.5; }
.form-alert.success { color: #238255; }
.submit-button { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 0; border-radius: 999px; color: #fff; background: var(--red); box-shadow: 0 12px 28px rgba(230,0,18,.22); font-size: 13px; font-weight: 700; transition: .22s; }
.submit-button:hover { transform: translateY(-2px); background: var(--red-dark); box-shadow: 0 16px 34px rgba(230,0,18,.27); }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; }
.submit-button span { font-size: 18px; }
.switch-tip { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.switch-tip button { padding: 0; border: 0; background: none; color: var(--red); font-weight: 700; }
.security-note { position: absolute; left: 0; right: 0; bottom: 19px; color: #9b918e; text-align: center; font-size: 9px; }
.security-note span { color: #2b9365; }

.account-card { padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); text-align: center; animation: viewIn .32s ease both; }
.account-avatar { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 20px; border: 6px solid #ffe4e5; border-radius: 50%; color: #fff; background: var(--red); font-size: 28px; font-weight: 800; }
.account-card .account-kicker { color: var(--red); }
.account-card h2 { margin: 9px 0 7px; font-size: 25px; }
.account-card > p { margin: 0 0 28px; color: var(--muted); font-size: 12px; }
.account-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; padding: 15px; border-radius: 12px; background: #faf5f1; font-size: 11px; }
.account-meta strong { color: #25835c; }
.account-meta i { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #37b47d; }
.logout-button { margin-top: 15px; border: 0; color: var(--muted); background: none; font-size: 11px; }
.logout-button:hover { color: var(--red); }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { min-height: 255px; padding: 25px 28px; }
  .visual-copy { margin-top: 40px; }
  .visual-copy h1 { margin: 10px 0; font-size: 34px; }
  .visual-copy p { display: none; }
  .visual-ip { width: 150px; height: 165px; right: 4%; }
  .auth-panel { min-width: 0; min-height: calc(100dvh - 255px); align-items: flex-start; padding: 64px 24px 58px; }
  .back-home { top: 22px; right: 24px; }
}
@media (max-width: 520px) {
  .auth-visual { min-height: 220px; padding: 21px 20px; }
  .auth-brand img { width: 68px; height: 42px; }
  .auth-brand strong { font-size: 15px; }
  .visual-copy { margin-top: 30px; }
  .visual-copy h1 { max-width: 250px; font-size: 27px; }
  .visual-ip { width: 115px; height: 130px; }
  .auth-panel { min-height: calc(100dvh - 220px); padding: 58px 18px 55px; }
  .auth-tabs { margin-bottom: 27px; }
  .form-heading h2 { font-size: 27px; }
  .captcha-row { grid-template-columns: minmax(0, 1fr) 112px; }
  .security-note { padding-inline: 12px; }
  .account-card { padding: 30px 22px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms!important; transition-duration: .01ms!important; } }
