:root {
  --ink: #1b1228;
  --ink-soft: #4a3d55;
  --muted: #7a6d86;
  --line: rgba(120, 40, 90, 0.12);
  --paper: #fff7f2;
  --pink: #ff3d7a;
  --pink-deep: #e21878;
  --violet: #7c3aed;
  --sun: #ffe14a;
  --mark: linear-gradient(145deg, #8b5cf6, #ff2f86);
  --text-grad: linear-gradient(100deg, #ff4b86 0%, #f42586 55%, #c026d3);
  --shadow: 0 18px 50px rgba(120, 30, 80, 0.12);
}
* { box-sizing: border-box; }
body.auth {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(255, 120, 170, 0.28), transparent 60%),
    radial-gradient(800px 500px at 100% 8%, rgba(255, 196, 90, 0.28), transparent 55%),
    radial-gradient(700px 500px at 60% 90%, rgba(150, 90, 255, 0.10), transparent 60%),
    var(--paper);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.auth-bar {
  width: min(1250px, calc(100% - 32px));
  margin: 14px auto 0;
  height: 64px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(120, 30, 80, 0.08);
  backdrop-filter: blur(10px);
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  text-decoration: none;
  line-height: 0;
}
.auth-logo .brand-logo { height: 32px; width: auto; max-width: 180px; object-fit: contain; }
.auth-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
}
.auth-mark .brand-mark-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  transition: background 0.15s;
}
.auth-back:hover { background: #f4f2f6; }

.auth-stage {
  flex: 1;
  width: min(1250px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 440px);
  gap: 56px;
  align-items: center;
}

.auth-intro { min-width: 0; }
.auth-tag {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  box-shadow: 0 8px 18px rgba(200, 160, 0, 0.18);
}
.auth-intro h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.3rem, 4.4vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 800;
}
.auth-grad {
  display: inline-block;
  background: var(--text-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-sub { margin: 0 0 22px; max-width: 480px; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; }
.auth-chips { list-style: none; margin: 0 0 34px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.auth-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(120, 30, 80, 0.06);
}
.auth-chips svg { color: var(--pink-deep); }

.auth-visual { position: relative; max-width: 470px; padding: 18px 0 30px; }
.auth-preview {
  position: relative;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}
.auth-preview-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.auth-preview-head strong { font-size: 0.92rem; }
.auth-preview-head em {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8f9ef;
  color: #0f7a4a;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
}
.auth-preview-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mark); }
.auth-preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.auth-preview-stats div { padding: 12px; border-radius: 14px; background: #fff6f9; }
.auth-preview-stats span { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.auth-preview-stats strong { display: block; margin-top: 2px; font-size: 1.25rem; letter-spacing: -0.03em; }
.auth-spark { display: block; width: 100%; height: 80px; margin-top: 14px; }
.auth-sticker { position: absolute; z-index: 2; }
.auth-sticker-sun {
  top: -16px;
  right: 90px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--sun);
  font-weight: 800;
  font-size: 0.9rem;
  transform: rotate(6deg);
  box-shadow: 0 12px 24px rgba(200, 160, 0, 0.22);
}
.auth-sticker-sun::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #16a34a;
  vertical-align: 1px;
}
.auth-sticker-dark {
  right: -34px;
  bottom: -6px;
  width: 200px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #1b1228;
  color: #fff;
  box-shadow: 0 16px 30px rgba(27, 18, 40, 0.3);
  transform: rotate(-3deg);
}
.auth-sticker-dark strong { display: block; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.auth-sticker-dark span { display: block; margin-top: 4px; color: rgba(255,255,255,0.65); font-size: 0.8rem; line-height: 1.4; }

.auth-panel {
  position: relative;
  padding: 34px 32px 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(120, 30, 80, 0.14);
  overflow: hidden;
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--text-grad);
}
.auth-icon {
  width: 52px; height: 52px; margin-bottom: 18px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--mark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 47, 134, 0.28);
}
.auth-panel h2 { margin: 0 0 8px; font-size: 1.85rem; letter-spacing: -0.045em; }
.auth-lead { margin: 0 0 24px; color: var(--muted); line-height: 1.55; font-size: 0.96rem; }
.auth-lead strong { color: var(--ink); }
.auth-form { display: grid; gap: 8px; }
.auth-form label { font-size: 0.86rem; font-weight: 700; }
.auth-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1.5px solid #eadfe6;
  border-radius: 14px;
  background: #fffbf9;
  color: #b3a6bd;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-input:focus-within { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 61, 122, 0.12); color: var(--pink-deep); background: #fff; }
