
/* Authentication Page Styles */
.auth-page-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--portalThemeColor5) 0%, var(--portalThemeColor3) 100%);
}
.auth-page-wrapper #content {
    width: 100%;
    max-width: 1000px;
}
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background: var(--portalThemeColor5);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}
.auth-container > .row {
    margin: 0;
}
.auth-container .page-copy {
    display: none;
}
.auth-container .col-md-6, 
.auth-container .col-lg-6 {
    width: 100%;
}
.auth-container .page-content {
    margin-top: 0;
}
.auth-container .page-content > .row {
    margin: 0;
}
.auth-container .login-heading-section {
    display: none;
}
/* Welcome Section */
.auth-welcome-section {
    background: linear-gradient(135deg, var(--portalThemeColor1) 0%, var(--portalThemeColor4) 100%);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-welcome-content {
    text-align: center;
    color: var(--portalThemeOnColor4);
}

.auth-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--portalThemeOnColor4);
}

.auth-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

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

.auth-icon {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Form Section */
.auth-form-section {
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

/* Messages */
.auth-messages {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #059669;
}

.message-icon {
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.auth-field-group {
    margin-bottom: 24px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--portalThemeColor9);
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--portalThemeColor6);
    pointer-events: none;
    z-index: 1;
}

.auth-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--portalThemeColor3);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    color: var(--portalThemeColor9);
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--portalThemeColor4);
    background: var(--portalThemeColor5);
    box-shadow: 0 0 0 4px rgba(215, 164, 134, 0.1);
}

.auth-input.error {
    border-color: #dc2626;
    background: rgba(239, 68, 68, 0.05);
}

.auth-input.success {
    border-color: #059669;
    background: rgba(34, 197, 94, 0.05);
}

.auth-input::placeholder {
    color: var(--portalThemeColor6);
}

.auth-field-error {
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
    display: none;
}

.auth-field-error.show {
    display: block;
    animation: slideIn 0.2s ease-out;
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--portalThemeColor6);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
    z-index: 2;
}

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

/* Options Row */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

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

.auth-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--portalThemeColor4);
    cursor: pointer;
}

.auth-checkbox-text {
    font-size: 14px;
    color: var(--portalThemeColor6);
    padding: 3px 0 0 8px;
}

.auth-link {
    font-size: 14px;
    color: var(--portalThemeColor4);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--portalThemeColor9);
    text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--portalThemeColor4);
    color: var(--portalThemeOnColor4);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    position: relative;
}

.auth-submit-btn:hover:not(:disabled) {
    background: var(--portalThemeColor9);
    color: var(--portalThemeOnColor9);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

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

.btn-icon {
    transition: transform 0.3s ease;
}

.auth-submit-btn:hover:not(:disabled) .btn-icon {
    transform: translateX(4px);
}

.btn-spinner {
    animation: spin 1s linear infinite;
}

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

/* Footer */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--portalThemeColor6);
}
.auth-footer p, 
.auth-footer a {
    font-size: 14px;
}

/* External Auth */
.auth-divider {
    text-align: center;
    margin: 32px 0 24px;
    position: relative;
    font-size: 14px;
    color: var(--portalThemeColor6);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: var(--portalThemeColor7);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-external-providers {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-external-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--portalThemeColor5);
    border: 2px solid var(--portalThemeColor7);
    border-radius: 12px;
    color: var(--portalThemeColor9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 120px;
}

.auth-external-btn:hover {
    border-color: var(--portalThemeColor4);
    background: var(--portalThemeColor3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-welcome-section {
        padding: 40px;
        min-height: 200px;
    }
    
    .auth-title {
        font-size: 28px;
    }
    
    .auth-icon {
        width: 80px;
        height: 80px;
    }
    
    .auth-form-section {
        padding: 40px 20px;
    }
    
    .auth-external-providers {
        flex-direction: column;
    }
}

/* Focus Styles */
.auth-input:focus,
.auth-submit-btn:focus,
.auth-external-btn:focus {
    outline: 3px solid var(--portalThemeColor4);
    outline-offset: 2px;
}

/* Loading overlay */
.auth-form.sending {
    pointer-events: none;
    opacity: 0.8;
}


/* Additional Sign Up Specific Styles */
.auth-benefits {
    margin-top: 40px;
    text-align: left;
}

.auth-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--portalThemeOnColor4);
    font-size: 14px;
}

