/* Auth Page Styles */
.auth-section {
    min-height: 100vh;
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--color-text-light);
    font-size: 1rem;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-dark);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 48px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Input Icons - Precisely centered */
.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%) translateY(6px); /* Perfectly centered based on visual analysis */
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
    transition: color 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
}

.input-wrapper:focus-within .input-icon {
    color: var(--color-primary);
}

/* Fine-tuning for specific icons - perfectly centered */
.input-icon.fa-envelope {
    transform: translateY(-50%) translateY(6px);
    font-size: 15px;
}

.input-icon.fa-lock {
    transform: translateY(-50%) translateY(6px);
    font-size: 16px;
}

.input-icon.fa-user {
    transform: translateY(-50%) translateY(6px);
    font-size: 16px;
}

.input-icon.fa-phone {
    transform: translateY(-50%) translateY(6px);
    font-size: 15px;
}

/* Password Toggle - Perfectly centered */
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) translateY(-7.5px); /* Perfectly centered icon */
    height: 34px;
    width: 34px;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    border-radius: 6px;
    z-index: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.password-toggle:hover {
    color: var(--color-primary);
    background-color: rgba(37, 99, 235, 0.08);
}

.password-toggle i {
    font-size: 14px;
    line-height: 1;
    display: block;
}


/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 8px;
}

.forgot-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-block {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider span {
    background: white;
    padding: 0 15px;
    color: #adb5bd;
    position: relative;
    z-index: 1;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e9ecef;
}

/* Social Auth */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    width: 100%;
    padding: 12px 24px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    color: var(--color-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.social-btn.google {
    color: #4285f4;
    border-color: #4285f4;
}

.social-btn.yandex {
    color: #fc0;
    border-color: #fc0;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 37px;
}

.switch-auth {
    color: var(--color-text-light);
    margin: 0;
}

.switch-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.switch-link:hover {
    text-decoration: underline;
}

/* Features */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature-card {
    text-align: center;
}

.feature-card i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.feature-card p {
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .auth-features {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .feature-card {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-tabs {
        padding: 3px;
    }
    
    .auth-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 10px 14px 10px 40px;
    }
    
    .form-icon {
        left: 14px;
    }
    
    /* Mobile-specific icon alignment */
    .input-icon {
        top: 50%;
        transform: translateY(-50%) translateY(6px); /* Perfectly centered for mobile */
    }
    
    .input-icon.fa-envelope {
        transform: translateY(-50%) translateY(6px);
    }
    
    .input-icon.fa-lock {
        transform: translateY(-50%) translateY(6px);
    }
    
    .input-icon.fa-user {
        transform: translateY(-50%) translateY(6px);
    }
    
    .input-icon.fa-phone {
        transform: translateY(-50%) translateY(6px);
    }
    
    .password-toggle {
        right: 14px;
        transform: translateY(-50%) translateY(-8px); /* Adjusted for mobile */
    }
    
    .feature-card {
        min-width: 100%;
    }
}

/* Error and Success Messages */
.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

.form-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.form-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.form-message.show {
    display: block;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}