/* ===== AUTH PAGES STYLES ===== */
.auth-page {
    min-height: 100vh;
    background: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: var(--color-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-height: 700px;
}

/* Left Side - Form */
.auth-form-container {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-light);
}

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

.auth-logo img {
    height: 40px;
    width: auto;
}

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

.auth-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.social-btn {
    padding: 14px 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    background: var(--color-light);
    color: var(--color-dark);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn.google-btn:hover {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

.social-btn.facebook-btn:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

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

.divider span {
    position: relative;
    background: var(--color-light);
    padding: 0 15px;
    color: var(--color-gray);
    font-size: 14px;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.form-label i {
    color: var(--color-primary);
    font-size: 13px;
}

.input-group {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 15px;
    background: var(--color-light);
    color: var(--color-dark);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.1);
}

.form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(205, 23, 35, 0.1);
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray);
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

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

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

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

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkmark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label.required .checkbox-text::after {
    content: '*';
    color: var(--color-danger);
    margin-left: 3px;
}

.forgot-link {
    color: var(--color-primary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forgot-link:hover {
    color: var(--color-blue-dark);
    text-decoration: underline;
}

/* Password Requirements */
.password-requirements {
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 10px;
    display: none;
}

.password-requirements.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.requirements-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.requirements-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.requirements-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-gray);
}

.requirements-list li i {
    font-size: 6px;
    transition: all 0.3s ease;
}

.requirements-list li.valid i {
    color: #28a745;
}

.requirements-list li.valid span {
    color: #28a745;
    text-decoration: line-through;
}

.requirements-list li.invalid i {
    color: var(--color-danger);
}

/* Password Strength */
.password-strength {
    margin-top: 10px;
    display: none;
}

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

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

.strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: var(--color-danger);
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: var(--color-gray);
}

/* Password Match */
.password-match {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-danger);
    margin-top: 5px;
    opacity: 0;
    transition: all 0.3s ease;
}

.password-match.valid {
    color: #28a745;
    opacity: 1;
}

.password-match.invalid {
    color: var(--color-danger);
    opacity: 1;
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.primary-btn {
    background: var(--color-primary);
    color: var(--color-light);
}

.primary-btn:hover:not(:disabled) {
    background: var(--color-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 150, 190, 0.3);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.secondary-btn {
    background: var(--color-bg-light);
    color: var(--color-dark);
    border: 1px solid var(--color-border);
}

.secondary-btn:hover {
    background: var(--color-light);
    box-shadow: var(--box-shadow);
}

.btn-spinner {
    display: none;
}

.auth-btn.loading .btn-text {
    opacity: 0;
}

.auth-btn.loading .btn-spinner {
    display: block;
    position: absolute;
}

/* Terms Agreement */
.terms-agreement {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.terms-agreement p {
    font-size: 13px;
    color: var(--color-gray);
    text-align: center;
    line-height: 1.5;
}

.terms-agreement a {
    color: var(--color-primary);
    text-decoration: none;
}

.terms-agreement a:hover {
    text-decoration: underline;
}

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

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

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

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

/* Right Side - Illustration */
.auth-illustration {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-blue-dark) 100%);
    color: var(--color-light);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-illustration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
}

.illustration-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    text-align: center;
}

.illustration-image {
    margin-bottom: 30px;
}

.illustration-image img {
    max-width: 300px;
    height: auto;
}

.illustration-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-light);
}

.illustration-text p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Features/Benefits */
.illustration-features,
.illustration-benefits {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.feature-item i {
    font-size: 20px;
    color: var(--color-light);
    opacity: 0.9;
}

.feature-item span {
    font-size: 15px;
    color: var(--color-light);
    font-weight: 500;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    text-align: left;
}

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

.benefit-icon i {
    font-size: 22px;
    color: var(--color-light);
}

.benefit-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--color-light);
}

.benefit-content p {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
    line-height: 1.5;
}

/* Theme Toggle for Auth */
.theme-toggle-auth {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.theme-toggle-auth button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-light);
    color: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-auth button:hover {
    background: var(--color-primary);
    color: var(--color-light);
    transform: scale(1.1);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 10px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 8px;
    font-size: 13px;
    color: var(--color-danger);
}

/* Progress Bar */
.progress {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-danger);
    transition: width 0.3s ease;
}

