@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #1a3143, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4N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Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }



.nav-tabs .nav-link {
    background-color: #4f5256;
    color: #fff;
    border: 1px solid #4f5256;
    border-bottom-color: #1a3143;
    border-radius: 0.25rem 0.25rem 0 0;
    transition: all 0.3s ease-in-out;
}


    .nav-tabs .nav-link:not(.active):hover {
        background-color: #5d6165;
        color: #fff;
        border-color: #1a3143;
        border-bottom-color: #1a3143;
    }


    .nav-tabs .nav-link.active {
        background-color: #1a3143;
        color: #2cb4d2;
        border: 1px solid #1a3143;
        border-bottom-color: #1a3143;
        font-weight: bold;
    }


.nav-link.active:focus {
    box-shadow: 0 0 0 0.1rem #1a3143, 0 0 0 0.25rem #258cfb;
}


/* Custom style for the Apply button in Date Range Picker */
.btn-custom-apply {
    background-color: #39b4d2;
    border-color: #39b4d2;
    color: #fff;
}

.btn-custom-apply:hover {
    background-color: #31a2bc;
    border-color: #2d93aa;
    color: #fff;
}

.btn-custom-apply:focus, .btn-custom-apply.focus {
    background-color: #31a2bc;
    border-color: #2d93aa;
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(57, 180, 210, 0.5);
}

.btn-custom-apply:active, .btn-custom-apply.active {
    background-color: #2d93aa;
    border-color: #298498;
    color: #fff;
}

.btn-custom-apply:disabled, .btn-custom-apply.disabled {
    background-color: #39b4d2;
    border-color: #39b4d2;
    color: #fff;
    opacity: 0.65;
}

/* Accept, Reject, Counter buttons */
.action-button {
    margin-right: 0.25rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.action-accept {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.action-accept:hover {
    background-color: #0e9a71;
    border-color: #0d8c67;
    color: #ffffff;
}

.action-accept:focus,
.action-accept.focus {
    background-color: #0e9a71;
    border-color: #0d8c67;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.5);
}

.action-accept:active,
.action-accept.active {
    background-color: #0d8c67;
    border-color: #0c7e5d;
    color: #ffffff;
}

.action-reject {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.action-reject:hover {
    background-color: #e82e2e;
    border-color: #dc2626;
    color: #ffffff;
}

.action-reject:focus,
.action-reject.focus {
    background-color: #e82e2e;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.5);
}

.action-reject:active,
.action-reject.active {
    background-color: #dc2626;
    border-color: #cf1d1d;
    color: #ffffff;
}

.action-counter {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #000000;
}

.action-counter:hover {
    background-color: #e08e0a;
    border-color: #ca8009;
    color: #000000;
}

.action-counter:focus,
.action-counter.focus {
    background-color: #e08e0a;
    border-color: #ca8009;
    color: #000000;
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.5);
}

.action-counter:active,
.action-counter.active {
    background-color: #ca8009;
    border-color: #b87308;
    color: #000000;
}

.metric-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-title {
    color: #2cb4d2;
    font-weight: bold;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a3143;
}

.metric-change {
    font-size: 0.75rem;
    color: #10b981;
}

.metric-change.neutral {
    color: #6b7280;
}

.metric-icon {
    color: #9ca3af;
}

.emails-table-container {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.emails-table-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a3143;
}

.emails-table-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Scrollable table for Emails being processed */
.emails-table-scrollable {
    max-height: 750px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    padding-bottom: 150px;
}

.emails-table-scrollable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #ffffff;
    border-bottom: 2px solid #dee2e6;
}


.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-fraud {
    background-color: #000000;
    color: yellow;
    font-size: 0.875rem;
}

.status-negotiating {
    background-color: #f59e0b;
    color: #000000;
    font-size: 0.875rem;
}

.status-pending {
    background-color: #0ea5e9;
    color: white;
    font-size: 0.875rem;
}

.status-deal-made {
    background-color: #28a745;
    color: #fff;
    font-size: 0.875rem;
}

.status-no-deal {
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.875rem;
}

.action-button {
    margin-right: 0.25rem;
}

.action-accept {
    background-color: #10b981;
    border-color: #10b981;
}

.action-reject {
    background-color: #ef4444;
    border-color: #ef4444;
}

.action-counter {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #000000;
}


.btn-refresh-white {
    background-color: #2cb4d2;
    color: white;
}


    .btn-refresh-white:hover {
        background-color: #e9ecef;
        color: #212529;
        border-color: #e9ecef;
    }


    .btn-refresh-white:active {
        background-color: #dee2e6;
        color: #212529;
        border-color: #dee2e6;
    }

    .btn-refresh-white .spinner-border,
    .btn-refresh-white .fas {
        color: white;
    }


.table tbody td {
    color: #fff;
}

    .table tbody td span,
    .table tbody td text {
        color: #fff;
    }

    .table tbody td .text-muted {
        color: #fff !important;
    }

.status-badge.status-received {
    background-color: #6c757d;
    color: #fff;
}


.table tbody td .btn-link .fas {
    color: #2cb4d2;
}


.table.table-hover tbody tr:hover td {
    color: #ffff;
}

/* ================================== */
/* ===== Workflow Context Menu ==== */
/* ================================== */

.custom-context-menu {
    position: absolute;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 6px;
    min-width: 220px;
    z-index: 1000;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

    /* Arrow Base Styles */
    .custom-context-menu::before {
        content: '';
        position: absolute;
        width: 12px;
        height: 12px;
        background: inherit;
        top: 50%;
        left: -7px;
        transform: translateY(-50%) rotate(45deg);
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        z-index: -1;
    }

    .custom-context-menu.left-aligned::before {
        left: auto;
        right: -7px;
        border-left: none;
        border-bottom: none;
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    /* Item Base Styles */
    .custom-context-menu .context-menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 12px;
        cursor: pointer;
        font-size: 14px;
        border-radius: 6px;
        transition: background-color 0.15s ease-in-out;
    }

    .custom-context-menu .context-menu-icon {
        width: 18px;
        text-align: center;
    }

    .custom-context-menu .context-menu-separator {
        height: 1px;
        margin: 5px 6px;
    }


    .custom-context-menu.theme-light-bg {
        color: #212529; /* Dark text */
    }

        .custom-context-menu.theme-light-bg .context-menu-item:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        .custom-context-menu.theme-light-bg .context-menu-item.destructive {
            color: #c82333; /* Strong red for light backgrounds */
        }

            .custom-context-menu.theme-light-bg .context-menu-item.destructive:hover {
                background-color: #c82333;
                color: #ffffff;
            }

        .custom-context-menu.theme-light-bg .context-menu-separator {
            background-color: rgba(0, 0, 0, 0.1);
        }


    .custom-context-menu.theme-dark-bg {
        color: #f8f9fa; /* Light text */
    }

        .custom-context-menu.theme-dark-bg .context-menu-item:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }

        .custom-context-menu.theme-dark-bg .context-menu-item.destructive {
            color: #ffcdd2; /* Soft red for dark backgrounds */
        }

            .custom-context-menu.theme-dark-bg .context-menu-item.destructive:hover {
                background-color: #d32f2f;
                color: #ffffff;
            }

        .custom-context-menu.theme-dark-bg .context-menu-separator {
            background-color: rgba(255, 255, 255, 0.15);
        }

.workflow-node {
    position: relative; 
}

.node-validation-status {
    position: absolute;
    top: 37px;
    right: 24px; 
    font-size: 20px;
    cursor: help;
}

/* Modifier class for the green success state */
.node-validation-status.success {
    color: #28a745;
}

/* Modifier class for the yellow warning state */
.node-validation-status.warning {
    color: #ffc107;
}

/* Specific style for the checkmark icon to make it pop */
.node-validation-status .fa-check-circle {
    background-color: white;
    border-radius: 50%;
}

/* --- Issues Panel Styles --- */
.issues-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
    z-index: 1040;
}

    .issues-panel-overlay.visible {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease;
    }

