/* ===== Auth pages (login / register) — builds on styles.css tokens ===== */
body.auth { min-height: 100vh; }
.auth .logo-name { color: #fff; }
.auth .logo-sub { color: var(--gold); }

.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-shell.single { grid-template-columns: 1fr; }

/* Form side */
.auth-main { display: flex; flex-direction: column; padding: 28px clamp(16px, 5vw, 64px); position: relative;
  background: radial-gradient(80% 50% at 0% 0%, rgba(22,179,100,.14), transparent 70%), var(--bg); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.back-link { font-size: 14px; font-weight: 600; color: var(--text-2); padding: 8px 12px; border-radius: 10px; transition: background .2s, color .2s; }
.back-link:hover { color: #fff; background: rgba(255,255,255,.06); }

.auth-card { width: 100%; max-width: 440px; margin: auto; padding: 48px 0; }
.auth-card section { animation: fadeUp .5s var(--ease); }
.auth-card h1 { font-size: clamp(32px, 4vw, 42px); line-height: 1.1; }
.sub { color: var(--text-2); margin: 10px 0 32px; }
.sub b { color: #fff; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: var(--text-2); }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field select {
  width: 100%; padding: 14px 16px; border-radius: 14px; font: inherit; font-size: 15px; color: #fff;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: var(--text-3); }
.field input:hover, .field select:hover { border-color: rgba(255,255,255,.22); }
.field input:focus, .field select:focus { border-color: var(--green-2); background-color: rgba(22,179,100,.06); box-shadow: 0 0 0 4px rgba(22,179,100,.18); }
.field.invalid input, .field.invalid select { border-color: var(--red); box-shadow: 0 0 0 4px rgba(248,113,113,.12); }
.field.valid input, .field.valid select { border-color: rgba(94,242,168,.45); }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.48)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 16px;
}
.field select:invalid { color: var(--text-3); }
.field select option { background: var(--bg-2); color: #fff; }
.error { color: var(--red); font-size: 13px; min-height: 0; }
.error:empty { display: none; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 72px !important; }
.toggle-pass { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--mint); }
.toggle-pass:hover { background: rgba(94,242,168,.1); }
.text-btn { font-size: 13.5px; font-weight: 600; color: var(--mint); }
.text-btn:hover { text-decoration: underline; }
.text-btn.back { margin-bottom: 22px; }

/* Password strength */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.strength i { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); transition: background .3s; }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-score="2"] i:nth-child(-n+2) { background: #F5B94A; }
.strength[data-score="3"] i:nth-child(-n+3) { background: var(--emerald); }
.strength[data-score="4"] i { background: var(--mint); }
.rules { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 4px; }
.rules li { font-size: 12.5px; color: var(--text-3); padding-left: 18px; position: relative; transition: color .2s; }
.rules li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.rules li.ok { color: var(--mint); }
.rules li.ok::before { background: currentColor; }

/* Checkbox */
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; margin: 4px 0 8px; line-height: 1.5; }
.check input { position: absolute; opacity: 0; }
.check .box { width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--border-strong); background: rgba(255,255,255,.04); display: grid; place-items: center; transition: background .2s, border-color .2s; margin-top: 1px; }
.check .box::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; transition: opacity .15s; }
.check input:checked + .box { background: var(--green-2); border-color: var(--green-2); }
.check input:checked + .box::after { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--mint); outline-offset: 2px; }
.check a { color: var(--mint); font-weight: 600; }

/* Alert + submit */
.form-alert { display: none; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: #FCA5A5; }
.form-alert.show { display: block; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.btn-block { width: 100%; margin-top: 18px; }
.btn-block + .btn-block { margin-top: 10px; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading { pointer-events: none; opacity: .85; }
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-label { opacity: .7; }

.switch { margin-top: 24px; text-align: center; color: var(--text-2); font-size: 14.5px; }
.switch a { color: var(--mint); font-weight: 700; }
.switch a:hover { text-decoration: underline; }

/* Done states */
.done { text-align: center; }
.done-icon { width: 76px; height: 76px; margin: 0 auto 24px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(22,179,100,.12); animation: pop .5s var(--ease); }
.done-icon svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.auth-foot { text-align: center; font-size: 13px; color: var(--text-3); }
.auth-foot a:hover { color: #fff; }

/* Art side */
.auth-art { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; padding: 48px;
  background: radial-gradient(circle at 70% 10%, rgba(94,242,168,.35), transparent 50%), var(--grad); }
.art-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); }
.art-orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.a1 { width: 360px; height: 360px; background: #04130D; opacity: .45; bottom: -120px; left: -80px; animation: float 12s ease-in-out infinite; }
.a2 { width: 280px; height: 280px; background: #fff; opacity: .18; top: 10%; right: -60px; animation: float 14s ease-in-out infinite reverse; }
.art-content { position: relative; width: 100%; max-width: 440px; display: grid; gap: 16px; }
.auth-art .glass { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 20px 40px -20px rgba(4,19,13,.5); }

.art-card { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; width: max-content; animation: bob 6s ease-in-out infinite; }
.art-card small, .art-quote small, .art-list small, .art-stats small { display: block; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 500; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse-w 2s infinite; }
@keyframes pulse-w { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } }
.art-quote { padding: 26px; border-radius: 22px; }
.art-quote p { font-size: 19px; font-weight: 600; line-height: 1.45; }
.art-quote footer { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-weight: 700; font-size: 14.5px; }
.art-quote footer span { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--green); display: grid; place-items: center; font-size: 12.5px; }
.art-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.art-stats div { padding: 18px 20px; border-radius: 18px; }
.art-stats b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }

.art-title { font-size: clamp(30px, 3vw, 40px); margin-bottom: 8px; }
.art-list { list-style: none; display: grid; gap: 12px; }
.art-list li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; }
.art-list li span { font-family: var(--mono); font-size: 14px; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.2); display: grid; place-items: center; flex-shrink: 0; }
.art-note { font-size: 13.5px; color: rgba(255,255,255,.8); margin-top: 6px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200;
  padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14.5px; color: var(--ink);
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .back-link { padding: 8px 0; font-size: 13px; }
  .auth-card { padding: 36px 0; }
}
