/* Authentication Pages Styles */

/* Back to Home Button */
.back-to-home-section {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.back-btn i {
    font-size: 14px;
}

/* Auth Section */
.auth-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    padding: 8rem 0 2rem 0; /* Added top padding to account for fixed header */
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><-circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: clamp(1.5rem, 5vw, 3rem);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    animation: slideUp 0.6s ease-out;
    margin-top: 1rem; /* Slight adjustment for better visual balance */
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    margin-bottom: 2rem;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.auth-logo .logo-square {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    margin: 0 auto;
    background: linear-gradient(135deg, #deb56a, #c9a052);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(222, 181, 106, 0.3);
    animation: pulse 2s infinite;
}

.auth-logo .logo-text {
    font-size: clamp(1.5rem, 8vw, 2rem);
    font-weight: 800;
    color: white;
}

.auth-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #7f8c8d;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 0;
}

/* Form Styles */
.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
}

.form-label i {
    color: #deb56a;
    width: clamp(14px, 3vw, 16px);
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 3vw, 1rem);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    border-color: #deb56a;
    box-shadow: 0 0 0 0.2rem rgba(222, 181, 106, 0.25);
    background: white;
}

.form-control.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

/* Password Input */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #deb56a;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #e74c3c;
}

.strength-fill.fair {
    width: 50%;
    background: #deb56a;
}

.strength-fill.good {
    width: 75%;
    background: #3498db;
}

.strength-fill.strong {
    width: 100%;
    background: #27ae60;
}

.strength-text {
    font-size: 0.875rem;
    color: #7f8c8d;
}

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

.form-check {
    margin-bottom: 0;
}

.form-check-input {
    border: 2px solid #e9ecef;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: #deb56a;
    border-color: #deb56a;
}

.form-check-label {
    color: #2c3e50;
    font-size: 0.9rem;
}

.forgot-password {
    color: #deb56a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #c9a052;
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    background: linear-gradient(135deg, #deb56a, #c9a052);
    border: none;
    border-radius: 12px;
    padding: clamp(0.6rem, 2vw, 0.75rem) clamp(1rem, 4vw, 1.5rem);
    font-weight: 600;
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #c9a052, #b8943a);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(222, 181, 106, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}


/* Auth Footer */
.auth-footer {
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    color: #7f8c8d;
    margin-bottom: 0;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
}

.auth-link {
    color: #deb56a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #c9a052;
    text-decoration: underline;
}

.terms-link {
    color: #deb56a;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    color: #c9a052;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-section {
        padding: 8rem 0 1rem 0; /* Maintain proper spacing on mobile */
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-logo .logo-square {
        width: 60px;
        height: 60px;
    }
    
    .auth-logo .logo-text {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

}

@media (max-width: 576px) {
    .auth-section {
        padding: 8rem 0 1rem 0; /* Slightly less padding on very small screens */
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 0.6rem 0.8rem;
    }
    
    .auth-btn {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success States */
.form-control.is-valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 0.2rem rgba(39, 174, 96, 0.25);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Error States */
.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message i {
    font-size: 0.75rem;
}

/* Success States */
.success-message {
    color: #27ae60;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message i {
    font-size: 0.75rem;
}

