/* Supplier Performance Reporting Dashboard Styles */

/* Dashboard Container */
.reporting-dashboard {
    background-color: #104862;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 0;
    margin: 0;
}

.dashboard-main-content {
    padding: 30px;
    /* Remove fixed height and overflow to prevent double scroll bars */
    min-height: calc(100vh - 120px); /* Accounting for navbar space */
}

/* Header Section */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

/* Filters Section */
.dashboard-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
    overflow: visible !important;
    position: relative !important;
}

.filter-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    text-transform: uppercase;
}

.filter-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.filter-select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.filter-select option {
    background: #2a5298;
    color: white;
}

/* Custom Dropdown Styling */
.custom-dropdown {
    position: relative !important;
    min-width: 140px;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 1 !important;
}

.dropdown-header {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
    opacity: 1 !important;
    min-height: 36px;
    box-sizing: border-box;
}

.dropdown-header:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.dropdown-selected {
    color: white !important;
    opacity: 1 !important;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    color: white !important;
    opacity: 1 !important;
    font-size: 12px;
    transition: transform 0.3s;
    margin-left: 8px;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #1a5f7a !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
    z-index: 1000 !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    display: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    width: 100% !important;
    min-width: 200px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
    margin-top: 2px !important;
}

.custom-dropdown.open .dropdown-options {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #1a5f7a !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    z-index: 9999 !important;
    position: absolute !important;
    top: calc(100% + 2px) !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: background-color 0.2s;
    margin: 0;
    gap: 8px;
}

.dropdown-option:hover {
    background: rgba(255, 186, 73, 0.15);
}

.dropdown-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #FFBA49;
    cursor: pointer;
}

.dropdown-option span {
    color: white;
    cursor: pointer;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, background-color 0.2s;
    cursor: move;
    position: relative;
}

.metric-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.metric-card.ui-draggable-dragging {
    transform: rotate(5deg);
    z-index: 1000;
    opacity: 0.8;
}

.metric-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-weight: 500;
}

.metric-value {
    font-size: 28px;
    font-weight: 600;
    color: #FFBA49;
    margin-bottom: 5px;
    line-height: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Specifically target the quality and delivery score elements only in reporting dashboard */
#reportingQualityScore,
#reportingDeliveryScore {
    color: #FFBA49 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: block !important;
    position: relative !important;
}

