:root {
    --error-primary: #10b981;
    --error-primary-dark: #2e7d32;
    --error-blue: #174474;
    --error-border: #dee2e6;
    --error-text-muted: #6c757d;
}

/* Staged Error Groupings */
.staged-error-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.staged-error-list .text-center {
    padding: 2rem 1rem;
}

.group-header {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
}

.group-header-content {
    display: flex;
    flex-direction: column;
}

.group-header-tags {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.group-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.group-header-info {
    margin-left: 1.75rem;
}

.group-header .bg-info {
    background-color: #0d6efd !important;
    color: white !important;
}

.group-header .bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.group-header-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.group-header-clickable:hover {
    background-color: #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.staged-error-clickable {
    cursor: pointer;
}

.error-message-truncate {
    max-width: 500px;
}

.staged-error-item {
    padding: 0.75rem 1.25rem;
    border: 1px solid #dee2e6;
    background-color: #fafbfc;
    cursor: pointer;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

    .staged-error-item:hover {
        background-color: #e9ecef;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .staged-error-item.active {
        background-color: #fff3cd;
        border: 2px solid #ffc107;
        color: #000;
        border-radius: 0.25rem;
    }

        .staged-error-item.active .text-muted {
            color: #6c757d !important;
        }

    .staged-error-item.error-grouped {
        border-left: 3px solid #17a2b8;
        margin-left: 2rem;
        margin-bottom: 0.5rem;
    }

        .staged-error-item.error-grouped.active {
            border-left: 3px solid #ffc107;
        }

    .staged-error-item .bg-info {
        background-color: #0d6efd !important;
        color: white !important;
    }

    .staged-error-item .bg-secondary {
        background-color: #6c757d !important;
        color: white !important;
    }

.staged-error-content {
    display: flex;
    flex-direction: column;
}

.staged-error-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.staged-error-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.staged-error-body {
    display: flex;
    flex-direction: column;
}

/* Error Configuration Styles */
.error-config-form-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    padding: 8px;
    margin: 8px
    
}

.error-config-staged-container {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.error-config-staged-left {
    flex: 1;
    min-height: 400px;
    height: calc(100vh - 450px);
    background-color: #e7f3ff;
    padding: 1rem;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
}

.error-config-staged-right {
    width: 60%;
    min-width: 450px;
    min-height: 400px;
    position: sticky;
    top: 70px;
    height: calc(100vh - 450px);
    display: flex;
    flex-direction: column;
    padding: 1rem 0 1rem 20px;
    background-color: #f8f9fa;
}

/* Empty State Styles */
.staged-review-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
}

.staged-review-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: #ffe6f0;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    color: #dc3545;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.empty-state-message {
    font-size: 1rem;
    color: #6c757d;
}

/* Staged Review Content */
.staged-review-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Error Info Box */
.error-info-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.error-info-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.error-info-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.error-info-subtitle {
    color: #6c757d;
    display: block;
    margin-top: 0.25rem;
}

.error-info-body {
    padding: 1.25rem;
}

.error-info-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.error-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.error-detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.error-detail-value {
    color: #212529;
}

.error-message-section {
    margin-top: 1.25rem;
}

.error-message-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
}

.error-message-content {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #212529;
    white-space: pre-wrap;
    word-break: break-word;
}

.error-stack-trace-section {
    margin-top: 1rem;
}

