/* Authentication Pages Styles */

/* Modern Auth Navbar */
.auth-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    height: 70px;
}

.auth-navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.auth-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.auth-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: #495057;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-nav-link:hover {
    background: rgba(0, 140, 21, 0.08);
    color: #008C15;
}

.auth-nav-link i {
    font-size: 14px;
}

.auth-nav-link span {
    display: inline;
}

.auth-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.auth-btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 3px 12px rgba(0, 140, 21, 0.25);
}

.auth-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(0, 140, 21, 0.35);
    color: white;
}

.auth-nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    background: rgba(108, 117, 125, 0.08);
    transition: all 0.2s ease;
}

.auth-nav-icon:hover {
    background: rgba(0, 140, 21, 0.1);
    color: #008C15;
    transform: scale(1.05);
}

.auth-nav-icon i {
    font-size: 16px;
}

/* Modern Bottom Navigation (Mobile) - Matching Index Design */
.auth-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(248, 249, 250, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.03);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    display: none;
    z-index: 999;
    max-width: 100vw;
}

.auth-bottom-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    text-decoration: none;
    color: #6c757d;
    position: relative;
    min-width: 0;
}

.auth-bottom-icon {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
}

.auth-bottom-item i {
    font-size: 20px;
    color: #6c757d;
    display: block;
}

.auth-bottom-label {
    font-size: 11px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    color: #6c757d;
    letter-spacing: 0.1px;
}

.auth-bottom-item.active i,
.auth-bottom-item:hover i {
    color: #008C15;
}

.auth-bottom-item.active .auth-bottom-label,
.auth-bottom-item:hover .auth-bottom-label {
    color: #008C15;
    font-weight: 600;
}

.auth-bottom-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: #008C15;
    border-radius: 0 0 3px 3px;
}

.auth-section {
    min-height: 100vh;
    padding: 50px 0 50px;
    background: var(--primary-color);
    position: relative;
    margin-top: 70px;
}

.auth-section::before {
    display: none;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.auth-left {
    color: var(--white);
    display: flex;
    align-items: center;
}

.auth-content {
    width: 100%;
}

.auth-content h1 {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.auth-content p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    font-size: 1rem;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.auth-feature:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
}

.auth-feature .feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-feature .feature-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.auth-feature .feature-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-feature .feature-text strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.auth-feature .feature-text span {
    font-size: 0.9rem;
    opacity: 0.85;
    color: var(--white);
}

/* Legacy support for old structure */
.auth-feature i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.auth-testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-testimonial p {
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author div {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    font-weight: 600;
}

.testimonial-author span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.auth-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-primary);
    color: var(--white);
}

.stat-item span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.auth-quote {
    text-align: center;
    position: relative;
}

.auth-quote i {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 15px;
}

.auth-quote p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.auth-quote cite {
    font-size: 0.9rem;
    opacity: 0.8;
}

.auth-right {
    display: flex;
    justify-content: center;
}

.auth-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

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

.auth-header h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--gray);
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 16px 18px;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 140, 21, 0.1);
    transform: translateY(-1px);
}

/* Remove red outline from invalid inputs */
.form-group input:invalid {
    border-color: #e1e5e9;
    box-shadow: none;
}

.password-input {
    position: relative;
    width: 100%;
}

.password-input input {
    padding-right: 50px; /* Make room for the toggle button */
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gray);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--white);
    font-size: 0.8rem;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.form-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .form-error {
    display: block;
}

.form-group.error input,
.form-group.error select {
    border-color: #e74c3c;
}

.btn-full {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
}

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

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

.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

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

.auth-divider span {
    background: var(--white);
    padding: 0 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-social {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    background: var(--white);
    color: var(--dark-gray);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-social:hover {
    border-color: var(--primary-color);
    background: var(--light-gray);
}

.btn-social.google:hover {
    border-color: #db4437;
    background: rgba(219, 68, 55, 0.1);
}

.btn-social.facebook:hover {
    border-color: #4267b2;
    background: rgba(66, 103, 178, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.auth-footer p {
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        gap: 40px;
    }
    
    .auth-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    /* Auth Navbar Mobile - Matching Index Design */
    .auth-navbar {
        height: 64px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    
    .auth-navbar-container {
        padding: 0 20px;
        justify-content: center;
        position: relative;
    }
    
    .auth-nav-logo {
        width: 100%;
        justify-content: center;
        position: relative;
    }
    
    .auth-logo-img {
        height: 40px;
        max-width: 180px;
        object-fit: contain;
    }
    
    .auth-nav-actions {
        display: none;
    }
    
    /* Auth Bottom Nav Removed */
    .auth-bottom-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .auth-section {
        padding: 80px 0 60px;
        margin-top: 64px;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Hide welcome section on mobile - show only form */
    .auth-left {
        display: none;
    }
    
    .auth-right {
        width: 100%;
        max-width: 100%;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .auth-form-container {
        padding: 30px 20px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
    .auth-bottom-nav {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 480px) {
    .auth-navbar {
        height: 64px;
    }
    
    .auth-navbar-container {
        padding: 0 16px;
    }
    
    .auth-logo-img {
        height: 38px;
    }
    
    .auth-section {
        padding: 75px 0 50px;
        margin-top: 64px;
    }
    
    .auth-container {
        gap: 0;
    }
    
    .auth-right {
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    .auth-content h1 {
        font-size: 1.8rem;
    }
    
    .auth-form-container {
        padding: 25px 15px;
        margin: 0 auto;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-full {
        padding: 12px;
    }
    
    .auth-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item strong {
        font-size: 1.5rem;
    }
}