.metric-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.trend-up { color: #2ecc71; }
.trend-down { color: #e74c3c; }
.trend-stable { color: #95a5a6; }

/* Progress Circle */
.progress-circle {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 10px auto;
}

.progress-canvas {
    width: 100%;
    height: 100%;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Left column with stacked charts */
.charts-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Left column charts - smaller height */
.charts-left-column .chart-container {
    height: 180px;
    min-height: 160px;
}

/* Right column with scatter chart */
.charts-right-column {
    height: 100%;
}

/* Right column chart - full height */
.charts-right-column .chart-container {
    height: 380px;
    min-height: 320px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    cursor: move;
    transition: transform 0.2s, background-color 0.2s;
}

.chart-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

.chart-card.ui-draggable-dragging {
    z-index: 1000;
    opacity: 0.8;
    transform: rotate(2deg);
}

.chart-card.ui-resizable-resizing {
    border: 2px solid #FFBA49;
}

.chart-title {
    font-size: 16px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.chart-container {
    position: relative;
    height: 300px;
    min-height: 200px;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.full-width {
    grid-column: 1 / -1;
}

/* Drag Handle */
.drag-handle {
    /* Drag/drop disabled to maintain CSS grid layout */
    display: none !important;
}

/* Supplier Table */
.supplier-table-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    margin-top: 50px; /* Add extra top margin to prevent overlap */
    clear: both; /* Ensure it clears any floated elements */
    position: relative; /* Ensure it stays in document flow */
    z-index: 10; /* Ensure it stays above any absolutely positioned elements */
}

.supplier-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.supplier-table th {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 8px;
    text-align: left;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
}

.supplier-table th:hover {
    background: rgba(255, 255, 255, 0.15);
}

.supplier-table td {
    padding: 10px 8px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.supplier-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.supplier-name {
    font-weight: 600;
    color: #FFBA49;
}

.performance-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.excellent { background: #27ae60; color: white; }
.good { background: #f39c12; color: white; }
.acceptable { background: #e67e22; color: white; }
.needs-improvement { background: #e74c3c; color: white; }

.trend-indicator {
    font-weight: bold;
    font-size: 16px;
}

/* Insights Panel */
.insights-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: move;
    transition: transform 0.2s, background-color 0.2s;
}

.insight-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.insight-card.ui-draggable-dragging {
    z-index: 1000;
    opacity: 0.8;
}

.insight-icon {
    width: 40px;
    height: 40px;
    background: #FFBA49;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #1e3c72;
    font-weight: bold;
    font-size: 18px;
}

.insight-card h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.insight-card p {
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Loading States */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    flex-direction: column;
    gap: 15px;
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #FFBA49;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Error States */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #e74c3c;
    text-align: center;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.empty-state p {
    font-size: 14px;
    line-height: 1.4;
}

/* jQuery UI Overrides */
.ui-resizable-handle {
    background-color: rgba(255, 186, 73, 0.3) !important;
    border: 1px solid rgba(255, 186, 73, 0.5) !important;
}

.ui-resizable-se {
    width: 16px !important;
    height: 16px !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #FFBA49 !important;
    border-radius: 0 0 12px 0 !important;
}

.ui-resizable-se::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 5px;
    height: 5px;
    border-right: 2px solid #1e3c72;
    border-bottom: 2px solid #1e3c72;
}

/* Grid Snap Indicators */
.snap-grid {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.dashboard-main-content.dragging .snap-grid {
    opacity: 1;
}

/* Action Buttons - DISABLED */
/*
.dashboard-actions {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 186, 73, 0.2);
    border-color: #FFBA49;
    transform: scale(1.1);
}

.action-btn.active {
    background: #FFBA49;
    color: #1e3c72;
}
*/

/* Tooltips */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-section {
        grid-template-columns: 1fr;
    }

    /* Stack charts vertically on smaller screens */
    .charts-right-column .chart-container {
        height: 400px;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-main-content {
        padding: 15px;
    }

    .dashboard-filters {
        flex-direction: column;
        gap: 15px;
    }

    .filter-group {
        width: 100%;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .charts-section {
        gap: 20px;
    }

    /* Adjust chart heights for mobile */
    .charts-left-column .chart-container,
    .charts-right-column .chart-container {
        height: 300px;
    }

    .insights-panel {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dashboard-header h1 {
        font-size: 24px;
    }

    /* .dashboard-actions - DISABLED */
    /*
    .dashboard-actions {
        position: relative;
        top: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin: 20px 0;
    }
    */
}

@media (max-width: 480px) {
    .chart-card,
    .metric-card,
    .insight-card {
        touch-action: none; /* Improve touch interactions */
    }

    .supplier-table {
        font-size: 12px;
    }

    .supplier-table th,
    .supplier-table td {
        padding: 8px 4px;
    }
}

/* Print Styles */
@media print {
    /* .dashboard-actions, - DISABLED */
    .drag-handle,
    .ui-resizable-handle {
        display: none !important;
    }

    .reporting-dashboard {
        background: white !important;
        color: black !important;
    }

    .chart-card,
    .metric-card,
    .insight-card,
    .supplier-table-section {
        background: white !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
}

/* ========================================
   AI INSIGHTS SECTION STYLES
   ======================================== */

/* Insights Section Container */
.insights-section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.insights-header h2 {
    font-size: 24px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.insights-header h2 i {
    color: #FFBA49;
    font-size: 28px;
}

/* Insights Filters */
.insights-filters {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.insights-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.insights-filters label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.insights-filters select {
    min-width: 180px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.insights-filters select option {
    background: #104862;
    color: white;
}

/* Insights Cards Container */
.insights-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 20px;
    justify-items: center;
}

/* Individual Insight Card */
.insight-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.insight-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Insight Card Header */
.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.insight-category {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.category-icon {
    font-size: 18px;
}

.category-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Category-specific colors */
.category-key {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.4);
}

.category-action {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.category-opportunity {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.category-cost {
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid rgba(241, 196, 15, 0.4);
}

/* Priority Badge */
.insight-priority {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.priority-medium {
    background: rgba(241, 196, 15, 0.3);
    color: #FFBA49;
    border: 1px solid #FFBA49;
}

.priority-low {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

/* Insight Title - Bold and prominent */
.insight-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* Insight Body - Smaller secondary text (action and impact) */
.insight-body {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 8px 0;
}

.insight-body:last-of-type {
    margin-bottom: 0;
}

.insight-body strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

/* Legacy: Insight Action - Smaller secondary text */
.insight-action {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 10px 0;
}

/* Legacy: Insight Impact - Inline with label */
.insight-impact {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.insight-impact strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* Insight Analysis (legacy format) */
.insight-analysis {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Insight Detail (previous format: context/impact) */
.insight-detail {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 8px 0 0 0;
}

.insight-detail strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* Recommended Actions */
.insight-actions {
    margin-top: 5px;
}

.insight-actions h4 {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-actions ul {
    margin: 0;
    padding-left: 20px;
}

.insight-actions li {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 5px;
}

/* Insight Footer */
.insight-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 15px;
    flex-wrap: wrap;
}

.insight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
}

.insight-timeline,
.insight-impact {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
}

.insight-timeline i,
.insight-impact i {
    color: #FFBA49;
}

.insight-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.insight-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.insight-action-buttons .btn {
    max-width: 180px;
    white-space: nowrap;
}

.insight-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Create Action Button */
.create-action-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    background: #FFBA49 !important;
    color: #104862 !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.create-action-btn:hover {
    background: #ffa500 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 186, 73, 0.3);
}

.create-action-btn i {
    font-size: 11px;
}

/* Empty State */
.insights-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.insights-empty-state i {
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.insights-empty-state p {
    margin: 10px 0;
    font-size: 16px;
}

.insights-empty-state .text-muted {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* Loading State */
.insights-loading {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.insights-loading i {
    color: #FFBA49;
    margin-bottom: 15px;
}

.insights-loading p {
    margin: 0;
    font-size: 14px;
}

/* Actioned Insight Styling */
.insight-card.actioned {
    opacity: 0.7;
    background: linear-gradient(135deg, rgba(21, 32, 43, 0.95), rgba(28, 42, 56, 0.95));
    border-left: 4px solid #4CAF50;
}

.actioned-badge {
    position: absolute;
    top: 28px;
    right: 90px;
    background: #4CAF50;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1;
}

.insight-card {
    position: relative;
}

.actioned-badge i {
    font-size: 12px;
}

/* Checkbox Label for Show Actioned Filter */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.checkbox-label span {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .insights-cards-container {
        grid-template-columns: 1fr;
    }

    .insights-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .insights-filters {
        width: 100%;
        flex-direction: column;
    }

    .insights-filters select {
        width: 100%;
    }
}

/* Tile Controls */
.tile-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 10;
    pointer-events: none;
}

.tile-controls .tile-control-btn {
    pointer-events: auto;
}

.metric-card:hover .tile-controls,
.chart-card:hover .tile-controls,
.supplier-table-section:hover .tile-controls {
    opacity: 1;
}

/* Hide controls while dragging */
.ui-draggable-dragging .tile-controls {
    opacity: 0 !important;
    pointer-events: none !important;
}

.tile-control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.tile-control-btn:active {
    transform: scale(0.95);
}

.tile-control-btn i {
    pointer-events: none;
}

/* Tile state modifiers */
.tile-hidden {
    display: none !important;
}

/* Restore hidden tiles icon - minimal and subtle */
.restore-tiles-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    z-index: 100;
    font-size: 16px;
    line-height: 1;
}

.restore-tiles-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.restore-tiles-icon i {
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Restore Hidden Tiles Modal */
#restoreHiddenTilesModal.modal {
    pointer-events: none;
}

#restoreHiddenTilesModal .modal-dialog {
    pointer-events: auto;
}

#restoreHiddenTilesModal .modal-content {
    background-color: #104862;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#restoreHiddenTilesModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#restoreHiddenTilesModal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#restoreHiddenTilesModal .close {
    color: white;
    opacity: 0.7;
}

#restoreHiddenTilesModal .close:hover {
    color: white;
    opacity: 1;
}

/* Hidden Tiles List */
.hidden-tiles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    min-height: 200px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Hidden Tile Preview */
.hidden-tile-preview {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: grab;
    transition: all 0.2s ease-in-out;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.hidden-tile-preview:active {
    cursor: grabbing;
}

.hidden-tile-preview:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hidden-tile-preview .tile-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.hidden-tile-preview .tile-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.hidden-tile-preview.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Drop Zone Indicator */
.dashboard-main-content.drop-zone-active {
    outline: 3px dashed rgba(255, 184, 73, 0.6);
    outline-offset: -10px;
    background: rgba(255, 184, 73, 0.05);
}

/* Allow backdrop to receive drop events */
.modal-backdrop {
    pointer-events: none !important;
}

/* ========================================
   INSIGHTS PAGE SPECIFIC STYLES
   ======================================== */

/* Insights Metrics Grid at Top */
.insights-metrics {
    margin-bottom: 30px;
}

/* Insights Section Container */
.insights-section-container {
    margin-bottom: 35px;
}

/* Insights Section Header */
.insights-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.insights-section-header h2 {
    font-size: 24px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insights-section-header h2 i {
    color: #FFBA49;
    font-size: 24px;
}

/* Insight Count Badge */
.insight-count {
    background: rgba(255, 186, 73, 0.2);
    color: #FFBA49;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 186, 73, 0.3);
}

/* ========================================
   EVALUATION TEAM ASSIGNMENT MODAL STYLES
   ======================================== */

/* Team Modal Supplier Info */
.team-modal-supplier-info {
    background: rgba(255, 186, 73, 0.1);
    border: 1px solid rgba(255, 186, 73, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.team-supplier-name {
    font-size: 20px;
    font-weight: 600;
    color: #FFBA49;
    margin-bottom: 8px;
}

.team-supplier-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.supplier-detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.supplier-detail-item i {
    color: #FFBA49;
    width: 16px;
}

/* Team Section */
.team-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.team-section:last-of-type {
    border-bottom: none;
}

.team-section-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-section-title i {
    color: #FFBA49;
}

.team-count-badge {
    background: rgba(255, 186, 73, 0.2);
    color: #FFBA49;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

/* Team Members List */
.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.team-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.team-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.team-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Team Member Item */
.team-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease-in-out;
}

.team-member-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.team-member-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.team-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFBA49, #ff8c00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #104862;
}

.team-member-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-member-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.team-member-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.team-member-remove {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e74c3c;
    transition: all 0.2s ease-in-out;
}

.team-member-remove:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
    transform: scale(1.1);
}

/* Add Team Member Form */
.add-team-member-form {
    margin-top: 10px;
}

.add-team-member-form .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
}

.add-team-member-form .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #FFBA49;
    box-shadow: 0 0 0 0.2rem rgba(255, 186, 73, 0.25);
    color: white;
}

.add-team-member-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Notification Section */
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.form-group textarea.form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    resize: vertical;
}

.form-group textarea.form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #FFBA49;
    box-shadow: 0 0 0 0.2rem rgba(255, 186, 73, 0.25);
    color: white;
}

.form-group textarea.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.notification-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-actions .btn {
    flex: 1;
    min-width: 180px;
}

/* Modal Styling Override for Team Modal */
#evaluationTeamModal.modal .modal-dialog .modal-content {
    background-color: #104862 !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#evaluationTeamModal.modal .modal-dialog .modal-body {
    background-color: #104862 !important;
}

#evaluationTeamModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 186, 73, 0.05) !important;
}

#evaluationTeamModal .modal-header .modal-title {
    color: #FFBA49 !important;
    font-weight: 400;
}

#evaluationTeamModal .modal-header .close {
    color: white !important;
    opacity: 0.7;
    text-shadow: none;
}

#evaluationTeamModal .modal-header .close:hover {
    color: white !important;
    opacity: 1;
}

#evaluationTeamModal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #104862 !important;
}

/* Eval Button Styling */
.btn-eval-team {
    background: rgba(108, 117, 125, 0.2);
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.btn-eval-team:hover {
    background: rgba(108, 117, 125, 0.3);
    border-color: rgba(108, 117, 125, 0.5);
}