.issues-panel {
    position: fixed;
    top: 0;
    right: -450px; /* Start off-screen */
    width: 400px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-in-out;
    z-index: 1050;
}

    .issues-panel.open {
        right: 0; /* Slide in */
    }

    .issues-panel .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #e9ecef;
    }

    .issues-panel .panel-title {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        display: flex;
        align-items: center;
    }

    .issues-panel .warning-icon {
        color: #ffc107;
        margin-right: 0.75rem;
    }

    .issues-panel .close-button {
        background: none;
        border: none;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        color: #6c757d;
    }

    .issues-panel .panel-content {
        flex-grow: 1;
        overflow-y: auto;
        padding: 1.5rem;
    }

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

.issue-item {
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.3rem;
    padding: 1rem;
}

.issue-node-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.issue-messages {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
    font-size: 0.9rem;
    color: #dc3545; /* Red for error messages */
}

.no-issues-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

    .no-issues-placeholder .success-icon {
        font-size: 3rem;
        color: #28a745;
        margin-bottom: 1rem;
    }

    .no-issues-placeholder h5 {
        font-size: 1.2rem;
        color: #343a40;
    }


/* ======================================= */
/* ===== FRAIT Sentinel Custom Styles ==== */
/* ======================================= */
.frait-sentinel-container {
    max-width: 1200px;
    margin: auto;
    padding: 2rem 1rem;
}

.search-header {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.card-header {
    background-color: #e9ecef;
}

.table-danger, .table-danger > th, .table-danger > td {
    --bs-table-bg: #f8d7da;
    --bs-table-border-color: #f5c2c7;
    --bs-table-color: #58151c;
}



.reorderable-card-wrapper {
    position: relative;
    overflow: visible !important; /* Prevent clipping */
    z-index: 100; /* Bump up for stacking */
}

/* === CUSTOM HAMBURGER MENU === */
.card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1050;
}

.dropdown-menu.show {
    display: block;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
    }

    .dropdown-item.disabled {
        color: #aaa;
        pointer-events: none;
    }

/* === SEARCH RESULTS === */
.search-result-item {
    background-color: #FFFFFF !important;
    color: #000FFF !important;
    transition: background-color 0.2s ease;
}

    .search-result-item.even-row {
        background-color: #e9ecef !important;
    }

    .search-result-item:hover {
        background-color: #cccccc !important;
    }


/* --- General Card styling for the profile page --- */
.module-card {
    background-color: #FFFFFF;
    overflow: visible !important; /* Ensure tile doesn't clip popup */
    position: relative;
}