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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ── Карточка ── */
.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* ── Шапка ── */
.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 24px;
}

/* ── Ошибка ── */
.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Табы ── */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    padding: 9px 8px;
    border: none;
    border-radius: 9px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

    .tab.active {
        background: #fff;
        color: #6366f1;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

/* ── Вкладки ── */
.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* ── Поля ── */
.field {
    margin-bottom: 16px;
}

    .field label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: #374151;
        margin-bottom: 6px;
    }

    .field input {
        width: 100%;
        padding: 11px 14px;
        border: 1.5px solid #e5e7eb;
        border-radius: 10px;
        font-size: 15px;
        outline: none;
        transition: border-color .2s, box-shadow .2s;
        color: #1f2937;
    }

        .field input:focus {
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
        }

.field-password {
    position: relative;
}

    .field-password input {
        padding-right: 44px;
    }

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    opacity: 0.5;
    transition: opacity .2s;
}

    .toggle-password:hover {
        opacity: 1;
    }

/* ── Кнопки ── */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 4px;
}

    .btn-primary:hover {
        background: #4f46e5;
    }

    .btn-primary:active {
        transform: scale(0.99);
    }

    .btn-primary:disabled {
        background: #a5b4fc;
        cursor: not-allowed;
    }

.btn-link-inline {
    background: none;
    border: none;
    color: #6366f1;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
}

/* ── OTP ── */
.input-otp {
    font-size: 28px !important;
    text-align: center;
    letter-spacing: 10px;
    font-weight: 700;
    color: #6366f1 !important;
}

.otp-hint {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.otp-resend {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    margin-top: 12px;
}

/* ── Разделитель ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 13px;
}

    .auth-divider::before,
    .auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #e5e7eb;
    }

/* ── Социальные кнопки ── */
.social-buttons {
    display: flex;
    gap: 10px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all .2s;
    background: #fff;
}

    .btn-social:hover {
        border-color: #6366f1;
        color: #6366f1;
        background: #fafafa;
    }

/* ── Мобильная адаптация ── */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
    }

    .auth-title {
        font-size: 20px;
    }
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.profile-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.profile-value {
    font-size: 13px;
    color: #111827;
    font-weight: 600;
    word-break: break-all;
    text-align: right;
}
