/* Auth sahifalari (kirish, ro'yxat, kod, parol). Tokenlar: ../liquid.css */
@import url('../liquid.css');

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    padding-top: max(24px, env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.2rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;      /* SVG ning o'z burchaklariga mos */
    flex: none;
    display: block;
}

main {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 16px 20px 24px;
    position: relative;
    z-index: 10;
}

.auth-card {
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    border-radius: var(--r-xl);
    animation: card-in .5s var(--ease) both;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.auth-header { text-align: center; }

.auth-title {
    font-size: 1.7rem;
    font-weight: 800;
}

.auth-subtitle {
    font-size: .875rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.55;
}

/* dumaloq ikonka (kod, kalit, qulf sahifalarida) */
.auth-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 16px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow-1);
}

.auth-badge.success {
    background: rgba(16, 185, 129, .15);
    color: var(--success);
}

/* ------------------------------------------------------------- formalar */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.form-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}

.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper i {
    position: absolute;
    left: 15px;
    z-index: 2;                /* autofill fonining ustida qoladi */
    color: var(--text-muted);
    pointer-events: none;
}

.input-control { width: 100%; padding: 13px 14px 13px 42px; }

/* maydon to'ldirilganda ham ikonka ko'rinib tursin */
.input-wrapper .input-control { position: relative; z-index: 1; background-clip: padding-box; }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: .78rem;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------- kod kiritish */
.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.code-input {
    flex: 1 1 0;
    min-width: 0;
    max-width: 56px;
    height: 60px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    border-radius: var(--r-md);
}

.resend-text {
    text-align: center;
    font-size: .85rem;
    color: var(--text-muted);
}

.resend-text a, .auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.link-btn:disabled { color: var(--text-muted); cursor: not-allowed; }
.link-btn:hover:not(:disabled) { text-decoration: underline; }

.auth-footer {
    text-align: center;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    font-size: .875rem;
    color: var(--text-muted);
}

/* ------------------------------------------------------------- xabarlar */
.form-error,
.form-success,
.form-info {
    padding: 12px 15px;
    border-radius: var(--r-sm);
    margin-bottom: 16px;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.5;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-error {
    color: var(--danger);
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .3);
}

.form-success {
    color: var(--success);
    background: rgba(16, 185, 129, .12);
    border: 1px solid rgba(16, 185, 129, .3);
}

.form-info {
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
}

.form-error p + p { margin-top: 4px; }

footer {
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    text-align: center;
    font-size: .75rem;
    color: var(--text-muted);
    position: relative;
    z-index: 10;
}

.form-options.end { justify-content: flex-end; }

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ------------------------------------------------------------- Telegram tugmasi */
.btn-telegram {
    width: 100%;
    padding: 13px;
    border-radius: var(--r-sm);
    border: 1px solid rgba(42, 171, 238, .5);
    background: linear-gradient(180deg, #3fb7f0, #229ed9);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 24px -10px rgba(34, 158, 217, .8);
    transition: filter var(--fast), transform var(--fast);
}

.btn-telegram:hover { filter: brightness(1.06); }
.btn-telegram:active { transform: scale(.97); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* kutish holati (botdan kod kutilayotganda) */
.wait-dots { display: inline-flex; gap: 4px; vertical-align: middle; }

.wait-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: dot 1.2s infinite ease-in-out both;
}

.wait-dots span:nth-child(2) { animation-delay: .16s; }
.wait-dots span:nth-child(3) { animation-delay: .32s; }

@keyframes dot {
    0%, 80%, 100% { opacity: .25; transform: scale(.8); }
    40% { opacity: 1; transform: scale(1); }
}
