/* Customer heatmap Start*/

.event-marker text {
    font-family: "Font Awesome 6 free";
}



body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Heading changes */
.py-2 {
    padding-top: .7rem !important;
    padding-bottom: .7rem !important;
}

.card {
    border-radius: 0px !important;
}

.dashboard-card .card-header {
    border-radius: 0px;
}

.dashboard-card .card-title {
    font-size: 0.9rem;
}

.revenue-chart-container {
    padding-bottom: 0px;
}

/* End Heading changes */

/* Index Start*/
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.dashboard-card::before {
    background: none;
    border-radius: 6px;
}

.heatmap-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 80vh;
}

/* #heatmap {
        min-width: 2500px;
    } */

.legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50px;
}

.customer-cell {
    cursor: pointer;
    transition: all 0.2s ease;
    /* fill: white; */
    stroke-width: 3px;
}

.customer-cell-group:hover .customer-cell {
    stroke: #333;
    stroke-width: 3px;
    filter: brightness(1.1);
}

.customer-cell-group:hover text {
    font-weight: bold;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
}

.stats-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border: solid 1px #ebebee;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #141b4d;
    border-bottom: solid 1px #ebebee;
    padding-bottom: 5px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 600;
    padding-top: 5px;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.modal-body .form-label{
    color: var(--text-primary);
}

/* .form-select
    {
        font-size: 0.75rem;
        font-weight: 600;
        width:auto;
    } */
.card-body {
    padding: 0.5rem 1rem 0.5rem 1rem;
}

.btn {
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-size-sm);
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: rgb(86 88 90 / 60%);
    --bs-btn-border-color: #56585a;
}

.bg-primary {
    background-color: transparent !important;
    border: 1px solid #fff;
}

.badge {
    border-radius: 5px;
}

.card {
    /* border: solid 1px #ebebee; 
    background-color: #141b4d;*/
    border-radius: 6px;
    border: none;
}

/* Index End*/



/* KPI Cards*/
.kpi-row {
    margin-top: 1rem;
}

.kpi-card {
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: .5rem;
    height: 100%;

}

.kpi-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #000000;
    line-height: 14px;
}

.kpi-value {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.5rem;
}

.kpi-subtext {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

.kpi-subtext span {
    font-weight: 600;
}

.kpi-subtext i {
    font-size: 0.5rem;
}

.kpi-sbtxt {
    font-size: 0.8rem;
    line-height: 1rem;
}

.kpi-card .thumbs-dwn {
    color: #b5b5b5;
    cursor: pointer;
}

.kpi-card .fa-thumbs-up {
    color: #68d38d;
    cursor: pointer;
}

.kpi-card .fa-thumbs-down {
    transform: scaleX(-1);
    color: #f37878;
}

/* Event Legend Styles */
.event-legend {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.event-legend h6 {
    color: #495057;
    font-weight: 600;
    font-size: 0.95rem;
}

.legend-category {
    background: white;
    border-radius: 6px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.legend-category-title {
    color: #212529;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e9ecef;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.legend-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.legend-item span {
    flex: 1;
}

/* Customer heatmap End*/


/* Revenue Hierarchy Start */
.dendrogram-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 800px;
}

#dendrogram-container {
    width: 100%;
    height: 800px;
    overflow: auto;
}

.node circle {
    cursor: pointer;
    transition: all 0.3s ease;
}

.node circle:hover {
    stroke-width: 3px;
    filter: brightness(1.2);
}

.node-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    font-weight: 600;
    fill: var(--text-primary);
    pointer-events: none;
}

.node-value {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    font-weight: 500;
    pointer-events: none;
}

.node-previous {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 10px;
    pointer-events: none;
}

.label-bg {
    pointer-events: none;
}

.link {
    fill: none;
    stroke: var(--border-color);
    stroke-opacity: 0.4;
    stroke-width: 1.5px;
}

/*top section*/
.header-card::before {
    background: none;
    height: 0px;
}

.header-card {
    box-shadow: none;
    border: none;
}

.header-card .card-body {
    padding: 1rem 0rem;
}

.header-card .customer-name,
.header-card .dashboard-title {
    font-weight: 700;
    margin-bottom: 0px;
}

.header-card .customer-details,
.header-card .dashboard-subtitle {
    font-size: 1rem;
}



/* Revenue Hierarchy End */

/* -------------------------------------------------------------------------- */
/*                   Sales Pipeline Bubble Chart Styles                       */
/* -------------------------------------------------------------------------- */