.error-stack-trace-content {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Config Box */
.config-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.config-box-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.config-box-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.config-box-body {
    padding: 1.25rem;
}

.suggested-config-content {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.suggested-config-item {
    margin-bottom: 0.5rem;
}

.suggested-config-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.no-suggested-config-message {
    color: #6c757d;
    margin-bottom: 1rem;
}

.no-suggested-config-message p {
    margin: 0;
}

.config-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.error-config-parent-selection-item {
    padding: 1rem;
    border: 1px solid var(--error-border);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

    .error-config-parent-selection-item:hover {
        background-color: #f0f7ff;
        border-color: #0d6efd;
    }

    .error-config-parent-selection-item.selected {
        background-color: #e7f3ff;
        border-color: #0d6efd;
        border-width: 2px;
    }

.error-config-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 0.25rem;
}

/* Error Notifications Page */
.error-notifications-page {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

    .error-notifications-page .container-fluid,
    .error-notifications-page .container-xl {
        max-width: 100%;
        padding-left: 2rem;
        padding-right: 2rem;
    }

.error-notifications-grid-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

    .error-notifications-grid-container .card {
        flex: 1;
        display: flex;
        flex-direction: column;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: 1px solid #e0e4e8;
        border-radius: 12px;
        overflow: hidden;
    }

    .error-notifications-grid-container .card-header {
        background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
        border-bottom: 2px solid #e0e4e8;
        padding: 1.25rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .error-notifications-grid-container .card-title {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1.125rem;
        font-weight: 600;
        color: #1a202c;
        margin: 0;
    }

        .error-notifications-grid-container .card-title i {
            color: #3b82f6;
        }

    .error-notifications-grid-container .card-body {
        flex: 1;
        overflow-y: auto;
        padding: 0;
    }

.notification-table {
    width: 100%;
    font-size: 16px;
}

    .notification-table thead {
        background: linear-gradient(180deg, #f8fafb 0%, #f3f5f7 100%);
        position: sticky;
        top: 0;
        z-index: 10;
    }

        .notification-table thead th {
            padding: 1rem 1.25rem;
            font-weight: 600;
            color: #344054;
            border-bottom: 2px solid #e0e4e8;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

.notification-row {
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f2f4;
}

    .notification-row:hover {
        background-color: #f0f9ff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
        transform: translateX(2px);
    }

    .notification-row:active {
        background-color: #e0f2fe;
    }

    .notification-row td {
        padding: 1.25rem;
        vertical-align: middle;
    }

    .notification-row .user-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .notification-row .user-name {
        font-weight: 600;
        font-size: 16px;
        color: #1a202c;
    }

    .notification-row .user-email {
        font-size: 14px;
        color: #64748b;
    }

.notification-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.notification-status-ready {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

    .notification-status-ready i {
        color: var(--error-primary);
    }

.notification-status-not-eligible {
    background-color: #f9fafb;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
}

.notification-count-email-active,
.notification-count-email-empty,
.notification-count-sms-active,
.notification-count-sms-empty {
    min-width: 80px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    cursor: pointer;
}

.notification-count-email-active,
.notification-count-sms-active {
    background-color: var(--error-primary-dark);
    color: white;
    border-color: var(--error-primary-dark);
}

.notification-row:hover .notification-count-email-active,
.notification-row:hover .notification-count-sms-active {
    background-color: #1b5e20;
    border-color: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.notification-count-email-empty,
.notification-count-sms-empty {
    background-color: #e8f5e9;
    color: #81c784;
    border-color: #c8e6c9;
}

.notification-row:hover .notification-count-email-empty,
.notification-row:hover .notification-count-sms-empty {
    background-color: #c8e6c9;
    color: #66bb6a;
    border-color: #a5d6a7;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.location-badge-global {
    background-color: #f0f9ff;
    color: #0369a1;
    border-color: #7dd3fc;
}

.btn-refresh {
    background-color: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .btn-refresh:hover {
        background-color: #3b82f6;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
    }

.error-notifications-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

    .error-notifications-loading .spinner-border {
        width: 3rem;
        height: 3rem;
        border-width: 0.3rem;
    }

.error-notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

    .error-notifications-empty i {
        font-size: 4rem;
        color: #cbd5e1;
        margin-bottom: 1rem;
    }

.error-notifications-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.error-notifications-empty-subtitle {
    color: #94a3b8;
    font-size: 1rem;
}

.error-notifications-alert {
    border-radius: 8px;
    border-left: 4px solid;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 14px;
}

    .error-notifications-alert.alert-success {
        background-color: #f0fdf4;
        border-left-color: var(--error-primary);
        color: #14532d;
    }

    .error-notifications-alert.alert-danger {
        background-color: #fef2f2;
        border-left-color: #ef4444;
        color: #7f1d1d;
    }

@media (max-width: 1200px) {
    .notification-table {
        font-size: 15px;
    }

    .notification-row td {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .error-notifications-page .container-fluid,
    .error-notifications-page .container-xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .notification-table {
        font-size: 14px;
    }

    .notification-row td {
        padding: 0.75rem;
    }

    .notification-count-email-active,
    .notification-count-email-empty,
    .notification-count-sms-active,
    .notification-count-sms-empty {
        min-width: 60px;
        font-size: 12px;
        padding: 0.375rem 0.5rem;
    }
}

.error-notifications-page .table-hover tbody tr:hover {
    background-color: transparent;
}

.error-notifications-page .btn:focus {
    box-shadow: none;
}

.error-notifications-page .btn-close:focus {
    box-shadow: none;
}

.dropdown-label-left {
    padding-right: 0.5rem !important;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: var(--error-text-muted);
}

.dropdown-label-right {
    padding-left: 0.25rem !important;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: var(--error-text-muted);
}

/* Panel Cards */
.panel-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.panel-card-header {
    background: white;
    color: #212529;
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.0rem;
}

.panel-card-body {
    padding: 1.25rem;
    overflow-y: auto;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

/* Error Configuration Grid - Detail Row Full Width and Border Continuity */
.error-config-grid tr.k-detail-row td.k-detail-cell {
    border: 1px solid #007bff;
    padding: 0;
}

.error-config-grid td.k-hierarchy-cell {
    border-left: 1px solid #007bff;
}

.error-config-grid .k-detail-cell > div {
    width: 100%;
}

/* Error Configuration Grid - Expand/Collapse Icons */
tr.no-expand-icon td.k-hierarchy-cell * {
    display: none !important;
}

tr.no-expand-icon td.k-hierarchy-cell {
    pointer-events: none !important;
}

.error-config-grid td.k-hierarchy-cell .k-svg-icon svg {
    display: none !important;
}

.error-config-grid td.k-hierarchy-cell .k-svg-icon.k-svg-i-plus:before {
    content: "\25bc";
    color: #007bff !important;
    font-size: 1.2em !important;
    display: inline-block;
    line-height: 1;
    transform: rotate(-90deg);
}

.error-config-grid td.k-hierarchy-cell .k-svg-icon.k-svg-i-minus:before {
    content: "\25bc";
    color: #007bff !important;
    font-size: 1.2em !important;
    display: inline-block;
    line-height: 1;
}

.error-config-grid td.k-hierarchy-cell:hover .k-svg-icon.k-svg-i-plus:before,
.error-config-grid td.k-hierarchy-cell:hover .k-svg-icon.k-svg-i-minus:before {
    color: #0056b3 !important;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    padding: 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1070;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.toast-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Error Badges (Health Status) */
.error-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

    .error-badge i {
        font-size: 0.7rem;
    }

.error-badge-critical {
    background-color: #fef2f2;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.error-badge-error {
    background-color: #fff3f0;
    color: #ff5722;
    border: 1px solid #ff5722;
}

.error-badge-warning {
    background-color: #fff8f0;
    color: #ff9800;
    border: 1px solid #ff9800;
}

.error-badge-info {
    background-color: #f0f7ff;
    color: #0066cc;
    border: 1px solid #0066cc;
}

.error-badge-success {
    background-color: #f0fdf4;
    color: #28a745;
    border: 1px solid #28a745;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: #dc3545;
    border-radius: 50%;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9ecef;
}

    .form-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--error-text-muted);
    margin-bottom: 12px;
}

/* Toggle Switch Extensions */
.toggle-label {
    font-size: 0.875rem;
    font-weight: 500;
}