.auth-input.has-error { border-color: #e5484d; }
.auth-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 15px 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
}
.auth-input input::placeholder { color: #b3a6bd; }
.auth-hint { margin: 2px 0 10px; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.auth-hint strong { color: var(--ink); font-weight: 700; }
.auth-center { text-align: center; }
.auth-error {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f3;
  color: #c0204f;
  font-size: 0.86rem;
  font-weight: 700;
}
.auth-note { margin: 0 0 18px; padding: 11px 14px; border-radius: 12px; font-size: 0.88rem; font-weight: 700; }
.auth-note.is-ok { background: #e8f9ef; color: #0f7a4a; }
.auth-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 15px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(27, 18, 40, 0.22);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-btn:hover { background: #000; transform: translateY(-1px); box-shadow: 0 16px 32px rgba(27, 18, 40, 0.3); }
.auth-btn:disabled { cursor: wait; transform: none; }
.auth-btn.is-busy span, .auth-btn.is-busy svg { opacity: 0; }
.auth-btn.is-busy::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-btn-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.auth-btn-line:hover { background: #fff0f6; color: var(--pink-deep); box-shadow: inset 0 0 0 1.5px var(--pink-deep); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 8px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #f0e6ec; }

.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.otp input {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  border: 1.5px solid #eadfe6;
  border-radius: 14px;
  text-align: center;
  font: inherit;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  background: #fffbf9;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.otp input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 61, 122, 0.12); background: #fff; }
.otp input.is-filled { border-color: #ffb3cb; background: #fff0f6; color: var(--pink-deep); }
.otp.has-error input { border-color: #f1a3a9; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 8px; }
.auth-row form { margin: 0; }
.auth-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--pink-deep);
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}
.auth-link:disabled { color: #b3a6bd; cursor: default; }
.auth-link-muted { color: var(--muted); }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.auth-label-row label { font-size: 0.86rem; font-weight: 700; }
.auth-label-row a, .auth-text-link { color: var(--pink-deep); font-size: 0.84rem; font-weight: 800; text-decoration: none; }
.auth-label-row a:hover, .auth-text-link:hover { text-decoration: underline; }
.auth-form > label:not(:first-of-type) { margin-top: 8px; }
.auth-gap { margin-top: 20px; }
.auth-eye {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b3a6bd;
  cursor: pointer;
}
.auth-eye:hover, .auth-eye.is-on { color: var(--pink-deep); background: #fff0f6; }

.captcha { display: grid; grid-template-columns: 160px 46px minmax(0, 1fr); gap: 8px; align-items: stretch; }
.captcha img {
  display: block;
  width: 160px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid #eadfe6;
  background: #f6f3fb;
  user-select: none;
  -webkit-user-drag: none;
}
.captcha-refresh {
  display: grid;
  place-items: center;
  border: 1.5px solid #eadfe6;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.captcha-refresh:hover { border-color: var(--pink); color: var(--pink-deep); }
.captcha-refresh.is-spin svg { animation: auth-spin 0.5s ease; }
.captcha input {
  min-width: 0;
  padding: 0 14px;
  border: 1.5px solid #eadfe6;
  border-radius: 12px;
  background: #fffbf9;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.captcha input::placeholder { letter-spacing: 0; font-weight: 500; color: #b3a6bd; }
.captcha input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 61, 122, 0.12); background: #fff; }

.auth-foot { padding: 0 16px 22px; text-align: center; color: var(--muted); font-size: 0.8rem; }
.auth-foot a { color: inherit; }

@media (max-width: 1080px) {
  .auth-stage { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 36px; }
  .auth-sticker-dark { right: 0; }
}
@media (max-width: 880px) {
  .auth-stage { grid-template-columns: 1fr; gap: 24px; padding: 26px 0 32px; max-width: 520px; }
  .auth-intro { text-align: center; }
  .auth-intro h1 { font-size: 2.2rem; margin-top: 14px; }
  .auth-sub { margin-left: auto; margin-right: auto; }
  .auth-chips { justify-content: center; margin-bottom: 0; }
  .auth-visual { display: none; }
}
@media (max-width: 480px) {
  .auth-bar { height: 58px; }
  .auth-back { padding: 7px 11px; font-size: 0.8rem; }
  .auth-panel { padding: 28px 20px 24px; border-radius: 22px; }
  .auth-intro h1 { font-size: 1.9rem; }
  .auth-sub { font-size: 0.95rem; }
  .otp { gap: 6px; }
  .otp input { font-size: 1.3rem; border-radius: 11px; }
  .captcha { grid-template-columns: 1fr 46px; }
  .captcha img { width: 100%; }
  .captcha input { grid-column: 1 / -1; height: 50px; }
}
