@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Font Awesome 5 Free';
    src: url('../fonts/awesome-5x/fa-solid-900.woff2') format('woff2'),
         url('../fonts/awesome-5x/fa-solid-900.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


/* Auth Main */
.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(17, 24, 39, 0.78), rgba(37, 99, 235, 0.55)),
                url('../img/about_hero_banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(110%);
    transform: scale(1.02);
    z-index: 0;
}
body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #374151;
    background: #ffffff;
}

.page-content {
    background: #ffffff;
}

.auth-section {
    padding: 80px 0;
}

.auth-panel {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: transparent;
}

.auth-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 5px;
    justify-content: center;
    align-items: center;
    text-align: center;

}

.auth-subheading {
    font-size: 16px;
    color: #6B7280;
    margin-bottom: 32px;
}

.page-title-main {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label,
.form-group label {
    font-weight: 600;
    color: #1F2937;
    font-size: 14px;
}

.form-group label .required {
    color: #DC2626;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    color: #111827;
}

.form-control::placeholder {
    color: #9CA3AF;
}

.form-control:focus {
    outline: none;
    border-color: #356DF1;
    box-shadow: 0 0 0 3px rgba(53, 109, 241, 0.12);
}

.form-control.readonly {
    background: #EEF2FF;
    border-color: #C7D2FE;
    color: #4338CA;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
}

.password-toggle i,
.password-toggle svg {
    font-size: 20px;
    line-height: 1;
    color: inherit;
    width: 1.1em;
    height: 1.1em;
}

.password-toggle-icon {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-icon::before {
    content: "\f06e";
}

.password-toggle-icon.is-hidden::before {
    content: "\f070";
}

.password-toggle:hover,
.password-toggle:focus {
    color: #111827;
}

.remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B7280;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #356DF1;
}

.forgot-password {
    font-weight: 600;
    color: #356DF1;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: none;
    font-size: 16px;

    cursor: pointer;
    background-color: #356DF1;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.auth-submit-btn:hover {
    background-color: #000000;
    color: white;
    transform: translateY(-1px);
}

.register-link {
    margin-top: 20px;
    font-size: 14px;
    color: #6B7280;
    text-align: center;
}

.register-link a {
    font-weight: 600;
    color: #356DF1;
    text-decoration: none;
}

.register-link a:hover {
    color: black;
    transform: translateY(-1px);
    cursor: pointer;
}

.role-demo {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}

.role-demo-text {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 12px;
}

.demo-toggle {
    background: none;
    border: 2px solid #356DF1;
    color: #356DF1;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.demo-toggle:hover {
    background: #356DF1;
    color: #ffffff;
}

.role-selector {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.role-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.role-option:hover,
.role-option.active {
    border-color: #356DF1;
    background: #EEF2FF;
}

.role-option input[type="radio"] {
    accent-color: #356DF1;
}

.role-option label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.role-option label strong {
    font-weight: 600;
    color: #1F2937;
}

.role-option label small {
    font-size: 12px;
    color: #6B7280;
    font-weight: 400;
}

.role-option.active label small {
    color: #356DF1;
}

.demo-instructions {
    margin-top: 16px;
    padding: 12px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 8px;
    font-size: 13px;
    color: #0369A1;
}

.demo-instructions p {
    margin: 0 0 6px 0;
}

.demo-instructions p:last-child {
    margin-bottom: 0;
}

.demo-instructions strong {
    font-weight: 600;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #047857;
}

.hidden {
    display: none !important;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.ref-code-info {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    font-size: 13px;
    color: #047857;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-code-info--hint {
    background: #FEF8E7;
    border-color: #FDE68A;
    color: #92400E;
    flex-wrap: wrap;
}

.ref-code-action {
    background: none;
    border: none;
    font-weight: 600;
    color: #356DF1;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.ref-code-action--danger {
    color: #DC2626;
}

.password-strength {
    font-size: 12px;
    margin-top: 6px;
}

.strength-weak { color: #DC2626; }
.strength-medium { color: #D97706; }
.strength-strong { color: #059669; }

.social-register {
    margin-top: 12px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #6B7280;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #356DF1;
}

.terms-checkbox a {
    color: #356DF1;
    font-weight: 700;
    text-decoration: none;
}

.terms-checkbox a:hover {
    color: #356DF1 !important;
    text-decoration: none !important;
    cursor: pointer;
}

@media (max-width: 768px) {
    .auth-section {
        padding: 60px 0;
    }

    .form-row {
        flex-direction: column;
    }

    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-heading {
        font-size: 28px;
    }

    .page-title-main {
        font-size: 30px;
    }

    .social-buttons {
        flex-direction: column;
    }
}


/* Step Indicator for Forgot Password */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.step span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E5E7EB;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active span {
    background: #356DF1;
    color: white;
}

.step.completed span {
    background: #059669;
    color: white;
}

.step p {
    font-size: 12px;
    color: #6B7280;
    margin: 0;
    font-weight: 500;
}

.step.active p {
    color: #356DF1;
    font-weight: 600;
}

.step.completed p {
    color: #059669;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #E5E7EB;
    margin: 0 16px;
    margin-bottom: 20px;
}

.forgot-info {
    margin-top: 20px;
    padding: 16px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 10px;
    font-size: 14px;
    color: #0369A1;
    text-align: center;
}

.forgot-actions {
    margin-top: 16px;
    text-align: center;
}

.code-input {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    .step-indicator {
        padding: 0 10px;
    }
    
    .step span {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .step p {
        font-size: 11px;
    }
    
    .step-line {
        width: 40px;
        margin: 0 8px;
        margin-bottom: 16px;
    }
    
    .code-input {
        font-size: 20px;
        letter-spacing: 4px;
    }
}

/* Enhanced Security Features */

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.strength-text {
    font-weight: 600;
    margin-right: 8px;
}

.strength-weak .strength-text {
    color: #dc2626;
}

.strength-medium .strength-text {
    color: #f59e0b;
}

.strength-strong .strength-text {
    color: #059669;
}

.requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
}

.req-met {
    color: #059669;
}

.req-unmet {
    color: #6b7280;
}

/* Password Match Indicator */
.password-match {
    margin-top: 4px;
    font-size: 12px;
}

.match-success {
    color: #059669;
    font-weight: 500;
}

.match-error {
    color: #dc2626;
    font-weight: 500;
}

/* Password Requirements */
.password-requirements {
    margin-top: 4px;
}

.password-requirements small {
    color: #6b7280;
    font-size: 11px;
    line-height: 1.4;
}

/* Rate Limiting Warning */
.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-warning strong {
    font-weight: 600;
}

/* Enhanced Form Validation - Only show colors on user interaction */
.form-control:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control:valid:not(:placeholder-shown) {
    border-color: #059669;
}

/* CSRF Protection Indicator */
.csrf-protected::after {
    content: "🔒";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    opacity: 0.5;
}

/* Session Timeout Warning */
.session-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 300px;
}

/* Enhanced Button States */
.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary:disabled:hover {
    background-color: #9ca3af;
    transform: none;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Security Indicators */
.security-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

.security-indicator::before {
    content: "🛡️";
    margin-right: 4px;
}

/* Enhanced Error Messages */
.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-error ul {
    margin: 0;
    padding-left: 16px;
}

.alert-error li {
    margin-bottom: 4px;
}

/* Success Messages */
.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* Mobile Responsiveness for Security Features */
@media (max-width: 768px) {
    .requirements {
        flex-direction: column;
        gap: 2px;
    }
    
    .session-warning {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .password-requirements small {
        font-size: 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .password-strength {
        color: #d1d5db;
    }
    
    .req-unmet {
        color: #9ca3af;
    }
    
    .password-requirements small {
        color: #9ca3af;
    }
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Indicators */
.form-control:focus,
.btn-primary:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .strength-weak .strength-text {
        color: #000000;
        background-color: #ff0000;
        padding: 2px 4px;
    }
    
    .strength-medium .strength-text {
        color: #000000;
        background-color: #ffff00;
        padding: 2px 4px;
    }
    
    .strength-strong .strength-text {
        color: #ffffff;
        background-color: #008000;
        padding: 2px 4px;
    }
}
/* Field Error Styles */
.field-error {
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.field-error::before {
    content: "⚠";
    font-size: 14px;
    color: #ef4444;
    margin-top: 4px;
    display: block;
}

.form-control.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}
/* Agent Role Selection Styles */
.role-selection {
    margin: 1.5rem 0;
}

.role-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-option {
    position: relative;
}

.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-label {
    display: block;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.role-label:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.role-option input[type="radio"]:checked + .role-label {
    border-color: #007bff;
    background: #e7f3ff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.role-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.role-info p {
    margin: 0 0 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.role-note {
    color: #007bff;
    font-style: italic;
    font-size: 0.8rem;
}

/* Agent Info Section */
.agent-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.agent-info .form-help {
    color: #007bff;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.agent-info .form-control {
    border-color: #007bff;
}

.agent-info .form-control:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Error states for agent email */
.agent-info .form-control.error {
    border-color: #dc3545;
}

.agent-info .field-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Responsive design for role selection */
@media (min-width: 768px) {
    .role-options {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .role-option {
        flex: 1;
    }
}

/* Animation for agent info appearance */
.agent-info {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced form styling for agent registration */
.auth-form .role-selection .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* Success state for valid agent email */
.agent-info .form-control.valid {
    border-color: #28a745;
}

.agent-info .form-control.valid:focus {
    border-color: #1e7e34;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Radio Button Styles for Account Type */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.radio-option label {
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    margin: 0;
}

.radio-option input[type="radio"]:checked + label {
    color: #2563eb;
    font-weight: 600;
}

/* Gmail requirement notice */
.gmail-notice {
    margin-top: 5px;
}

.gmail-notice small {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Error styling for email field */
.form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.email-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}