/* Modals */
.loading-modal,
.verification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.loading-modal.active,
.verification-modal.active {
    display: flex;
}

.loading-content {
    background: var(--color-light);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 300px;
}

.loading-spinner {
    font-size: 40px;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.loading-text {
    font-size: 16px;
    color: var(--color-dark);
    font-weight: 500;
}

.verification-modal .modal-content {
    background: var(--color-light);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-gray);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.verification-icon {
    font-size: 60px;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.verification-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

/* Form Text */
.form-text {
    font-size: 12px;
    color: var(--color-gray);
    margin-top: 5px;
    display: block;
}

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

/* ===== RESPONSIVE STYLES ===== */

/* Tablet */
@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 600px;
        min-height: auto;
    }
    
    .auth-illustration {
        display: none;
    }
    
    .auth-form-container {
        padding: 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .auth-page {
        padding: 10px;
    }
    
    .auth-form-container {
        padding: 25px 20px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .social-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .form-control {
        padding: 12px 40px 12px 12px;
        font-size: 14px;
    }
    
    .auth-btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .theme-toggle-auth {
        top: 10px;
        right: 10px;
    }
    
    .theme-toggle-auth button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .verification-actions {
        flex-direction: column;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .auth-form-container {
        padding: 20px 15px;
    }
    
    .auth-title {
        font-size: 22px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .feature-item,
    .benefit-item {
        padding: 12px;
    }
    
    .benefit-icon {
        width: 40px;
        height: 40px;
    }
    
    .benefit-icon i {
        font-size: 18px;
    }
}

/* Dark Mode Support */
.dark-mode .auth-container {
    background: var(--color-dark);
}

.dark-mode .auth-form-container {
    background: var(--color-dark);
}

.dark-mode .auth-title {
    color: var(--color-light);
}

.dark-mode .auth-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-light);
}

.dark-mode .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-primary);
}

.dark-mode .divider span {
    background: var(--color-dark);
}

.dark-mode .social-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-light);
}

.dark-mode .checkbox-label {
    color: rgba(255, 255, 255, 0.8);
}

.dark-mode .terms-agreement p,
.dark-mode .auth-footer p {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .requirements-title {
    color: var(--color-light);
}

.dark-mode .requirements-list li {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .theme-toggle-auth button {
    background: var(--color-dark);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-light);
}

/* High Contrast Mode */
.high-contrast .auth-container {
    border: 2px solid #fff;
}

.high-contrast .form-control {
    border: 2px solid #fff;
    background: #000;
    color: #fff;
}

.high-contrast .form-control:focus {
    border-color: #ffff00;
    box-shadow: 0 0 0 3px rgba(255, 255, 0, 0.3);
}

.high-contrast .social-btn {
    border: 2px solid #fff;
}

.high-contrast .checkmark {
    border: 2px solid #fff;
}

.high-contrast .primary-btn {
    background: #ffff00;
    color: #000;
    border: 2px solid #ffff00;
}

.high-contrast .primary-btn:hover:not(:disabled) {
    background: #000;
    color: #ffff00;
}

.high-contrast .theme-toggle-auth button {
    border: 2px solid #fff;
}


/* Additional Styles for Improved Auth Pages */

/* Form label group */
.form-label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* Illustration tips */
.illustration-tips {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.tip-item i {
    font-size: 18px;
    color: #ffd700;
    flex-shrink: 0;
}

.tip-item span {
    font-size: 14px;
    color: var(--color-light);
    opacity: 0.9;
    line-height: 1.4;
}

/* Success message */
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success i {
    color: #28a745;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .illustration-tips {
        margin-top: 20px;
    }
    
    .tip-item {
        padding: 10px;
    }
    
    .tip-item span {
        font-size: 13px;
    }
}

/* Animation for form */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-container {
    animation: slideIn 0.5s ease;
}

/* Focus styles for better accessibility */
.form-control:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Loading state for buttons */
.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dark mode adjustments */
.dark-mode .tip-item {
    background: rgba(0, 0, 0, 0.2);
}

.dark-mode .tip-item i {
    color: #ffcc00;
}

/* High contrast mode */
.high-contrast .form-control {
    border: 2px solid #fff;
}

.high-contrast .form-control:focus {
    outline: 3px solid #ffff00;
    border-color: #ffff00;
}

.high-contrast .tip-item {
    border: 2px solid #fff;
}