/* Authentication Pages - Sign In, Sign Up, Forgot Password */

.signin-hero,
.signup-hero,
.forgot-password-hero {
    background: linear-gradient(135deg, #1b3b69 0%, #4472ca 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    position: relative;
    z-index: 100;
}

.auth-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-content-simple {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 50vh;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 650px;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.auth-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.15rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

/* Password fields need right padding for toggle button */
.form-group input[type="password"] {
    padding-right: 3rem;
}

.form-group input:focus {
    outline: none;
    border-color: #4472ca;
    background: white;
    box-shadow: 0 0 0 3px rgba(68, 114, 202, 0.1);
}

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

.form-group input.success {
    border-color: #10b981;
    background: #f0fdf4;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.25rem;
    font-size: 1.1rem;
    color: #666;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #666;
    padding: 0;
    transition: color 0.3s ease;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
    margin: 0.1rem 0;
}

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

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #4472ca;
    border-color: #4472ca;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

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

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

.auth-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.auth-button.primary {
    background: linear-gradient(135deg, #1b3b69 0%, #4472ca 100%);
    color: white;
}

.auth-button.primary:hover {
    background: linear-gradient(135deg, #0f2a4a 0%, #3a5ba0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 59, 105, 0.3);
}

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

.auth-button.secondary {
    background: white;
    color: #333;
    border: 2px solid #e1e5e9;
}

.auth-button.secondary:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.auth-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-button.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.button-icon {
    font-size: 1.2rem;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 1rem 0;
}

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

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

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

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #4472ca;
    text-decoration: none;
    font-weight: 500;
}

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

.auth-benefits {
    color: white;
    align-self: center;
}

.auth-benefits h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: white;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.benefit-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.benefit-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: white;
}

.benefit-text p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

/* Security Info Section */
.security-info {
    background: #f8fafc;
    padding: 3rem 0;
}

.security-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.security-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Select Styling */
.form-group select {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #4472ca;
    background: white;
    box-shadow: 0 0 0 3px rgba(68, 114, 202, 0.1);
}

/* Terms and Privacy links */
.checkbox-label a {
    color: #4472ca;
    text-decoration: none;
}

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

/* Error message styling */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Responsive Design */

.security-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.security-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.security-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

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

.error-message::before {
    content: '⚠️';
    font-size: 0.875rem;
}

.success-message {
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message::before {
    content: '✓';
    font-size: 0.875rem;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .signin-hero,
    .signup-hero,
    .forgot-password-hero {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .auth-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .auth-content-simple {
        padding: 0 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0 auto;
    }
    
    .auth-benefits {
        order: -1;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .benefits-list li {
        margin-bottom: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .security-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .security-item {
        padding: 1.5rem;
    }
    
    /* Ensure footer bottom alignment on auth pages only */
    .signin-hero .footer-bottom,
    .signup-hero .footer-bottom,
    .forgot-password-hero .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .signin-hero .footer-links,
    .signup-hero .footer-links,
    .forgot-password-hero .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .form-group input {
        padding: 0.75rem 1rem;
        padding-left: 2.75rem;
    }
    
    .input-icon {
        top: 2.25rem;
        font-size: 1rem;
    }
    
    .password-toggle {
        top: 2.25rem;
        font-size: 1rem;
    }
}
