

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body.login-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Full-page centering - Override Keycloak positioning */
.login-applus-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    padding: 20px !important;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
    width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
}

/* The main login card */
.login-applus-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid #e0e0e0;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Logo styling */
.login-logo {
    margin-bottom: 20px;
}

.login-logo img {
    max-height: 60px;
    width: auto;
}

/* Description text */
.login-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* Form styles */
form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Prevent overflow in form elements */
form * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Input groups */
.form-group {
    margin-bottom: 20px;
}

/* Labels */
.form-label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

/* Input boxes */


/* Password field with toggle button */
.password-group {
    position: relative;
}

.password-group .form-control {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

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

.toggle-password:focus {
    outline: 2px solid #f26122;
    outline-offset: 2px;
}

/* Remember me checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

/* Submit button */
.login-button {
    background-color: #f26122;
    border: none;
    color: white;
    width: 100%;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.login-button:hover {
    background-color: #e5551a;
    transform: translateY(-1px);
}

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

.login-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

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

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

.divider span {
    background: #ffffff;
    padding: 0 15px;
    font-size: 13px;
    color: #666;
    position: relative;
    z-index: 1;
}

/* Social providers styling - Icon-only version */
.social-providers {
    margin-bottom: 25px;
}

.social-icons-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #d0d0d0;
    border-radius: 50%;
    background-color: #ffffff;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.social-icon-btn:focus {
    outline: 2px solid #f26122;
    outline-offset: 2px;
}

.social-icon-btn.loading {
    pointer-events: none;
}

.social-icon-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Provider-specific colors */
.microsoft-btn {
    border-color: #0078d4;
    color: #0078d4;
}

.microsoft-btn:hover {
    background-color: #0078d4;
    color: white;
    border-color: #0078d4;
}

.google-btn {
    border-color: #4285f4;
    color: #4285f4;
}

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

.github-btn {
    border-color: #333;
    color: #333;
}

.github-btn:hover {
    background-color: #333;
    color: white;
    border-color: #333;
}

.facebook-btn {
    border-color: #1877f2;
    color: #1877f2;
}

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

.apple-btn {
    border-color: #000;
    color: #000;
}

.apple-btn:hover {
    background-color: #000;
    color: white;
    border-color: #000;
}

.linkedin-btn {
    border-color: #0077b5;
    color: #0077b5;
}

.linkedin-btn:hover {
    background-color: #0077b5;
    color: white;
    border-color: #0077b5;
}

.other-btn {
    border-color: #6c757d;
    color: #6c757d;
}

.other-btn:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* Email help text styling */
.input-helper-text {
    font-size: 13px;
    line-height: 1.4;
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-helper-text.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

.input-helper-text.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.input-helper-text.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.input-helper-text i {
    font-size: 14px;
    flex-shrink: 0;
}

/* Error highlight for form fields */
.form-control.error-highlight {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Smart Microsoft button states */
.microsoft-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
}

.microsoft-btn.disabled:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.microsoft-btn.work-detected {
    border-color: #0078d4;
    background-color: #e3f2fd;
}

.microsoft-btn.personal-detected {
    border-color: #00a1f1;
    background-color: #e1f5fe;
}

/* Organization selector */
.organization-selector {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.org-selector-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.org-selector-content h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.org-help-text {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

.org-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.org-option-btn {
    padding: 16px 20px;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.org-option-btn:hover {
    border-color: #f26122;
    background-color: #fff;
    transform: translateY(-1px);
}

.org-option-btn i {
    font-size: 24px;
    width: 30px;
    text-align: center;
}

.work-btn {
    border-color: #0078d4;
    color: #0078d4;
}

.work-btn:hover {
    background-color: #e3f2fd;
}

.personal-btn {
    border-color: #00a1f1;
    color: #00a1f1;
}

.personal-btn:hover {
    background-color: #e1f5fe;
}

.org-option-btn span {
    font-weight: 600;
    display: block;
}

.org-option-btn small {
    font-size: 12px;
    opacity: 0.8;
    font-weight: normal;
}

.cancel-selection {
    background: none;
    border: 1px solid #6c757d;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-selection:hover {
    background-color: #6c757d;
    color: white;
}

/* Tooltip for single providers - Fixed positioning */
.social-icon-btn::before {
    content: attr(title);
    position: absolute;
    bottom: -45px; /* Changed from 120% to below the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.social-icon-btn::after {
    content: '';
    position: absolute;
    bottom: -35px; /* Arrow pointing up to button */
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #333; /* Arrow pointing up */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.social-icon-btn:hover::before,
.social-icon-btn:hover::after {
    opacity: 1;
}

/* Ensure tooltip stays visible even when near viewport edges */
.social-icons-row {
    position: relative;
    z-index: 1;
    padding: 10px 0 10px 0; /* Add bottom padding for tooltip space */
}

/* Footer links */
.login-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.forgot-password-link {
    display: inline-block;
    color: #f26122;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #e5551a;
    text-decoration: underline;
}

.signup-link {
    font-size: 14px;
    color: #666;
}

.signup-link a {
    color: #f26122;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #e5551a;
    text-decoration: underline;
}

/* Focus management for accessibility */
.form-control:focus,
.form-check-input:focus,
.login-button:focus,
.social-icon-btn:focus {
    outline: 2px solid #f26122;
    outline-offset: 2px;
}

/* Error message styling */
.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
}

/* Form validation states */
.form-control[aria-invalid="true"] {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.form-control.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Hide default Keycloak social providers section */
#kc-social-providers {
    display: none !important;
}


/* Ensure the alert messages appear correctly */
.alert {
    position: static !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: left;
    box-sizing: border-box !important;
    
    /* Alert styling */
    display: flex !important;
    align-items: center !important;
    padding: 14px 16px !important;
    border-radius: 8px !important;
    border: 1px solid !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    gap: 10px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Default alert style - error/danger */
.alert,
.alert.alert-error,
.alert.alert-danger,
.alert.pf-m-danger {
    color: #842029 !important;
    background-color: #f8d7da !important;
    border-color: #dc3545 !important;
    border-width: 1px !important;
    border-left-width: 4px !important;
}

/* Error alert icon color - using deeper red */
.alert .pf-c-alert__icon,
.alert .pf-c-alert__icon *,
.alert.alert-error .pf-c-alert__icon,
.alert.alert-error .pf-c-alert__icon *,
.alert.alert-danger .pf-c-alert__icon,
.alert.alert-danger .pf-c-alert__icon *,
.alert.pf-m-danger .pf-c-alert__icon,
.alert.pf-m-danger .pf-c-alert__icon *,
.alert i:first-child,
.alert svg:first-child {
    color: #c92a2a !important;
    fill: #c92a2a !important;
}

.alert.alert-success,
.alert.pf-m-success {
    color: #0f5132 !important;
    background-color: #d1e7dd !important;
    border-color: #198754 !important;
    border-left-width: 4px !important;
}

.alert.alert-success .pf-c-alert__icon,
.alert.pf-m-success .pf-c-alert__icon {
    color: #198754 !important;
    fill: #198754 !important;
}

.alert.alert-warning,
.alert.pf-m-warning {
    color: #664d03 !important;
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    border-left-width: 4px !important;
}

.alert.alert-warning .pf-c-alert__icon,
.alert.pf-m-warning .pf-c-alert__icon {
    color: #997404 !important;
    fill: #997404 !important;
}

.alert.alert-info,
.alert.pf-m-info {
    color: #055160 !important;
    background-color: #cff4fc !important;
    border-color: #0dcaf0 !important;
    border-left-width: 4px !important;
}

.alert.alert-info .pf-c-alert__icon,
.alert.pf-m-info .pf-c-alert__icon {
    color: #0dcaf0 !important;
    fill: #0dcaf0 !important;
}

/* Icon styling in alerts */
.alert .pf-c-alert__icon,
.alert i,
.alert svg {
    flex-shrink: 0 !important;
    font-size: 18px !important;
}

/* Ensure message text wraps properly */
.alert > span,
.alert > div {
    flex: 1 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Override for alerts inside the login card */
.login-applus-card .alert {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Broker Login Styles */
.broker-link-content,
.broker-email-content {
    text-align: center;
    padding: 20px 0;
}

.broker-link-icon,
.broker-email-icon {
    margin-bottom: 20px;
}

.broker-link-icon i {
    font-size: 48px;
    color: #f26122;
}

.broker-email-icon i {
    font-size: 48px;
    color: #17a2b8;
}

.broker-link-title,
.broker-email-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.broker-link-message,
.broker-email-message {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
    text-align: left;
}

.account-info {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.account-info p {
    margin: 5px 0;
    color: #0c5460;
}

.broker-link-actions {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    justify-content: center;
}

.review-button {
    background-color: #6c757d;
    border: none;
    color: white;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex: 1;
}

.review-button:hover {
    background-color: #5a6268;
}

.broker-link-help,
.email-help {
    margin: 25px 0;
    background-color: #f8f9fa;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
}

.broker-link-help h4,
.email-help h4 {
    color: #333;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.broker-link-help ul,
.email-help ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 13px;
}

.broker-link-help li,
.email-help li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.email-steps {
    margin: 20px 0;
}

.email-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    background-color: #f26122;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.email-step p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.email-actions {
    margin: 25px 0;
    text-align: center;
}

.resend-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #f26122;
    text-decoration: none;
    font-size: 14px;
    margin-top: 15px;
}

.resend-link:hover {
    text-decoration: underline;
    color: #e5551a;
}

.alternative-actions {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.back-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-link:hover {
    text-decoration: underline;
    color: #495057;
}

/* Responsive adjustments for broker login */
@media (max-width: 768px) {
    .broker-link-actions {
        flex-direction: column;
        align-items: center;
    }

    .broker-link-icon i,
    .broker-email-icon i {
        font-size: 40px;
    }

    .broker-link-title,
    .broker-email-title {
        font-size: 20px;
    }

    .email-step {
        gap: 12px;
    }

    .step-number {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}
.login-applus-container {
    padding: 15px !important;
}

.login-applus-card {
    padding: 25px 20px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 350px !important;
}

.login-logo img {
    max-height: 45px !important;
}

.login-description {
    font-size: 13px !important;
    margin-bottom: 25px !important;
}

.form-control {
    padding: 10px 14px !important;
    font-size: 16px !important; /* Prevent zoom on iOS */
}

.password-group .form-control {
    padding-right: 40px !important;
}

.login-button {
    padding: 12px 18px !important;
    font-size: 15px !important;
}

.social-icons-row {
    gap: 12px !important;
}

.social-icon-btn {
    width: 45px !important;
    height: 45px !important;
    font-size: 18px !important;
}

.social-icon-btn::before {
    font-size: 11px !important;
    padding: 4px 8px !important;
    bottom: 125% !important;
}

.org-selector-content {
    padding: 20px;
    margin: 20px;
}

.org-options {
    gap: 12px;
}

.org-option-btn {
    padding: 12px 16px;
    gap: 12px;
}

.org-option-btn i {
    font-size: 20px;
    width: 25px;
}
}

@media (max-width: 480px) {
    .login-applus-container {
        padding: 10px !important;
    }

    .login-applus-card {
        padding: 20px 15px !important;
        max-width: 320px !important;
        border-radius: 8px !important;
    }

    .login-logo img {
        max-height: 40px !important;
    }

    .login-description {
        font-size: 12px !important;
        margin-bottom: 20px !important;
    }
}

/* Style tweaks for error card and its contents */
.error-card {
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-icon {
    font-size: 56px;
    color: #dc3545;
    margin-bottom: 20px;
    background: #fef2f2;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fecaca;
}

.error-icon i,
.error-icon svg {
    color: #dc3545;
    stroke: #dc3545;
}

.error-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    margin-top: 0;
}

.error-message {
    font-size: 14px;
    color: #991b1b;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc3545;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    line-height: 1.6;
    text-align: left;
    width: 100%;
    text-align: left;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.error-actions .login-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    background-color: #F37321;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.error-actions .login-button:hover {
    background-color: #e5551a;
    transform: translateY(-1px);
}

.error-actions .login-button i,
.error-actions .login-button svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Info card styling (similar to error card) */
.info-card {
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-icon {
    font-size: 56px;
    color: #0ea5e9;
    margin-bottom: 20px;
    background: #f0f9ff;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #bae6fd;
}

.info-icon i {
    color: #0ea5e9;
}

.info-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    margin-top: 0;
}

.info-message {
    font-size: 14px;
    color: #0c4a6e;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0ea5e9;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    width: 100%;
    text-align: left;
    line-height: 1.6;
}

.info-message .required-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #bae6fd;
}

.info-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.info-actions .login-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    background-color: #F37321;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.info-actions .login-button:hover {
    background-color: #e5551a;
    transform: translateY(-1px);
}

.info-actions .login-button i,
.info-actions .login-button svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Success card styling */
.success-card {
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon {
    font-size: 56px;
    color: #22c55e;
    margin-bottom: 20px;
    background: #f0fdf4;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #bbf7d0;
}

.success-icon i {
    color: #22c55e;
}

.success-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    margin-top: 0;
}

.success-message {
    font-size: 14px;
    color: #166534;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    width: 100%;
    text-align: left;
    line-height: 1.6;
}

/* Warning card styling */
.warning-card {
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.warning-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.warning-icon {
    font-size: 56px;
    color: #f59e0b;
    margin-bottom: 20px;
    background: #fffbeb;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fde68a;
}

.warning-icon i {
    color: #f59e0b;
}

.warning-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    margin-top: 0;
}

.warning-message {
    font-size: 14px;
    color: #92400e;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    width: 100%;
    text-align: left;
    line-height: 1.6;
}

/* ===== VERIFY EMAIL PAGE STYLES ===== */
.verify-email-card {
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.verify-email-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.verify-email-icon {
    font-size: 48px;
    color: #F37321;
    margin-bottom: 20px;
    background: #fff7ed;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fed7aa;
}

.verify-email-icon i,
.verify-email-icon svg {
    color: #F37321;
    stroke: #F37321;
}

.verify-email-title {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    margin-top: 0;
}

.verify-email-message {
    font-size: 14px;
    color: #4b5563;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #F37321;
    padding: 16px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    width: 100%;
    text-align: center;
    line-height: 1.6;
}

.verify-email-message p {
    margin: 0 0 8px 0;
}

.verify-email-message p:last-child {
    margin-bottom: 0;
}

.verify-email-message strong {
    color: #F37321;
    font-weight: 600;
}

.verify-email-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.verify-email-actions .btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.verify-email-actions .btn-primary {
    background-color: #F37321;
    color: #fff;
}

.verify-email-actions .btn-primary:hover {
    background-color: #e5551a;
}

.verify-email-actions .btn-secondary,
.verify-email-actions .resend-button,
.verify-email-actions .cancel-button {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.verify-email-actions .btn-secondary:hover,
.verify-email-actions .resend-button:hover,
.verify-email-actions .cancel-button:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.verify-email-help {
    margin-top: 20px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: left;
    width: 100%;
}

.verify-email-help h4 {
    color: #374151;
    font-size: 14px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.verify-email-help ul {
    margin: 0;
    padding-left: 20px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.verify-email-help li {
    margin-bottom: 6px;
}

.verify-email-help li:last-child {
    margin-bottom: 0;
}

.verify-email-info {
    margin-top: 20px;
    padding: 16px;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 13px;
    color: #0c4a6e;
    text-align: center;
}

.verify-email-info p {
    margin: 0 0 8px 0;
}

.verify-email-info p:last-child {
    margin-bottom: 0;
}

.verify-email-info a {
    color: #F37321;
    text-decoration: none;
    font-weight: 500;
}

.verify-email-info a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for verify email */
@media (max-width: 480px) {
    .verify-email-card {
        padding: 25px 20px;
        max-width: 340px;
    }

    .verify-email-icon {
        width: 70px;
        height: 70px;
        font-size: 36px;
    }

    .verify-email-title {
        font-size: 20px;
    }

    .verify-email-message {
        font-size: 13px;
        padding: 14px 16px;
    }
}

/* ===== SELECT AUTHENTICATOR PAGE STYLES ===== */
.authenticator-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.authenticator-option-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    color: #333;
}

.authenticator-option-btn:hover {
    border-color: #f26122;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(242, 97, 34, 0.12);
    transform: translateY(-1px);
}

.authenticator-option-btn:focus {
    outline: 2px solid #f26122;
    outline-offset: 2px;
}

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

.authenticator-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: #fff7ed;
    border: 1px solid #fed7aa;
    flex-shrink: 0;
    color: #f26122;
    font-size: 18px;
}

.authenticator-option-btn:hover .authenticator-option-icon {
    background-color: #f26122;
    border-color: #f26122;
    color: #fff;
}

.authenticator-option-details {
    flex: 1;
    min-width: 0;
}

.authenticator-option-title {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 3px;
}

.authenticator-option-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.authenticator-option-arrow {
    flex-shrink: 0;
    color: #9ca3af;
    transition: color 0.25s ease, transform 0.25s ease;
}

.authenticator-option-btn:hover .authenticator-option-arrow {
    color: #f26122;
    transform: translateX(3px);
}

/* ===== READ-ONLY USERNAME DISPLAY (login-password page) ===== */
.username-readonly-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    transition: border-color 0.3s ease;
}

.username-readonly-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    min-width: 0;
}

.username-readonly-value svg {
    flex-shrink: 0;
    color: #888;
}

.username-readonly-value span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.username-change-btn {
    flex-shrink: 0;
    color: #f26122;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.username-change-btn:hover {
    background-color: #fff3ed;
    color: #e5551a;
    text-decoration: none;
}

.username-change-btn:focus {
    outline: 2px solid #f26122;
    outline-offset: 2px;
}

/* IdP password reset notice */
.idp-reset-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 13px;
    color: #0c4a6e;
    line-height: 1.4;
}

.idp-reset-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #0ea5e9;
}

/* ===== GLOBAL OVERRIDES FOR CONSISTENT CARD STYLING ===== */

/* When .login-applus-container is used inside the template's .card,
   neutralize its fixed positioning and let the outer card be the container */
.card .login-applus-container {
    position: static !important;
    display: block !important;
    min-height: auto !important;
    padding: 0 !important;
    background: none !important;
    width: auto !important;
    z-index: auto !important;
}

/* Remove double-nesting visual from the inner card */
.card .login-applus-container .login-applus-card,
.card .login-applus-container .error-card,
.card .login-applus-container .info-card,
.card .login-applus-container .success-card,
.card .login-applus-container .warning-card,
.card .login-applus-container .verify-email-card {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Keep the logo centered inside the inner card */
.card .login-applus-container .login-logo {
    text-align: center;
    margin-bottom: 20px;
}

/* Hide the inner logo since the template already shows one */
.card .login-applus-container .login-logo {
    display: none;
}

/* Ensure forms have consistent styling across all pages */
.card .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fafafa;
    color: #333;
    box-sizing: border-box;
}

.card .form-control:focus {
    border-color: #f26122;
    box-shadow: 0 0 0 3px rgba(242, 97, 34, 0.1);
    background-color: #fff;
    outline: none;
}

.card .form-control::placeholder {
    color: #999;
    font-size: 14px;
}

/* Style the error-content, info-content etc. inside cards */
.card .error-content,
.card .info-content,
.card .success-content,
.card .warning-content,
.card .verify-email-content {
    text-align: center;
}

.card .error-icon,
.card .warning-icon {
    margin: 0 auto 20px auto;
}

.card .error-title,
.card .warning-title,
.card .info-title,
.card .success-title {
    text-align: center;
}

.card .error-actions,
.card .info-actions {
    justify-content: center;
}

/* Make the login-button consistent */
.card .login-button {
    background-color: #f26122 !important;
    border: none !important;
    color: white !important;
    width: 100%;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.card .login-button:hover {
    background-color: #e5551a !important;
    transform: translateY(-1px);
}