/* Stage Colors - Account Manager Specific */
:root {
    --stage-bids-made: #2196F3;
    --stage-bids-won: #FF9800;
    --stage-contract-signed: #4CAF50;
    --stage-new-revenue: #9C27B0;
}

/* Bubble Chart Specific Styles */
.bubble {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke: white;
    stroke-width: 2;
    z-index: -1;
}

.bubble:hover {
    stroke-width: 3;
    stroke: var(--text-primary);
    z-index: 0;
}

.bubble circle {
    z-index: -1;
}

.bubble text {
    z-index: 1;
    pointer-events: none;
}

.bubble.stage-bids-made {
    fill: var(--stage-bids-made);
}

.bubble.stage-bids-won {
    fill: var(--stage-bids-won);
}

.bubble.stage-contract-signed {
    fill: var(--stage-contract-signed);
}

.bubble.stage-new-revenue {
    fill: var(--stage-new-revenue);
}

.bubble-label {
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-size: 10px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
    fill: white;
    pointer-events: none;
    stroke-width: 0px;
    z-index: 1;
}

.stage-axis {
    font-size: 12px;
    font-weight: 600;
    text-anchor: middle;
    fill: var(--text-primary);
}

.stage-line {
    stroke: #e0e0e0;
    /* var(--border-color) */
    stroke-width: 1;
    stroke-dasharray: 3, 3;
    opacity: 0.6;
}

.cutoff-line {
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    opacity: 0.7;
}

.cutoff-label {
    font-size: 10px;
    font-weight: bold;
}

/* Enhanced Tooltip Styles (Overrides basic .tooltip if needed) */
.tooltip {
    /* Use !important to override inline or conflicting styles if necessary, but trying specific specificty first */
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    pointer-events: none;
    z-index: 2000;
    /* High z-index */
    max-width: 250px;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: none;
    /* Hidden by default */



}

.tooltip.visible {
    opacity: 1;
    display: block;
}

.tooltip-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 0.5rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 4px;
}

.tooltip-content {
    line-height: 1.4;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.tooltip-label {
    color: #ccc;
    margin-right: 10px;
}

.tooltip-value {
    font-weight: 500;
    color: white;
    text-align: right;
}

.nav-link:focus,
.nav-link:hover {
    color: white;
}

.active>.page-link,
.page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link {
    color: var(--primary-color);
}

/* Improved Filter Styles */
.filter-row {
    /* background-color: rgba(0, 0, 0, 0.02); */
    padding: 4px;
    border-radius: 4px;
}

.filter-select {
    font-size: 10px !important;
    padding: 1px 18px 1px 5px !important;
    /* Smaller padding, space for arrow */
    height: 22px;
    line-height: 20px;
    border-color: #ddd;
    color: #555;
    background-position: right 3px center;
    background-size: 9px 7px;
    /* Smaller chevron */
}

/* Ensure search input group matches filter-select height and width */
.filter-row .input-group-sm {
    height: 22px;
    flex: 1;
}

.filter-row .input-group-sm .form-control {
    height: 22px;
    font-size: 10px !important;
    padding: 1px 5px !important;
    line-height: 20px;
    border-color: #ddd;
}

.filter-row .input-group-sm .input-group-text {
    height: 22px;
    padding: 1px 6px !important;
    font-size: 10px;
    border-color: #ddd;
    line-height: 20px;
}

.filter-select:focus {
    border-color: var(--primary-blue-medium);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Reset Filter Button - Compact and Attractive */
.reset-filter-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    min-width: 32px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    cursor: pointer;
}

/* Reset button alignment with filter dropdowns */
#pipeline-reset-filters,
#bubble-reset-filters,
#team-performance-reset-filters,
#resetFilters,
#heatmap-reset-filters,
#sales-reset-btn,
#pipeline-reset-btn,
#bubble-reset-btn,
#team-performance-reset-btn,
#support-reset-btn,
#marketing-reset-btn, 
#applyFilters, 
#applyScatterPlotFilters,
#resetScatterPlotFilters,
#pipeline-table-reset-filters {
    height: 22px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
    line-height: 20px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #ddd;
}

.reset-filter-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: scale(1.05);
}

.reset-filter-btn:active {
    transform: scale(0.98);
    background-color: #dee2e6;
}

.reset-filter-btn i {
    font-size: 0.875rem;
}

.page-link {
    padding: 0px 4px;
    font-size: 11px;
}