:root {
  --pink: #f3317c;
  --pink-hover: #d91f67;
  --pink-soft: #fff2f7;
  --pink-line: #f6c9da;
  --ink: #090909;
  --muted: #6a6669;
  --line: #dedadd;
  --danger: #b42318;
  --success: #19733a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }

.auth-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 38px 20px 116px;
  overflow: hidden;
  isolation: isolate;
  background-color: #fff;
  background-image: url("./assets/generated/mimo-auth-background.png");
  background-position: center;
  background-size: cover;
}
.auth-page::after {
  display: none;
}

.auth-shell { width: min(470px, 100%); }
.brand {
  display: block;
  width: min(300px, 72vw);
  margin: 0 auto 24px;
}
.brand img { display: block; width: 100%; height: auto; }

.auth-panel {
  padding: 32px 36px 28px;
  border: 1px solid var(--pink-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 48px rgba(38, 20, 27, .08);
}
.auth-heading { margin-bottom: 26px; text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: .82rem;
  font-weight: 900;
}
h1 { margin: 0; font-size: clamp(2rem, 7vw, 2.65rem); line-height: 1.12; letter-spacing: 0; }
.auth-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: .96rem; line-height: 1.55; }

#authForm { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .93rem; font-weight: 850; }
.field input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  transition: border-color 160ms, box-shadow 160ms;
}
.field input::placeholder { color: #aaa4a8; }
.field input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(243, 49, 124, .11); }
.field.invalid input { border-color: var(--danger); }
.field-error { min-height: 1em; margin: 0; color: var(--danger); font-size: .78rem; line-height: 1; }
.profile-fields { display: grid; gap: 10px; padding-top: 4px; border-top: 1px solid var(--line); }
.profile-fields-title { margin: 0; font-size: .93rem; font-weight: 850; }
.profile-fields-note { margin: -2px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.profile-grid { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 10px; }
.profile-grid .field { gap: 6px; }
.profile-grid .field label { font-size: .78rem; }
.profile-grid input, .profile-grid select { height: 46px; padding: 0 10px; }
.password-control { position: relative; }
.password-control input { padding-right: 56px; }
.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
}
.password-toggle:hover { background: var(--pink-soft); }
.password-toggle:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.eye-icon { position: relative; width: 21px; height: 14px; border: 2px solid var(--ink); border-radius: 50% / 60%; }
.eye-icon::after { position: absolute; top: 3px; left: 7px; width: 4px; height: 4px; content: ""; border-radius: 50%; background: var(--ink); }
.password-toggle[aria-pressed="true"] .eye-icon::before { position: absolute; top: 5px; left: -3px; width: 25px; height: 2px; content: ""; background: var(--ink); transform: rotate(-38deg); }

.form-message { min-height: 18px; margin: -4px 0 -2px; font-size: .84rem; font-weight: 750; text-align: center; }
.form-message.success { color: var(--success); }
.form-message.error { color: var(--danger); }
.submit-button {
  width: 100%;
  height: 56px;
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--pink);
  box-shadow: 0 5px 0 var(--ink);
  font-weight: 900;
  transition: background 160ms, transform 160ms, box-shadow 160ms;
}
.submit-button:hover { background: var(--pink-hover); }
.submit-button:disabled { cursor: wait; opacity: .72; }
.submit-button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.submit-button:focus-visible { outline: 3px solid rgba(243, 49, 124, .28); outline-offset: 3px; }

.mode-switch { margin: 25px 0 0; color: var(--muted); font-size: .9rem; text-align: center; }
.mode-switch button { padding: 4px; color: var(--pink); border: 0; background: transparent; font-weight: 850; }
.mode-switch button:hover { text-decoration: underline; text-underline-offset: 3px; }

.doodle { display: none; }
.heart { color: var(--pink); font-size: 4.6rem; }
.heart-left { top: 13%; left: 6%; transform: rotate(-18deg); }
.heart-right { top: 20%; right: 7%; transform: rotate(18deg); }
.sparkle { font-size: 2.3rem; }
.sparkle-left { bottom: 25%; left: 8%; color: var(--pink); }
.sparkle-right { top: 12%; right: 18%; color: var(--ink); }

.cat-peek {
  display: none;
}
.cat-ear { position: absolute; top: -27px; width: 78px; height: 82px; background: var(--ink); transform: rotate(45deg); }
.cat-ear::after { position: absolute; inset: 15px; content: ""; background: var(--pink); }
.cat-ear-left { left: 18px; }
.cat-ear-right { right: 18px; }
.cat-eye { position: absolute; top: 48px; width: 48px; height: 48px; border: 9px solid #fff; border-radius: 50%; }
.cat-eye::after { position: absolute; top: 10px; left: 10px; width: 10px; height: 10px; content: ""; border-radius: 50%; background: #fff; }
.cat-eye-left { left: 46px; }
.cat-eye-right { right: 46px; }
.cat-nose { position: absolute; top: 105px; left: 50%; width: 16px; height: 12px; border-radius: 50% 50% 70% 70%; background: var(--pink); transform: translateX(-50%); }

@media (max-width: 620px) {
  .auth-page {
    align-items: start;
    padding: 28px 14px 98px;
    overflow-y: auto;
    background-image: url("./assets/generated/mimo-auth-background-mobile.png");
    background-position: center top;
  }
  .brand { width: 232px; margin-bottom: 32px; }
  .auth-panel { padding: 25px 20px 22px; }
  .auth-heading { margin-bottom: 22px; }
  #authForm { gap: 14px; }
  .profile-grid { grid-template-columns: 1fr; gap: 12px; }
  .heart { font-size: 3rem; opacity: .72; }
  .heart-left { top: 2%; left: -8px; }
  .heart-right { top: 5%; right: -7px; }
  .sparkle { display: none; }
  .cat-peek { bottom: -112px; transform: translateX(-50%) scale(.82); }
}

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