/* salim.business — kirish va ro'yxatdan o'tish sahifalari.
   Tokenlar, shriftlar, tugmalar va escrow lentasi assets/landing.css'dan olinadi. */

.auth [hidden] { display: none !important; }
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 100vh; }

/* ---------- Chap: forma ---------- */
.auth__main { display: flex; flex-direction: column; padding: 28px var(--margin) 40px; }
.auth__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.auth__top a.link { font-size: 15px; }
.auth__form-wrap { width: 100%; max-width: 460px; margin: auto 0; padding: clamp(40px, 6vh, 80px) 0; }
.auth__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(36px, 3.6vw, 56px); line-height: 1; letter-spacing: -0.04em; }
.auth__lead { margin-top: 18px; font-size: var(--t-lead); line-height: 1.45; }
.auth__form { margin-top: clamp(32px, 4vh, 48px); display: grid; gap: 20px; }
.auth__alt { margin-top: 28px; display: grid; gap: 10px; font-size: 16px; }

/* ---------- Maydonlar (haqiqiy forma — chiziq o'rniga ton) ---------- */
.field { display: grid; gap: 8px; }
.field__label { font-size: 15px; font-weight: 600; }
.field__hint { font-size: var(--t-small); color: var(--ink-2); line-height: 1.45; }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 12px; border: 2px solid transparent;
  background: var(--ground-3); color: var(--ink); font: 400 17px var(--f-text); outline: none;
  transition: border-color .15s, background-color .15s;
}
.input:hover { background: color-mix(in srgb, var(--ground-3) 88%, #fff); }
.input:focus { border-color: var(--accent); background: var(--ground-2); }
.input[aria-invalid="true"] { border-color: #F87171; }
.input::placeholder { color: #6B7A92; }
.pass { position: relative; }
.pass .input { padding-right: 104px; }
.pass__toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 8px; padding: 8px 12px;
  background: var(--ground); color: var(--ink); font: 600 14px var(--f-text); cursor: pointer; }
.pass__toggle:hover { background: var(--ground-2); }

.meter { display: flex; gap: 4px; height: 6px; margin-top: 2px; }
.meter span { flex: 1; border-radius: 3px; background: var(--ground-3); transition: background-color .2s; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--t-small); color: var(--ink-2); }
.rules li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ground-3); margin-right: 7px; vertical-align: 1px; transition: background-color .2s; }
.rules li.ok { color: var(--ink); }
.rules li.ok::before { background: var(--green); }

/* Rol tanlash: ikkita katta tugma-variant (radio) */
.roles { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.roles legend { font-size: 15px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.roles__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role { position: relative; display: block; cursor: pointer; }
.role input { position: absolute; opacity: 0; pointer-events: none; }
.role__box { display: block; height: 100%; border-radius: 14px; padding: 16px; background: var(--ground-3); border: 2px solid transparent; transition: border-color .15s, background-color .15s; }
.role:hover .role__box { background: color-mix(in srgb, var(--ground-3) 88%, #fff); }
.role input:checked + .role__box { border-color: var(--accent); background: var(--ground-2); }
.role input:focus-visible + .role__box { outline: 3px solid var(--accent); outline-offset: 3px; }
.role__title { display: block; font-weight: 700; font-size: 17px; }
.role__desc { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--t-small); line-height: 1.4; }

.alert { display: none; border-radius: 12px; padding: 14px 16px; background: #3B1820; color: #FECACA; font-size: 15px; line-height: 1.45; }
.alert.is-visible { display: block; }
.auth .btn[type=submit] { width: 100%; min-height: 56px; font-size: 17px; }
.auth .btn[disabled] { opacity: .6; cursor: progress; }
.captcha { min-height: 65px; }

/* ---------- O'ng: g'oya (escrow) ---------- */
.auth__side { background: var(--ground-2); padding: clamp(32px, 5vw, 80px) var(--margin); display: flex; flex-direction: column; justify-content: center; gap: clamp(32px, 4vw, 56px); }
@media (min-width: 961px) { .auth__side { position: sticky; top: 0; height: 100vh; overflow: auto; } }
.auth__statement { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 2.3vw, 36px); line-height: 1.12; letter-spacing: -0.03em; max-width: 20ch; }
.auth__side .ledger { margin-top: 0; }

/* Ro'yxatdan o'tish: rolga qarab "keyin nima bo'ladi" */
.next { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(22px, 2.6vw, 36px); }
.next li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 24px; align-items: baseline; }
.next__money { font-family: var(--f-display); font-weight: 600; font-size: clamp(20px, 1.9vw, 28px); letter-spacing: -0.03em; color: var(--accent); }
.next__money--paid { color: var(--green); }
.next b { display: block; font-size: var(--t-lead); font-weight: 700; line-height: 1.3; }
.next span.d { display: block; margin-top: 6px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.next-set[hidden] { display: none; }

/* Muvaffaqiyat */
.done { display: grid; gap: 24px; margin-top: 18px; }
.auth__title:focus { outline: none; }
.done[hidden] { display: none; }
.done__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(32px, 3vw, 44px); letter-spacing: -0.04em; line-height: 1.02; }
.done .btn { width: 100%; min-height: 56px; }

/* Harakat */
.auth__form-wrap > * { animation: authRise .7s var(--ease) both; }
.auth__form-wrap > *:nth-child(2) { animation-delay: 70ms; }
.auth__form-wrap > *:nth-child(3) { animation-delay: 140ms; }
.auth__form-wrap > *:nth-child(4) { animation-delay: 210ms; }
.auth__side > * { animation: authRise .8s var(--ease) both; animation-delay: 200ms; }
.auth__side > *:nth-child(2) { animation-delay: 300ms; }
@keyframes authRise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.next li { transition: opacity .3s var(--ease), transform .3s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .auth__form-wrap > *, .auth__side > * { animation: none; }
  .input, .role__box, .meter span, .rules li::before, .next li { transition: none; }
}

/* ---------- Planshet va telefon ---------- */
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth__form-wrap { max-width: 560px; margin: 0; }
  .auth__side { padding-top: 64px; padding-bottom: 64px; }
}
@media (max-width: 520px) {
  .field__row, .roles__pair { grid-template-columns: 1fr; }
  .next li { grid-template-columns: 1fr; }
  .auth__form-wrap { padding: 36px 0 24px; }
}

/* Escrow lentasi: yashil qism chapdan to'ladi (asosiy harakat) */
.auth__side .ledger__seg--paid::after { transform-origin: left; animation: authFill 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 260ms + 500ms); }
@keyframes authFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .auth__side .ledger__seg--paid::after { animation: none; } }
