/* Auth pages (login, register, forgot password) — same visual system as landing/v2 */
:root {
  --bg: #EFEDE4;
  --paper: #F8F7F2;
  --white: #FFFFFF;
  --ink: #1E3631;
  --ink-2: #2C4A43;
  --muted: #5B6B66;
  --line: #DAD7CA;
  --lime: #E3EDAE;
  --lilac: #DCCDE6;
  --sky: #CADDE4;
  --skin: #F4E7D4;
  --danger-bg: #F6E1DB;
  --danger: #9A3B2A;
  --ok-bg: #E3EDAE;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid #7FA83A; outline-offset: 3px; border-radius: 8px; }

.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }

/* Form side */
.auth-main { display: flex; flex-direction: column; padding: 16px 24px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.back { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; }

.auth-form { width: 100%; max-width: 400px; margin: auto; padding: 40px 0; }
.auth-form h1 { font-size: clamp(34px, 4vw, 46px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; }
.auth-form .sub { color: var(--muted); margin: 12px 0 32px; font-size: 16px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.input { position: relative; }
.input svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input input {
  width: 100%; height: 54px; padding: 0 18px 0 48px;
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px;
  font: 500 15px "Onest", sans-serif;
  transition: border-color .15s, box-shadow .15s;
}
.input input::placeholder { color: #9AA5A1; }
.input input:hover { border-color: #BDB9A8; }
.input input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(227, 237, 174, .9); }
.input input[type=number] { -moz-appearance: textfield; }
.input input::-webkit-outer-spin-button, .input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.toggle-pw { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.toggle-pw:hover { background: var(--bg); color: var(--ink); }
.toggle-pw svg { position: static; transform: none; width: 18px; height: 18px; }

.row { display: flex; justify-content: flex-end; margin: -6px 0 18px; }
.row a { font-size: 14px; font-weight: 600; text-decoration: none; }
.row a:hover { text-decoration: underline; }

.btn {
  width: 100%; height: 54px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font: 600 15px "Onest", sans-serif; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; transition: transform .15s, background .15s;
}
.btn:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn:active { transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn-light { background: transparent; color: var(--ink); }
.btn-light:hover { background: var(--white); }

.switch { text-align: center; margin-top: 24px; color: var(--muted); font-size: 15px; }
.switch a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--lime); }
.switch a:hover { border-bottom-color: var(--ink); }

.alert { display: none; border-radius: 16px; padding: 12px 16px; font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.alert.show { display: block; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-ok { background: var(--ok-bg); color: var(--ink); }

.legal { font-size: 13px; color: var(--muted); text-align: center; margin-top: 18px; }
.legal a { color: var(--ink); }

/* Illustration side */
.auth-art { border-radius: 36px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; }
.auth-art.sky { background: var(--sky); }
.auth-art.lime { background: var(--lime); }
.auth-art h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; max-width: 440px; }
.auth-art p { color: var(--ink-2); margin-top: 14px; max-width: 400px; }
.perks { list-style: none; display: grid; gap: 10px; margin-top: 24px; }
.perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.perks li::before { content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E3EDAE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat; }
.auth-art .mascot { width: 100%; max-width: 440px; margin: 24px auto -48px; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.float { animation: float 5s ease-in-out infinite; transform-box: fill-box; }
.float.d2 { animation-delay: -1.6s; }
.float.d3 { animation-delay: -3.2s; }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } }

/* Single centered card (forgot password) */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.solo-card { width: 100%; max-width: 460px; background: var(--white); border: 1.5px solid var(--line); border-radius: 36px; padding: 40px 36px; text-align: center; }
.solo-card .bot { width: 140px; margin: 0 auto 20px; }
.solo-card h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.solo-card p { color: var(--muted); margin: 12px 0 28px; }
.solo-card .btn + .btn { margin-top: 10px; }
.solo-card .back { margin-top: 22px; justify-content: center; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .auth-main { padding: 16px; }
  .auth-art { display: none; }
  .auth-form { padding: 32px 0 24px; }
}

/* Solo card extras: password reset & email verification pages (auth_pages.py) */
.solo-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.solo-card svg.bot { display: block; width: 130px; margin: 0 auto 18px; }
.solo-card p b { color: var(--ink); word-break: break-all; }
.solo-form { text-align: left; margin-top: 4px; }
.solo-form .btn { margin-top: 4px; }
.solo-form .alert { text-align: left; }
.solo-card .alert { text-align: left; margin-bottom: 16px; }
.solo-note { font-size: 13px !important; margin: 18px 0 0 !important; }
.solo-note a { color: var(--ink); font-weight: 600; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-light:disabled:hover { background: transparent; }

/* Register: Vibby stands centred in the free space below the perks (whole robot visible) */
.auth-art .mascot-bot { flex: 1 1 auto; width: 100%; max-width: 440px; max-height: 58vh; margin: 32px auto 0; align-self: center; }

/* UA/EN switch (static/js/i18n.js), same as .lang-switch in landing/v2 */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; transition: background .15s; }
.lang-switch:hover { background: var(--white); }
.lang-switch svg { width: 16px; height: 16px; }
.auth-top-r { display: flex; align-items: center; gap: 8px; }
.solo-card { position: relative; }
.solo-card .lang-switch { position: absolute; top: 14px; right: 14px; }
.solo-card .lang-switch:hover { background: var(--bg); }
