/* ===== ÀÂÒÎÐÈÇÀÖÈß ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.auth-theme-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.auth-logo img {
    height: 50px;
    transition: all 0.3s ease;
}

.auth-logo:hover img {
    transform: scale(1.05);
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.auth-nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

    .auth-nav-link:hover {
        background: rgba(74, 157, 255, 0.1);
        color: var(--accent);
    }

.auth-nav-separator {
    color: rgba(74, 157, 255, 0.5);
    font-size: 12px;
}

.auth-wrapper {
    max-width: 600px;
    width: 100%;
    margin: 20px auto;
    background: linear-gradient(145deg, rgba(13, 27, 72, 0.85), rgba(20, 35, 90, 0.75));
    border-radius: 28px;
    border: 1px solid rgba(74, 157, 255, 0.25);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-form-section {
    padding: 60px 50px;
}

    .auth-form-section.full-width {
        width: 100%;
    }

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    background: rgba(13, 27, 72, 0.3);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(74, 157, 255, 0.2);
}

.auth-tab {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

    .auth-tab:hover {
        background: rgba(74, 157, 255, 0.1);
        color: var(--white);
    }

    .auth-tab.active {
        background: linear-gradient(135deg, var(--accent), #00D4A3);
        color: #00110D;
        box-shadow: 0 5px 15px rgba(0, 255, 197, 0.2);
    }

.auth-form {
    display: none;
    flex-direction: column;
}

    .auth-form.active {
        display: flex;
    }

.auth-title {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-weight: 500;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(13, 27, 72, 0.4);
    border: 1px solid rgba(74, 157, 255, 0.3);
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    transition: all 0.3s ease;
}

    .form-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(0, 255, 197, 0.1);
        background: rgba(13, 27, 72, 0.6);
    }

    .form-input::placeholder {
        color: rgba(176, 184, 208, 0.5);
    }

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    opacity: 0.8;
}

.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: all 0.3s ease;
}

    .password-toggle:hover {
        color: var(--accent);
    }

.password-strength {
    margin-top: 10px;
}

.strength-meter {
    height: 6px;
    background: rgba(13, 27, 72, 0.4);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar {
    height: 100%;
    width: 0;
    background: #FF4D4D;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: var(--text-muted);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    user-select: none;
    flex: 1;
    min-width: 200px;
}

    .checkbox-container input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background: rgba(13, 27, 72, 0.4);
    border: 1px solid rgba(74, 157, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: var(--accent);
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--accent), #00D4A3);
    border-color: var(--accent);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #00110D;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    color: var(--white);
    font-size: 14px;
    line-height: 1.4;
}

.forgot-password {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .forgot-password:hover {
        text-decoration: underline;
    }

.terms-link {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

    .terms-link:hover {
        text-decoration: underline;
    }

.auth-submit-btn {
    background: linear-gradient(135deg, var(--accent), #00D4A3);
    color: #00110D;
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

    .auth-submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 255, 197, 0.3);
    }

    .auth-submit-btn:active {
        transform: translateY(0);
    }

.auth-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    text-align: center;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(74, 157, 255, 0.2);
    }

    .auth-divider span {
        padding: 0 15px;
        color: var(--text-muted);
        font-size: 14px;
    }

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(74, 157, 255, 0.3);
    background: rgba(13, 27, 72, 0.3);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .social-btn:hover {
        background: rgba(74, 157, 255, 0.1);
        border-color: var(--accent);
        transform: translateY(-2px);
    }

    .social-btn.google {
        background: rgba(255, 255, 255, 0.05);
    }

    .social-btn.github {
        background: rgba(255, 255, 255, 0.05);
    }

.social-icon {
    font-weight: bold;
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 14px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.auth-footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

    .auth-footer-links a {
        color: var(--text-muted);
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .auth-footer-links a:hover {
            color: var(--accent);
        }

/* ===== ÑÂÅÒËÀß ÒÅÌÀ äëÿ àâòîðèçàöèè ===== */
body.light-theme .auth-wrapper {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 245, 255, 0.85));
    border: 1px solid rgba(74, 157, 255, 0.2);
    box-shadow: 0 20px 60px rgba(13, 27, 72, 0.1);
}

body.light-theme .auth-tabs {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(74, 157, 255, 0.2);
}

body.light-theme .auth-tab {
    color: #4A5568;
}

    body.light-theme .auth-tab:hover {
        background: rgba(74, 157, 255, 0.1);
        color: var(--primary-dark);
    }

body.light-theme .form-label {
    color: var(--primary-dark);
}

body.light-theme .form-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(74, 157, 255, 0.3);
    color: var(--primary-dark);
}

    body.light-theme .form-input:focus {
        background: white;
        box-shadow: 0 0 0 3px rgba(74, 157, 255, 0.1);
    }

body.light-theme .form-hint {
    color: #718096;
}

body.light-theme .checkbox-label {
    color: var(--primary-dark);
}

body.light-theme .auth-nav-link {
    color: var(--primary-dark);
}

    body.light-theme .auth-nav-link:hover {
        color: var(--accent);
    }

body.light-theme .social-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(74, 157, 255, 0.3);
    color: var(--primary-dark);
}

    body.light-theme .social-btn:hover {
        background: rgba(74, 157, 255, 0.1);
    }

body.light-theme .strength-meter {
    background: rgba(255, 255, 255, 0.8);
}

/* ===== ÀÄÀÏÒÈÂÍÎÑÒÜ àâòîðèçàöèè ===== */
@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
    }

    .auth-form-section {
        padding: 40px 30px;
    }

    .auth-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 10px 0;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .social-login {
        flex-direction: column;
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .forgot-password {
        align-self: flex-start;
    }

    .checkbox-container {
        min-width: unset;
    }

    .auth-footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .auth-form-section {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-subtitle {
        font-size: 14px;
    }
}
