/**
 * Gsm Pay — Auth pages (login, register)
 */

:root {
    --primary: #5b6ef5;
    --primary-light: #7c8ff7;
    --secondary: #8b4fd9;
    --bg: #0b1120;
    --bg-card: #161f36;
    --text: #eef2ff;
    --text-muted: #8b9cb8;
    --text-dim: #5a6d8a;
    --border: rgba(255, 255, 255, 0.1);
    --telegram: #229ed9;
    --whatsapp: #25d366;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(91, 110, 245, 0.2), transparent),
        radial-gradient(ellipse 50% 40% at 100% 80%, rgba(139, 79, 217, 0.12), transparent);
    pointer-events: none;
    z-index: -1;
}

.auth-back {
    position: fixed;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 9px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    transition: color 0.2s, background 0.2s;
    z-index: 10;
    text-decoration: none;
}

.auth-back:hover {
    color: var(--text);
    background: rgba(255,255,255,0.08);
}

.auth-page { width: 100%; max-width: 420px; }

.auth-page-wide { max-width: 460px; }

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.auth-logo-mark { width: 44px; height: 44px; flex-shrink: 0; }
.auth-logo-mark svg { width: 100%; height: 100%; display: block; }

.auth-logo strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-logo span { font-size: 0.8125rem; color: var(--text-muted); }

.auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.8125rem;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.auth-form .field { margin-bottom: 16px; }

.auth-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input::placeholder { color: var(--text-dim); }

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 110, 245, 0.15);
}

.auth-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 5px; }

.auth-submit {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    border-radius: 11px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(91, 110, 245, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover { color: var(--text); }

.auth-divider {
    text-align: center;
    margin: 20px 0;
    font-size: 0.75rem;
    color: var(--text-dim);
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-info {
    background: rgba(34, 158, 217, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(34, 158, 217, 0.25);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.8125rem;
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auth-code-input {
    text-align: center;
    letter-spacing: 0.35em;
    font-size: 1.25rem !important;
    font-weight: 700;
}

.float-contact {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    right: max(20px, env(safe-area-inset-right));
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 100px;
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s;
    text-decoration: none;
}

.float-btn i { font-size: 20px; }
.float-wa { background: var(--whatsapp); }
.float-tg { background: var(--telegram); }
.float-btn:hover { transform: translateX(-4px) scale(1.03); }

@media (max-width: 480px) {
    .auth-card { padding: 28px 22px; }
    .auth-back { top: 12px; left: 12px; }
    .float-label { display: none; }
    .float-btn {
        width: 52px;
        height: 52px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}