.auth-benefit svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.auth-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--portalThemeColor6);
}

/* Password Strength Indicator */
.auth-password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.strength-bars {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
}

.strength-bar {
    width: 40px;
    height: 4px;
    background: var(--portalThemeColor7);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.active {
    background: var(--portalThemeColor4);
}

.strength-bar.active[data-level="1"] {
    background: #EF4444;
}

.strength-bar.active[data-level="2"] {
    background: #F59E0B;
}

.strength-bar.active[data-level="3"] {
    background: #10B981;
}

.strength-bar.active[data-level="4"] {
    background: #059669;
}

.strength-text {
    font-size: 13px;
    color: var(--portalThemeColor6);
}

/* Terms Checkbox */
.auth-terms {
    margin-bottom: 24px;
}

.auth-terms .auth-checkbox-text {
    font-size: 14px;
    line-height: 1.5;
    padding: 3px 0 0 8px;
}

.auth-terms .auth-link {
    text-decoration: underline;
}

/* Validation States */
.auth-input.valid {
    border-color: #10B981;
}

.auth-input.invalid {
    border-color: #EF4444;
}

.auth-field-group.error .auth-input {
    border-color: #EF4444;
}

.auth-field-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #EF4444;
}

/* Loading State */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.auth-submit-btn:disabled .btn-text {
    animation: pulse 2s ease-in-out infinite;
}

/* Enhanced Seamless Auth Styles */
.auth-field-error.show {
    display: block;
    animation: slideInError 0.3s ease-out;
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success animation for fields */
.auth-input.success {
    border-color: #10B981;
    animation: successPulse 0.3s ease-out;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Error animation for fields */
.auth-input.error {
    border-color: #dc2626;
    animation: errorShake 0.3s ease-out;
}

@keyframes errorShake {
    0%, 20%, 40%, 60%, 80% { transform: translateX(0); }
    10%, 30%, 50%, 70% { transform: translateX(-3px); }
    15%, 35%, 55%, 75% { transform: translateX(3px); }
}

/* Loading overlay for form */
.auth-form.sending::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    z-index: 10;
    pointer-events: all;
}

.auth-form {
    position: relative;
}

/* Enhanced message styling */
.auth-messages {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    line-height: 1.5;
}

.message-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Terms validation styling */
.auth-terms.error .auth-checkbox-text {
    color: #dc2626;
}

.auth-terms.error .auth-checkbox {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Focus management */
.auth-input:focus {
    outline: none;
    border-color: var(--portalThemeColor4);
    background: var(--portalThemeColor5);
    box-shadow: 0 0 0 4px rgba(215, 164, 134, 0.1);
    transform: translateY(-1px);
}

/* Button loading state enhancement */
.auth-submit-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.auth-submit-btn .btn-spinner {
    animation: spin 1s linear infinite;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .auth-input.success,
    .auth-input.error,
    .auth-field-error.show,
    .auth-messages {
        animation: none;
    }
    
    .btn-spinner {
        animation: none;
    }
    
    .auth-icon {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-input {
        border-width: 3px;
    }
    
    .auth-input:focus {
        box-shadow: 0 0 0 3px var(--portalThemeColor4);
    }
    
    .auth-submit-btn {
        border: 2px solid var(--portalThemeOnColor4);
    }
}


/* Additional mobile improvements */
@media (max-width: 480px) {
    .auth-page-wrapper {
        padding: 20px 10px;
    }
    
    .auth-form-section {
        padding: 30px 20px;
    }
    
    .auth-welcome-section {
        padding: 30px 20px;
    }
    
    .auth-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 16px;
    }
}

/* CAPTCHA Note Styling */
.auth-captcha-note {
    padding: 16px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    margin-bottom: 24px;
}

.auth-captcha-note p {
    margin: 0;
    font-size: 14px;
    color: #856404;
    line-height: 1.5;
}

.auth-captcha-note strong {
    color: #533f03;
}