/* Authentication Pages Styles */

/* Disable page scrolling for signup page */
html, body {
    height: 100%;
    overflow: hidden;
}

/* Auth Section */
.auth-section {
    height: calc(100vh - 65px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: var(--dark-bg);
    overflow: hidden;
}

.auth-container {
    /* slightly wider container to give name fields more room */
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

/* Left Side - Brand & Features */
.auth-left {
    display: none;
}

.auth-card {
    background: var(--dark-card);
    border-radius: 16px;
    padding: 0.75rem;
    margin: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 420px;
    /* Constrain card to viewport height and avoid internal scrolling */
    /* give a little more vertical room so fields fit without clipping */
    max-height: calc(100vh - 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    animation: pulse 2s infinite;
    box-shadow: var(--shadow-purple);
}

.brand-icon i {
    font-size: 2rem;
    color: var(--white);
}

.auth-brand h1 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

/* Features List */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--dark-secondary);
    border-color: var(--primary-color);
    transform: translateX(10px);
    box-shadow: var(--shadow-purple);
}

.feature-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

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

.feature-text h3 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.feature-text p {
    color: var(--text-light);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Right Side - Auth Card */
.auth-right {
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.auth-header h2 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 0.2rem;
    margin-top: 0;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem;
    border: 1px solid rgba(139, 92, 246, 0.12);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    align-items: start;
}

/* make sure form groups don't overflow and inputs fill available width */
.form-row .form-group {
    min-width: 0;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
}

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

.form-group label {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
    margin-top: 0;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.form-group input {
    padding: 0.75rem 0.9rem;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--dark-secondary);
    color: var(--white);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--dark-secondary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group input.error {
    border-color: #ef4444;
}

.form-group input.success {
    border-color: var(--success-color);
}

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

.password-input-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.75rem;
    display: none;
}

.password-strength.active {
    display: block;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.strength-progress.weak {
    width: 33%;
    background: #ef4444;
}

.strength-progress.medium {
    width: 66%;
    background: #f59e0b;
}

.strength-progress.strong {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
}

.strength-text.weak {
    color: #ef4444;
}

.strength-text.medium {
    color: #f59e0b;
}

.strength-text.strong {
    color: var(--success-color);
}

.password-requirements {
    margin-top: 0.25rem;
}

.password-requirements small {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Error Messages */
.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.active {
    display: block;
}

/* Checkbox Group */
.checkbox-group {
    margin: 0;
    padding: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
}

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

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\2713';
    color: var(--white);
    font-size: 0.85rem;
    font-weight: bold;
}

.checkbox-text {
    color: var(--text-light);
    line-height: 1.5;
}

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

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

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 0.85rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.3));
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.btn-submit:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(236, 72, 153, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.6);
}

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .btn-text {
    display: inline;
}

.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .btn-text,
.btn-submit.loading i {
    display: none;
}

.btn-submit.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 0.4rem 0;
    padding: 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    position: relative;
    background: var(--dark-card);
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Form Row Inline (for Remember Me and Forgot Password) */
.form-row-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -0.5rem 0 0.5rem 0;
}

.form-row-inline .checkbox-group {
    margin: 0;
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

.btn-social {
    padding: 0.75rem;
    margin: 0;
    border: 1px solid var(--border-color);
    background: var(--dark-secondary);
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.3s ease;
}

.btn-social:hover {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.btn-social i {
    font-size: 1.2rem;
}

.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-google {
    background: var(--white);
    color: #3c4043;
    border: 1px solid #dadce0;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 0.4rem;
    margin-bottom: 0;
    padding-top: 0.4rem;
    padding-bottom: 0;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0;
    padding: 0;
}

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

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

/* Auth Links in Navbar */
.auth-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-links span {
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-links .btn {
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .auth-left {
        display: none;
    }
    
    .auth-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .auth-section {
        padding: 1rem 0;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .auth-header h2 {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .auth-links span {
        display: none;
    }
}
