/* Auth — лёгкий Telegram-стиль */
:root {
    --auth-bg: #0e1621;
    --auth-card: rgba(24, 37, 46, 0.72);
    --auth-line: rgba(255, 255, 255, 0.06);
    --auth-text: #e8eef2;
    --auth-muted: #8b9aA6;
    --auth-blue: #2AABEE;
    --auth-blue-deep: #229ED9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    min-height: 100%;
    min-height: 100dvh;
}

body.auth-body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(900px 500px at 12% -10%, rgba(42, 171, 238, 0.22), transparent 55%),
        radial-gradient(700px 420px at 100% 10%, rgba(110, 180, 255, 0.12), transparent 50%),
        radial-gradient(600px 400px at 50% 110%, rgba(42, 171, 238, 0.08), transparent 45%),
        var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    width: 100%;
    max-width: 420px;
    animation: authIn 0.45s ease;
}

@keyframes authIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.auth-card {
    background: var(--auth-card);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid var(--auth-line);
    border-radius: 22px;
    padding: 28px 24px 22px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.auth-brand {
    text-align: center;
    margin-bottom: 22px;
}

.auth-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 34px;
    color: #fff;
    background: linear-gradient(145deg, #2AABEE, #1e96d1);
    box-shadow: 0 10px 28px rgba(42, 171, 238, 0.35);
}

.auth-brand h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-brand p {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--auth-muted);
    line-height: 1.4;
}

.auth-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.auth-alert.error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.35);
    color: #ff8a80;
}

.auth-alert.success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.35);
    color: #7ddea0;
}

.auth-alert i { margin-top: 2px; }

.auth-field {
    margin-bottom: 14px;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--auth-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap > i:first-child {
    position: absolute;
    left: 14px;
    color: var(--auth-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.auth-input-wrap input {
    width: 100%;
    padding: 13px 44px 13px 40px;
    border-radius: 14px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--auth-text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input-wrap input::placeholder {
    color: #6b7a86;
}

.auth-input-wrap input:focus {
    border-color: rgba(42, 171, 238, 0.65);
    background: rgba(42, 171, 238, 0.06);
    box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.15);
}

.auth-toggle-pass {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--auth-muted);
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.auth-toggle-pass:hover { color: var(--auth-text); background: rgba(255,255,255,0.05); }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 16px;
    font-size: 0.82rem;
    color: var(--auth-muted);
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    accent-color: var(--auth-blue);
    width: 16px;
    height: 16px;
}

.auth-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 650;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--auth-blue), var(--auth-blue-deep));
    box-shadow: 0 8px 22px rgba(42, 171, 238, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(42, 171, 238, 0.38);
    filter: brightness(1.05);
}

.auth-btn:active { transform: scale(0.98); }

.auth-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--auth-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.auth-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--auth-line);
    font-size: 0.78rem;
    color: var(--auth-muted);
}

.auth-feature i {
    color: var(--auth-blue);
    font-size: 0.85rem;
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.auth-footer a {
    color: var(--auth-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }

.auth-hint {
    margin-top: 14px;
    text-align: center;
    font-size: 0.75rem;
    color: #657582;
}

@media (max-width: 420px) {
    .auth-card { padding: 22px 16px 18px; border-radius: 18px; }
    .auth-features { grid-template-columns: 1fr; }
}
