/* PLATplus — panel login (OTP) */

:root {
    --pl-primary: #7B61FF;
    --pl-blue: #00A3FF;
    --pl-dark: #0F172A;
    --pl-text: #334155;
    --pl-muted: #64748B;
    --pl-border: #E2E8F0;
    --pl-gradient: linear-gradient(135deg, #00A3FF 0%, #7B61FF 50%, #6366F1 100%);
    --pl-bg: linear-gradient(145deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
    --pl-card-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
    --pl-step-min: 280px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.pl-login {
    margin: 0;
    min-height: 100vh;
    font-family: Vazirmatn, Tahoma, 'Segoe UI', sans-serif;
    color: var(--pl-text);
    background: var(--pl-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    position: relative;
    overflow-x: hidden;
}

.pl-login__bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.pl-login__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.pl-login__orb--1 {
    width: 420px;
    height: 420px;
    background: #7B61FF;
    top: -120px;
    right: -80px;
}

.pl-login__orb--2 {
    width: 360px;
    height: 360px;
    background: #00A3FF;
    bottom: -100px;
    left: -60px;
}

@media (prefers-reduced-motion: no-preference) {
    .pl-login__orb--1 {
        animation: pl-orb-drift 18s ease-in-out infinite alternate;
    }
    .pl-login__orb--2 {
        animation: pl-orb-drift 22s ease-in-out infinite alternate-reverse;
    }
}

@keyframes pl-orb-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(24px, 16px); }
}

@media (prefers-reduced-motion: reduce) {
    .pl-login__orb { animation: none !important; }
    .pl-login-card { animation: none !important; }
}

.pl-login-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.pl-login-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--pl-card-shadow);
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .pl-login-card {
        animation: pl-card-in 0.45s ease-out both;
    }
}

@keyframes pl-card-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pl-login-card__body {
    padding: 2rem 1.75rem 1.75rem;
}

.pl-login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pl-login-brand img {
    height: 40px;
    width: auto;
}

.pl-login-brand h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--pl-dark);
    margin: 0.85rem 0 0.25rem;
}

.pl-login-brand p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--pl-muted);
}

.pl-login-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.pl-login-step {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pl-muted);
    padding: 0.35rem 0.65rem;
    border-radius: 50px;
    background: #f8fafc;
    border: 1px solid var(--pl-border);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.pl-login-step.is-active {
    color: var(--pl-primary);
    border-color: rgba(123, 97, 255, 0.35);
    background: rgba(123, 97, 255, 0.08);
}

.pl-login-step__num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    background: #e2e8f0;
    color: #475569;
}

.pl-login-step.is-active .pl-login-step__num {
    background: var(--pl-primary);
    color: #fff;
}

.pl-login-step-line {
    width: 28px;
    height: 2px;
    background: var(--pl-border);
    border-radius: 1px;
}

.pl-login-panel {
    min-height: var(--pl-step-min);
    display: flex;
    flex-direction: column;
}

.pl-login-alert {
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.pl-login-alert--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.pl-login-alert--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.pl-login-alert--warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.pl-login-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pl-dark);
    margin-bottom: 0.45rem;
}

.pl-login-input {
    width: 100%;
    border: 2px solid var(--pl-border);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--pl-dark);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pl-login-input:focus {
    outline: none;
    border-color: var(--pl-primary);
    box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.12);
}

.pl-login-input--phone {
    text-align: center;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.pl-login-input--code {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.55rem;
    padding-left: 0.55rem;
}

.pl-login-hint {
    font-size: 0.8rem;
    color: var(--pl-muted);
    text-align: center;
    margin: 0 0 1rem;
    line-height: 1.6;
}

.pl-login-hint strong {
    color: var(--pl-dark);
    font-weight: 700;
}

.pl-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: var(--pl-gradient);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.pl-login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(123, 97, 255, 0.35);
}

.pl-login-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.pl-login-btn__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pl-spin 0.7s linear infinite;
}

@keyframes pl-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pl-login-btn__spinner { animation-duration: 1.2s; }
}

.pl-login-link {
    display: inline-block;
    margin-top: 0.75rem;
    background: none;
    border: none;
    padding: 0.35rem 0.5rem;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--pl-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pl-login-link:hover:not(:disabled) {
    color: var(--pl-primary);
}

.pl-login-link:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    text-decoration: none;
}

.pl-login-test-code {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.45rem;
    color: var(--pl-primary);
    margin-top: 0.35rem;
}

.pl-login-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pl-border);
    font-size: 0.78rem;
    color: var(--pl-muted);
}

.pl-login-footer a {
    color: var(--pl-primary);
    text-decoration: none;
    font-weight: 600;
}

.pl-login-footer a:hover {
    text-decoration: underline;
}

.pl-login-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
}

.pl-login-back:hover {
    color: #fff;
}

.pl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pl-login-actions {
    text-align: center;
    margin-top: 0.5rem;
}

.pl-login-actions__sep {
    color: #cbd5e1;
    margin: 0 0.35rem;
}
