* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fdfdfd;
    color: #1f2937;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background: white;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bolt-logo {
    width: 80px;
    height: 48px;
    background: #34d399;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 24px;
    letter-spacing: -0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.title {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.2px;
}

.subtitle {
    font-size: 15px;
    color: #6b7280;
    margin-top: 2px;
    font-weight: 400;
}

.controls {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}


.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.control-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

        
select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 16px;
    min-width: 140px;
    height: 44px;
    cursor: pointer;
    transition: border-color 0.2s;
}

select:hover {
    border-color: #9ca3af;
}

select:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Date input styling to match select elements */
.date-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 16px;
    min-width: 180px;
    height: 44px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.date-input:hover {
    border-color: #9ca3af;
}

.date-input:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.date-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* TIMEPERIOD: Additional styling for daily CSV upload */
.csv-upload-daily {
    position: fixed;
    bottom: 50px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.csv-upload-daily:hover {
    opacity: 1;
}

.csv-upload-daily label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.csv-upload-daily input {
    font-size: 11px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 120px;
}

.csv-upload-bottom:hover {
    opacity: 1;
}

.csv-upload-bottom label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.csv-upload-bottom input {
    font-size: 11px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 120px;
}

.view-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    height: 44px;
    align-items: center;
}

.view-btn {
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px;
    display: flex;
    align-items: center;
}

.view-btn.active {
    background: #34d399;
    color: white;
    box-shadow: 0 1px 3px rgba(52, 211, 153, 0.3);
}

.view-btn:not(.active) {
    color: #6b7280;
}

.view-btn:not(.active):hover {
    color: #374151;
    background: rgba(0,0,0,0.05);
}

.main-content {
    display: flex;
    height: calc(100vh - 89px);
    background: #fdfdfd;
}

.content-area {
    flex: 1;
    position: relative;
    overflow: visible;
}

/* Map View */
.map-view {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
}

.map-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#google-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.zone-polygon {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke: #2563eb;
    stroke-width: 2;
    fill-opacity: 0.4;
    pointer-events: all;
}

.zone-polygon:hover {
    stroke: #1d4ed8;
    stroke-width: 3;
    fill-opacity: 0.6;
}

.zone-label {
    font-size: 10px;
    font-weight: 700;
    fill: #1e293b;
    text-anchor: middle;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.9);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.market-share-circle {
    position: absolute;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: black;
    border: 2px solid #333;
    pointer-events: none;
    z-index: 15;
    min-width: 30px;
    min-height: 30px;
    text-align: center;
    line-height: 1;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.05);
    min-width: 180px;
    border: 1px solid rgba(0,0,0,0.05);
}

/* NEW: Map overlay dropdown for display metric selection */
.map-metric-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 20;
}

/* NEW: Label styling for the map overlay */
.map-metric-selector label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

/* NEW: Dropdown styling for the map overlay */
.map-metric-selector select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 14px;
    min-width: 160px;
    height: auto;
    cursor: pointer;
    transition: border-color 0.2s;
}

/* NEW: Hover and focus states for map overlay dropdown */
.map-metric-selector select:hover {
    border-color: #9ca3af;
}

.map-metric-selector select:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.1);
}

/* REPOSITION: Additional legend for metric-specific color coding */
.map-metric-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.05);
    min-width: 180px;
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 15;
}

.map-metric-legend > div:first-child {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.map-legend > div:first-child {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* Analytics View */
.analytics-view {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    background: white;
}

.fleet-analytics-section {
    background: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 20px 80px;
}

.fleet-view {
    padding: 0 40px;
    background: #f8fafc;
    min-height: 100%;
    overflow-y: auto;
}

.fleet-content {
    max-width: 1200px;
    margin: 0 auto;
}

.fleet-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.fleet-header h1 {
    font-size: 36px;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 12px;
}

.fleet-header p {
    font-size: 18px;
    color: #6b7280;
    font-weight: 500;
}

.fleet-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.fleet-stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #e5e7eb;
}

.fleet-stat-value {
    font-size: 32px;
    font-weight: 900;
    color: #10b981;
    margin-bottom: 8px;
}

.fleet-stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fleet-stat-sublabel {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    margin-top: 4px;
}

/* Fleet Main Container - 50/50 Split */
.fleet-main-container {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    width: 100%;
    max-width: none; /* Remove any max-width constraints */
}

/* Override Fleet view constraints for full width charts */
.fleet-view {
    width: 100%;
    padding: 0; /* Remove padding constraints */
}

.fleet-content {
    width: 100%;
    max-width: none; /* Remove max-width constraints */
    margin: 0;
    padding: 0 80px; /* No top padding */
}

.fleet-chart-section {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.fleet-leaderboard-section {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.fleet-leaderboard-title {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 24px;
}

.fleet-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border-left: 4px solid #e5e7eb;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.leaderboard-item.rank-1 {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #60a5fa 100%);
}

.leaderboard-item.rank-2 {
    border-left-color: #6366f1;
    background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 100%);
}

.leaderboard-item.rank-3 {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, #ede9fe 0%, #c4b5fd 100%);
}

.leaderboard-item.rank-4 {
    border-left-color: #a855f7;
    background: linear-gradient(135deg, #f3e8ff 0%, #d8b4fe 100%);
}

.leaderboard-item.rank-5 {
    border-left-color: #c084fc;
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
}

/* Taxi theme colors - early gradient start with darker end colors */
.leaderboard-item.taxi-theme.rank-1 {
    border-left-color: #dc2626;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 20%, #f87171 100%);
}

.leaderboard-item.taxi-theme.rank-2 {
    border-left-color: #8b5cf6;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 20%, #a78bfa 100%);
}

.leaderboard-item.taxi-theme.rank-3 {
    border-left-color: #8b5cf6;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 20%, #c4b5fd 100%);
}

.leaderboard-item.taxi-theme.rank-4 {
    border-left-color: #dc2626;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 20%, #f87171 100%);
}

.leaderboard-item.taxi-theme.rank-5 {
    border-left-color: #8b5cf6;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 20%, #c4b5fd 100%);
}

/* Make metrics text more visible for top 5 positions */
.leaderboard-item.rank-1 .leaderboard-metrics,
.leaderboard-item.rank-2 .leaderboard-metrics,
.leaderboard-item.rank-3 .leaderboard-metrics,
.leaderboard-item.rank-4 .leaderboard-metrics,
.leaderboard-item.rank-5 .leaderboard-metrics {
    color: #4b5563;
    font-weight: 500;
}

/* Taxi theme metrics visibility */
.leaderboard-item.taxi-theme.rank-1 .leaderboard-metrics,
.leaderboard-item.taxi-theme.rank-2 .leaderboard-metrics,
.leaderboard-item.taxi-theme.rank-3 .leaderboard-metrics,
.leaderboard-item.taxi-theme.rank-4 .leaderboard-metrics,
.leaderboard-item.taxi-theme.rank-5 .leaderboard-metrics {
    color: #4b5563;
    font-weight: 500;
}

/* Fleet bar taxi theme colors - solid colors matching leaderboard end colors */
.fleet-bar-fill.taxi-theme.fleet-bar-1,
.fleet-bar-fill.taxi-theme.fleet-bar-4,
.fleet-bar-fill.taxi-theme.fleet-bar-7,
.fleet-bar-fill.taxi-theme.fleet-bar-10 {
    background: #f87171 !important;
}

.fleet-bar-fill.taxi-theme.fleet-bar-2,
.fleet-bar-fill.taxi-theme.fleet-bar-5,
.fleet-bar-fill.taxi-theme.fleet-bar-8 {
    background: #7c3aed !important;
}

.fleet-bar-fill.taxi-theme.fleet-bar-3,
.fleet-bar-fill.taxi-theme.fleet-bar-6,
.fleet-bar-fill.taxi-theme.fleet-bar-9 {
    background: #a78bfa !important;
}

/* Fleet leaderboard title center alignment */
.fleet-leaderboard-title {
    text-align: center;
    margin-bottom: 8px;
}

/* Leaderboard explanation */
.leaderboard-explanation {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    font-style: italic;
}

/* Fleet header with date range */
.fleet-header {
    padding: 8px 24px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    min-height: 40px;
    position: relative; /* Add positioning context */
}

.fleet-date-range-group {
    position: relative;
    display: none; /* Hidden by default, shown only in daily mode */
}

.fleet-date-range-group.show {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* Date range button and popup */
.date-range-group {
    position: relative;
    margin-left: auto;
}

.date-range-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.date-range-btn:hover {
    background: #2563eb;
}

/* Removed duplicate .fleet-date-range-group rule - handled by .show class */

.fleet-date-range-group .date-range-text {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.fleet-date-range-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.fleet-date-range-group .date-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.fleet-date-range-group .apply-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.fleet-date-range-group .apply-btn:hover {
    background: #2563eb;
}

.date-range-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.date-range-content label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.date-range-content .date-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.apply-btn, .close-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apply-btn {
    background: #10b981;
    color: white;
    border: none;
}

.apply-btn:hover {
    background: #059669;
}

.close-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.close-btn:hover {
    background: #e5e7eb;
}

/* Company logo styles */
.company-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    margin-right: 8px;
    vertical-align: middle;
}

.dtc-logo {
    width: 32px;
    height: 32px;
    background: #1e40af;
    border: 3px solid #ef4444;
    border-radius: 50%;
}

.kabi-logo {
    width: 40px;
    height: 16px;
    background: #7c3aed;
    border-radius: 2px;
    font-size: 9px;
}

.kabi-logo-img {
    width: 40px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
    object-fit: contain;
    background: transparent;
    mix-blend-mode: multiply;
}

.leaderboard-rank {
    font-size: 12px;
    font-weight: 900;
    color: #1f2937;
    width: 48px;
    text-align: center;
}

.leaderboard-company {
    flex: 1;
    margin-left: 16px;
}

.leaderboard-company-name {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.leaderboard-metrics {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    gap: 12px;
}

.leaderboard-score {
    font-size: 20px;
    font-weight: 800;
    color: #000000;
    text-align: right;
    min-width: 60px;
}

/* Fleet Trend Chart Styles */
.fleet-trend-section {
    margin-top: 40px;
    width: 100%;
}

.fleet-trend-container {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.fleet-trend-container .comparison-controls {
    margin-bottom: 0;
}

.fleet-table-section {
    background: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 40px;
    padding: 20px 80px;
}

.fleet-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.download-icon {
    font-size: 16px;
}

.fleet-table-container {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.fleet-table-wrapper {
    max-height: 500px;
    overflow: auto;
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.fleet-performance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    position: relative;
}

.fleet-performance-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Freeze first column (Fleet Company) */
.fleet-performance-table th:first-child,
.fleet-performance-table td:first-child {
    position: sticky;
    left: 0;
    background: #f8f9fa;
    z-index: 11;
    border-right: 2px solid #e5e7eb;
}

/* Special styling for the top-left corner cell */
.fleet-performance-table th:first-child {
    z-index: 12;
    background: #e5e7eb;
}

/* Ensure data cells in first column have proper background */
.fleet-performance-table td:first-child {
    background: white;
    font-weight: 600;
    color: #374151;
}

.fleet-performance-table tbody tr:hover td:first-child {
    background: #f9fafb;
}

.fleet-performance-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

.fleet-performance-table tbody tr:hover {
    background: #f9fafb;
}

.fleet-performance-table tbody tr:last-child td {
    border-bottom: none;
}

.excel-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    border-right: 1px solid #d1d5db;
}

.excel-header:hover {
    background: #e5e7eb;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-text {
    flex: 1;
    text-align: left;
}

.header-icons {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.sort-icon {
    font-size: 10px;
    color: #9ca3af;
    cursor: pointer;
}

.filter-arrow {
    font-size: 8px;
    color: #6b7280;
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
}

.filter-arrow:hover {
    background: #f3f4f6;
}

.filter-arrow.active {
    background: #3b82f6;
    color: white;
}

.excel-header.asc .sort-icon {
    color: #3b82f6;
}

.excel-header.desc .sort-icon {
    color: #3b82f6;
}

.filter-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 280px;
    max-height: 400px;
    overflow: hidden;
}

.filter-header {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

.filter-search {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
}

.filter-search:focus {
    border-color: #3b82f6;
}

.filter-clear {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.filter-clear:hover {
    background: #e5e7eb;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 0;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    gap: 8px;
}

.filter-option:hover {
    background: #f9fafb;
}

.filter-option input[type="checkbox"] {
    margin-right: 8px;
}

.filter-option input[type="radio"] {
    margin-right: 8px;
}

.filter-footer {
    padding: 8px 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.filter-ok, .filter-cancel {
    padding: 6px 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.filter-ok {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.filter-ok:hover {
    background: #2563eb;
}

.filter-cancel {
    background: white;
}

.filter-cancel:hover {
    background: #f9fafb;
}

.numeric-filters {
    padding: 0;
}

.filter-input {
    margin-left: 8px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    width: 60px;
    outline: none;
}

.filter-input:focus {
    border-color: #3b82f6;
}

.value-list {
    max-height: 150px;
    overflow-y: auto;
}

.unique-values {
    max-height: 120px;
    overflow-y: auto;
}

.fleet-trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.fleet-trend-title {
    font-size: 12px;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
}

.fleet-trend-controls {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.fleet-dropdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.fleet-dropdown label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.fleet-dropdown select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1f2937;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.fleet-dropdown select:hover {
    border-color: #d1d5db;
}

.fleet-dropdown select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fleet-trend-chart-wrapper {
    width: 100%;
    height: 280px;
    position: relative;
}

.fleet-trend-chart {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.fleet-chart-container {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.fleet-chart-title {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 32px;
    text-align: center;
}

.fleet-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fleet-bar-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.fleet-company-label {
    width: 280px;
    font-weight: 600;
    color: #374151;
    font-size: 16px;
    flex-shrink: 0;
}

.fleet-size-label {
    font-weight: 400;
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

.fleet-bar-container {
    flex: 1;
    height: 40px;
    background: #f3f4f6;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.fleet-bar-fill {
    height: 100%;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.8s ease;
    position: relative;
}

.fleet-bar-value {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
}

/* Position bar values inside the colored bar close to right edge for Taxi product only */
.fleet-bar-fill.taxi-theme {
    padding-right: 2px;
}
.taxi-theme .fleet-bar-value {
    text-align: right;
    margin-left: auto;
    margin-right: 0;
    color: white;
    font-weight: 700;
}

.fleet-bar-value-center {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    text-align: left;
    padding-left: 8px;
}


.fleet-percentage-label {
    width: 80px;
    text-align: right;
    font-weight: 700;
    color: #374151;
    font-size: 16px;
}

/* Fleet bar colors */
.fleet-bar-1 { background: linear-gradient(90deg, #065f46, #064e3b); }
.fleet-bar-2 { background: linear-gradient(90deg, #047857, #065f46); }
.fleet-bar-3 { background: linear-gradient(90deg, #059669, #047857); }
.fleet-bar-4 { background: linear-gradient(90deg, #10b981, #059669); }
.fleet-bar-5 { background: linear-gradient(90deg, #16a34a, #10b981); }
.fleet-bar-6 { background: linear-gradient(90deg, #22c55e, #16a34a); }
.fleet-bar-7 { background: linear-gradient(90deg, #34d399, #22c55e); }
.fleet-bar-8 { background: linear-gradient(90deg, #6ee7b7, #34d399); }
.fleet-bar-9 { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.fleet-bar-10 { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.fleet-bar-others { background: linear-gradient(90deg, #9ca3af, #6b7280); }

.fleet-insights {
    display: flex;
    gap: 24px;
    margin: -10px 0 30px 0;
    padding-top: 0;
}

.fleet-insights .fleet-insight-card {
    flex: 1;
}

.fleet-insight-card {
    background: white;
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    text-align: center;
}

.fleet-insight-title {
    font-size: 16px;
    font-weight: 700;
    color: #6b7280;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fleet-insight-value {
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
    text-align: center;
    margin-bottom: 8px;
}

.fleet-insight-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .fleet-company-label {
        width: 200px;
        font-size: 12px;
    }
    
    .fleet-bar-container {
        height: 32px;
    }
    
    .fleet-chart-container {
        padding: 20px;
    }
    
    .fleet-header h1 {
        font-size: 14px;
    }
}

/* Periodic Comparisons Section */
.comparison-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e5e7eb;
}

.analytics-main-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.chart-section {
    flex: 3;
}

.insights-section {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.insights-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e5e7eb;
    height: 630px;
    display: flex;
    flex-direction: column;
}

.insights-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.metrics-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px 0;
}

.metric-summary-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.metric-summary-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.metric-summary-card .metric-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-summary-card .metric-value {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metric-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metric-period {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.no-metrics-selected {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    font-size: 14px;
    line-height: 1.6;
}

.insights-textarea {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #374151;
    background: #f8fafc;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.insights-textarea:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
    background: white;
}

.insights-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.chart-container {
    width: 100%;
    height: 500px;
    position: relative;
    margin-top: 5px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.legend-bar {
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 2px;
}

.legend-line {
    width: 20px;
    height: 3px;
    background: #3b82f6;
    border-radius: 2px;
    position: relative;
}

.legend-line::after {
    content: '';
    position: absolute;
    right: -2px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-grid-line {
    stroke: #f3f4f6;
    stroke-width: 1;
}

.chart-axis-line {
    stroke: #d1d5db;
    stroke-width: 1;
}

.chart-axis-text {
    font-size: 11px;
    fill: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chart-bar {
    fill: #22c55e;
    transition: opacity 0.2s ease;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-line {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 2;
}

.chart-line-point {
    fill: #3b82f6;
    stroke: white;
    stroke-width: 2;
    transition: r 0.2s ease;
}

.chart-line-point:hover {
    r: 5;
}

.chart-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    display: none;
    white-space: nowrap;
}

.comparison-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.fleet-analytics-section .comparison-controls {
    grid-template-columns: 1fr 1fr 1fr;
}

.metric-selector-analytics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-selector-analytics label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.metric-selector-analytics select {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.metric-selector-analytics input[type="text"] {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.date-range-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.date-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.date-separator {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.date-input:hover {
    border-color: #9ca3af;
}

.date-input:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.1);
}

.metric-selector-analytics select:hover,
.metric-selector-analytics input[type="text"]:hover {
    border-color: #9ca3af;
}

.metric-selector-analytics select:focus,
.metric-selector-analytics input[type="text"]:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

@media (max-width: 768px) {
    .comparison-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.summary-card h4 {
    color: #6b7280;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-card .big-number {
    font-size: 12px;
    font-weight: bold;
    color: #1e40af;
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.analytics-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.metric-selector, .sort-order {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-selector label, .sort-order label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.metric-selector select, .sort-order select {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
}

.zone-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.zone-rank.top3 {
    background: #10b981;
}

.zone-rank.bottom3 {
    background: #ef4444;
}

.zone-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid;
    position: relative;
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.zone-card.reliability-high { border-left-color: #10b981; }
.zone-card.reliability-medium { border-left-color: #f59e0b; }
.zone-card.reliability-low { border-left-color: #ef4444; }

.zone-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1e40af;
}

.zone-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
}

.metric {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.metric-value {
    font-weight: bold;
    color: #ea580c;
}

.metric-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.reliability-high { background: #10b981; }
.reliability-medium { background: #f59e0b; }
.reliability-low { background: #ef4444; }
.reliability-lowest { background: #dc2626; }

.sidebar {
    width: 340px;
    background: #f8f9fa;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.panel {
    background: white;
    margin: 0 16px 16px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 24px;
}

.panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.stat-value.highlight {
    color: #34d399;
}

.zone-details {
    flex: 1;
    overflow-y: auto;
    max-height: none;
}

.zone-details .panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.zone-info {
    flex: 1;
    overflow-y: auto;
}

.zone-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: #34d399;
    margin-bottom: 12px;
}

.zone-info .stat-item {
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 6px;
}

.zone-info .stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.zone-info .stat-item span:first-child {
    font-size: 16px;
    color: #6b7280;
}

.metric-good { color: #34d399 !important; }
.metric-warning { color: #fbbf24 !important; }
.metric-poor { color: #ef4444 !important; }        .message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.success { 
    background: rgba(52, 211, 153, 0.1); 
    color: #10b981;
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.error { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.info { 
    background: rgba(59, 130, 246, 0.1); 
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.warning { 
    background: rgba(245, 101, 101, 0.1); 
    color: #dc2626;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

.no-data {
    text-align: center;
    padding: 40px;
    opacity: 0.7;
    font-style: italic;
    color: #6b7280;
}

@media (max-width: 1200px) {
    .controls {
        flex-wrap: wrap;
    }
    
    .main-content {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }

    .zones-grid {
        grid-template-columns: 1fr;
    }
}

/* OVERRIDE: Force bottom-left positioning with highest priority */
.upload-buttons-left {
    position: fixed !important;
    bottom: 10px !important;
    left: 10px !important;
    right: unset !important;
    top: unset !important;
    transform: none !important;
    z-index: 10000 !important;
    margin: 0 !important;
}

/* MOVE: Alternative positioning attempt */
body .upload-buttons-left {
    left: 10px !important;
    right: auto !important;
}

html .upload-buttons-left {
    left: 10px !important;
    right: auto !important;
}

/* RESET: ID-based rule to beat all others */
#upload-buttons-left {
    position: fixed !important;
    left: 12px !important;
    bottom: 12px !important;
    right: auto !important;
    top: auto !important;
    inset: auto auto 12px 12px !important;
    z-index: 10000 !important;
    margin: 0 !important;
}

.upload-row {
    font-size: 7px !important;
}

.upload-row label {
    font-size: 7px !important;
}

.upload-row input {
    font-size: 7px !important;
}

/* SIMPLE: Use the exact same approach as the original working right-side positioning */
#upload-buttons-left {
    position: fixed;
    bottom: 50px;
    left: 10px;
    background: rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0.4;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#upload-buttons-left:hover {
    opacity: 0.8;
}

#upload-buttons-left.hidden {
    display: none;
}

/* Overview View Styles */
.overview-view {
    padding: 0 80px;
    background: #f8fafc;
    min-height: 100%;
    overflow-y: auto;
}

.overview-container {
    width: 100%;
    margin: 0;
    padding-top: 20px;
}

.overview-header {
    text-align: center;
    margin-bottom: 30px;
}

.overview-title {
    font-size: 19px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 7px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.overview-date {
    font-size: 19px;
    color: #6b7280;
    font-weight: 400;
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.metric-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.metric-card-header {
    text-align: center;
    margin-bottom: 16px;
}

.metric-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metric-card-body {
    text-align: center;
}

.metric-main-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
}

.metric-comparisons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    min-height: 40px;
}

.comparison-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
}

.comparison-values {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.comparison-value {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.comparison-change {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.comparison-change.positive {
    color: #059669;
    background: #d1fae5;
}

.comparison-change.negative {
    color: #dc2626;
    background: #fee2e2;
}

.comparison-change.neutral {
    color: #6b7280;
    background: #f3f4f6;
}

/* Responsive design for Overview */
@media (max-width: 1200px) {
    .overview-metrics {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .overview-view {
        padding: 20px 30px;
    }
    
    .metric-card {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .overview-view {
        padding: 15px 20px;
    }
    
    .overview-title {
        font-size: 22px;
    }
    
    .overview-date {
        font-size: 14px;
    }
    
    .metric-main-value {
        font-size: 14px;
    }
    
    .metric-comparison {
        padding: 10px 14px;
        min-height: 44px;
    }
    
    .comparison-values {
        gap: 6px;
    }
    
    .comparison-value {
        font-size: 14px;
    }
    
    .comparison-change {
        font-size: 12px;
        padding: 2px 4px;
    }
}

/* Overview Bottom Section - Split Layout */
.overview-bottom-section {
    margin-top: 32px;
    display: flex;
    gap: 24px;
    min-height: 400px;
}

.product-split-container {
    width: 30%;
    padding: 6px;
    background: #feffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.overview-right-section {
    width: 70%;
    display: flex;
    flex-direction: column;
}

.trend-chart-container {
    width: 100%;
    padding: 24px;
    background: #feffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.trend-chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 20px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.line-chart-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 10px 5px 10px;
}

.line-chart {
    width: 100%;
    height: 100%;
}

.product-split-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 20px 0 8px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.donut-chart-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
}

.donut-chart-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 400/320;
    max-width: 400px;
    height: auto;
}

.donut-chart {
    width: 100%;
    height: 100%;
}

.center-value {
    font-size: 20px;
    font-weight: 700;
    fill: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.center-label {
    font-size: 13px;
    font-weight: 500;
    fill: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Donut segment styles */
.donut-segment {
    transition: all 0.3s ease;
    cursor: pointer;
}

.donut-segment:hover {
    stroke-width: 2;
    stroke: #ffffff;
    filter: brightness(1.1);
}

/* External labels */
.label-group {
    /* No rotation needed */
}

.label-text {
    font-size: 16px;
    font-weight: 600;
    fill: #374151;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.label-percentage {
    font-size: 14px;
    font-weight: 500;
    fill: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.label-icon {
    font-size: 18px;
    font-family: Arial, sans-serif;
}

.leader-line {
    stroke: #9ca3af;
    stroke-width: 1;
    fill: none;
}

/* Deep Dives Tab Styles */
.deep-dives-view {
    background: #f8fafc;
    min-height: 100%;
    overflow-y: auto;
    padding: 0 100px 60px 100px;
    width: 100vw;
    position: fixed;
    top: 89px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.deep-dives-container {
    margin: 0 auto;
}

.deep-dives-header {
    text-align: center;
    margin-bottom: 20px;
}

.toggle-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-switch {
    display: inline-flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
    position: relative;
}

.toggle-input {
    display: none;
}

.toggle-option {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
}

.toggle-input:checked + .toggle-option {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-option:hover {
    color: #374151;
}

.toggle-input:checked + .toggle-option:hover {
    color: white;
}

/* Hide compare elements in single mode */
.deep-dives-view.single-mode .compare-period-group {
    display: none;
}

.deep-dives-view.single-mode #drop-indicator {
    display: none;
}

.deep-dives-view.single-mode #previous-period-value {
    display: none;
}

.deep-dives-view.single-mode .period-label:has(+ #previous-period-value) {
    display: none;
}

/* Hide the entire period section containing previous period value */
.deep-dives-view.single-mode .period-section:has(#previous-period-value) {
    display: none;
}

/* Hide the redundant title and header in both modes */
#deep-dives-comparison-title {
    display: none;
}

.comparison-header {
    display: none;
}

/* Hours Analysis Interface */
.hours-analysis-interface {
    margin-top: 30px;
    border: 1px solid #e5e7eb;
    position: relative;
}

/* Hours From Metrics Interface - Match Flow 1 styling */
.hours-from-metrics-interface {
    margin-top: 30px;
    border: 1px solid #e5e7eb;
    position: relative;
}

.hours-analysis-header {
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb-item {
    cursor: pointer;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: #3b82f6;
}

.breadcrumb-separator {
    color: #9ca3af;
}

.breadcrumb-current {
    color: #1f2937;
    font-weight: 500;
}

.hours-analysis-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hours-analysis-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin: 0 auto;
}

.hour-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 2;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hour-card:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.hour-card.highlighted {
    border-color: #ef4444;
    background: #fef2f2;
    cursor: pointer;
}

.hour-card.highlighted:hover {
    border-color: #dc2626;
    background: #fee2e2;
}

.hour-time {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    text-align: center;
}

.hour-impact {
    font-size: 16px;
    color: #000000;
    text-align: center;
    line-height: 1.2;
    font-weight: 600;
}

.hour-card.highlighted .hour-impact {
    color: #000000;
    font-weight: 600;
}

.hour-card.highlighted .hour-orders {
    color: #6b7280;
}

.hour-card.highlighted .hour-orders-small {
    color: #6b7280;
}

.hour-orders {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
}

.hour-orders-small {
    font-size: 10px;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
}

.hour-percentage {
    font-size: 11px;
    color: #6b7280;
}

.hour-card.highlighted .hour-percentage {
    color: #b91c1c;
}

/* Hour card selection state */
.hour-card.selected {
    border-color: #2563eb !important;
    background: #dbeafe !important;
    transform: scale(1.02);
}

.hour-card.selected .hour-time,
.hour-card.selected .hour-impact,
.hour-card.selected .hour-orders,
.hour-card.selected .hour-orders-small,
.hour-card.selected .hour-percentage {
    color: #1e40af;
    font-weight: 600;
}

.hour-selection-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.hour-card {
    position: relative;
}

/* Floating action button */
.floating-action-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #6b7280;
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.floating-action-btn:hover {
    background: #4b5563;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

/* Color coding for top 6 hours - high contrast version */
.hour-card.highlighted.rank-1 {
    border-color: #7f1d1d;
    background: #dc2626;
    color: white;
}

.hour-card.highlighted.rank-1:hover {
    border-color: #7f1d1d;
    background: #b91c1c;
}

.hour-card.highlighted.rank-1 .hour-time,
.hour-card.highlighted.rank-1 .hour-impact,
.hour-card.highlighted.rank-1 .hour-orders,
.hour-card.highlighted.rank-1 .hour-percentage {
    color: white;
}

.hour-card.highlighted.rank-1 .hour-orders-small {
    color: white;
}

.hour-card.highlighted.rank-2 {
    border-color: #991b1b;
    background: #ef4444;
    color: white;
}

.hour-card.highlighted.rank-2:hover {
    border-color: #991b1b;
    background: #dc2626;
}

.hour-card.highlighted.rank-2 .hour-time,
.hour-card.highlighted.rank-2 .hour-impact,
.hour-card.highlighted.rank-2 .hour-orders,
.hour-card.highlighted.rank-2 .hour-percentage {
    color: white;
}

.hour-card.highlighted.rank-2 .hour-orders-small {
    color: white;
}

.hour-card.highlighted.rank-3 {
    border-color: #dc2626;
    background: #f87171;
    color: white;
}

.hour-card.highlighted.rank-3:hover {
    border-color: #dc2626;
    background: #ef4444;
}

.hour-card.highlighted.rank-3 .hour-time,
.hour-card.highlighted.rank-3 .hour-impact,
.hour-card.highlighted.rank-3 .hour-orders,
.hour-card.highlighted.rank-3 .hour-percentage {
    color: white;
}

.hour-card.highlighted.rank-3 .hour-orders-small {
    color: white;
}

.hour-card.highlighted.rank-4 {
    border-color: #ef4444;
    background: #fca5a5;
}

.hour-card.highlighted.rank-4:hover {
    border-color: #ef4444;
    background: #f87171;
}

.hour-card.highlighted.rank-5 {
    border-color: #f87171;
    background: #fecaca;
}

.hour-card.highlighted.rank-5:hover {
    border-color: #f87171;
    background: #fca5a5;
}

.hour-card.highlighted.rank-6 {
    border-color: #fca5a5;
    background: #fed7d7;
}

.hour-card.highlighted.rank-6:hover {
    border-color: #fca5a5;
    background: #fecaca;
}

/* New color coding for top 7 hours by orders - matches rank styling */
.hour-card.hour-red-1 {
    border-color: #7f1d1d;
    background: #dc2626;
    color: white;
}

.hour-card.hour-red-1:hover {
    border-color: #7f1d1d;
    background: #b91c1c;
}

.hour-card.hour-red-1 .hour-time,
.hour-card.hour-red-1 .hour-percentage {
    color: white;
}

.hour-card.hour-red-1 .hour-orders,
.hour-card.hour-red-1 .hour-orders-small {
    color: white;
}

.hour-card.hour-red-1 .hour-impact {
    color: white;
    font-weight: 600;
}

.hour-card.hour-red-2 {
    border-color: #991b1b;
    background: #ef4444;
    color: white;
}

.hour-card.hour-red-2:hover {
    border-color: #991b1b;
    background: #dc2626;
}

.hour-card.hour-red-2 .hour-time,
.hour-card.hour-red-2 .hour-percentage {
    color: white;
}

.hour-card.hour-red-2 .hour-orders,
.hour-card.hour-red-2 .hour-orders-small {
    color: white;
}

.hour-card.hour-red-2 .hour-impact {
    color: white;
    font-weight: 600;
}

.hour-card.hour-red-3 {
    border-color: #dc2626;
    background: #f87171;
    color: white;
}

.hour-card.hour-red-3:hover {
    border-color: #dc2626;
    background: #ef4444;
}

.hour-card.hour-red-3 .hour-time,
.hour-card.hour-red-3 .hour-percentage {
    color: white;
}

.hour-card.hour-red-3 .hour-orders,
.hour-card.hour-red-3 .hour-orders-small {
    color: white;
}

.hour-card.hour-red-3 .hour-impact {
    color: white;
    font-weight: 600;
}

.hour-card.hour-red-4 {
    border-color: #ef4444;
    background: #fca5a5;
}

.hour-card.hour-red-4:hover {
    border-color: #ef4444;
    background: #f87171;
}


.hour-card.hour-red-5 {
    border-color: #f87171;
    background: #fecaca;
}

.hour-card.hour-red-5:hover {
    border-color: #f87171;
    background: #fca5a5;
}


.hour-card.hour-red-6 {
    border-color: #fca5a5;
    background: #fed7d7;
}

.hour-card.hour-red-6:hover {
    border-color: #fca5a5;
    background: #fecaca;
}


.hour-card.hour-red-7 {
    border-color: #fecaca;
    background: #fef2f2;
}

/* Green hour styling for improvements in compare mode */
.hour-card.hour-green-1 {
    border-color: #065f46;
    background: #047857;
    color: white;
}

.hour-card.hour-green-1:hover {
    border-color: #065f46;
    background: #059669;
}

.hour-card.hour-green-1 .hour-time,
.hour-card.hour-green-1 .hour-percentage {
    color: white;
}

.hour-card.hour-green-1 .hour-orders {
    color: white;
}

.hour-card.hour-green-1 .hour-impact {
    color: white;
    font-weight: 600;
}

.hour-card.hour-green-1 .hour-orders-small {
    color: white;
}

.hour-card.hour-green-2 {
    border-color: #047857;
    background: #059669;
    color: white;
}

.hour-card.hour-green-2:hover {
    border-color: #047857;
    background: #0d9488;
}

.hour-card.hour-green-2 .hour-time,
.hour-card.hour-green-2 .hour-percentage {
    color: white;
}

.hour-card.hour-green-2 .hour-orders {
    color: white;
}

.hour-card.hour-green-2 .hour-impact {
    color: white;
    font-weight: 600;
}

.hour-card.hour-green-2 .hour-orders-small {
    color: white;
}

.hour-card.hour-green-3 {
    border-color: #059669;
    background: #10b981;
    color: white;
}

.hour-card.hour-green-3:hover {
    border-color: #059669;
    background: #14b8a6;
}

.hour-card.hour-green-3 .hour-time,
.hour-card.hour-green-3 .hour-percentage {
    color: white;
}

.hour-card.hour-green-3 .hour-orders {
    color: white;
}

.hour-card.hour-green-3 .hour-impact {
    color: white;
    font-weight: 600;
}

.hour-card.hour-green-3 .hour-orders-small {
    color: white;
}

.hour-card.hour-green-4 {
    border-color: #10b981;
    background: #a7f3d0;
}

.hour-card.hour-green-4:hover {
    border-color: #10b981;
    background: #bbf7d0;
}

.hour-card.hour-green-5 {
    border-color: #22c55e;
    background: #bbf7d0;
}

.hour-card.hour-green-5:hover {
    border-color: #22c55e;
    background: #d1fae5;
}

.hour-card.hour-green-6 {
    border-color: #4ade80;
    background: #d1fae5;
}

.hour-card.hour-green-6:hover {
    border-color: #4ade80;
    background: #ecfdf5;
}

/* Metric color coding - 4-tier system */
.metric-card.metric-dark-green,
.metrics-first-card.metric-dark-green {
    border-left: 4px solid #065f46; /* Much darker green border */
    background: #bbf7d0; /* Slightly less saturated green background */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.25);
}

.metric-card.metric-light-green,
.metrics-first-card.metric-light-green {
    border-left: 4px solid #34d399; /* Brighter light green border */
    background: #f0fdf4; /* Very light green background */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.1);
}

.metric-card.metric-light-red,
.metrics-first-card.metric-light-red {
    border-left: 4px solid #fca5a5; /* Very light red border */
    background: #fef2f2; /* Very light red background */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 165, 165, 0.1);
}

.metric-card.metric-dark-red,
.metrics-first-card.metric-dark-red {
    border-left: 4px solid #b91c1c; /* Darker red border */
    background: #fee2e2; /* Slightly more saturated red background */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

.metric-card.metric-neutral,
.metrics-first-card.metric-neutral {
    background: #f3f4f6; /* Grey background for unknown metrics */
}

/* Additional color shades for percentage change ranges */
.metric-card.metric-very-light-green,
.metrics-first-card.metric-very-light-green {
    border-left: 4px solid #a7f3d0; /* Very light green border */
    background: #f0fdf4; /* Very light green background */
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(167, 243, 208, 0.1);
}

.metric-card.metric-medium-green,
.metrics-first-card.metric-medium-green {
    border-left: 4px solid #10b981; /* Medium green border */
    background: #d1fae5; /* Medium green background */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.metric-card.metric-very-light-red,
.metrics-first-card.metric-very-light-red {
    border-left: 4px solid #fcd34d; /* Very light red border (amber) */
    background: #fffbeb; /* Very light red background */
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(252, 211, 77, 0.1);
}

.metric-card.metric-medium-red,
.metrics-first-card.metric-medium-red {
    border-left: 4px solid #f59e0b; /* Medium red border (orange) */
    background: #fef3c7; /* Medium red background */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.hour-card.hour-red-7:hover {
    border-color: #fecaca;
    background: #fed7d7;
}

/* Responsive design for hours grid */
@media (max-width: 1024px) {
    .hours-grid,
    .hours-from-metrics-grid,
    .hours-from-zones-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .hours-grid,
    .hours-from-metrics-grid,
    .hours-from-zones-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .hour-card {
        padding: 6px 4px;
        min-height: 30px;
    }
    
    .hours-analysis-title {
        font-size: 20px;
    }
    
    .hours-analysis-subtitle {
        font-size: 14px;
    }
}

.deep-dives-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.deep-dives-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deep-dives-control-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.deep-dives-select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 16px;
    min-width: 180px;
    height: 44px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.deep-dives-select:hover {
    border-color: #9ca3af;
}

.deep-dives-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-range-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.date-input:hover {
    border-color: #9ca3af;
}

.date-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-separator {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* Deep Dives Comparison Card */
.deep-dives-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.comparison-header {
    text-align: center;
    margin-bottom: 16px;
}

.comparison-periods {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 16px;
}

.period-section {
    text-align: center;
}

.period-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.period-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
    text-align: center;
}

.comparison-result {
    display: flex;
    justify-content: center;
    gap: 16px;
    align-items: center;
}

.drop-indicator {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drop-indicator::before {
    content: "↓";
    font-size: 18px;
}

.drop-indicator.improvement {
    background: #d1fae5 !important;
    border-color: #86efac !important;
    color: #059669 !important;
}

.drop-indicator.improvement::before {
    content: "↑";
}

.investigate-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.investigate-button:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.investigate-button:active {
    background: #1e40af;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.4);
}

/* Investigation Interface */
.investigation-interface {
    margin-top: 32px;
}

.investigation-types {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 12px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.investigation-type-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 110px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.investigation-type-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.investigation-type-btn.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.investigation-type-icon {
    font-size: 22px;
    margin-bottom: 6px;
    display: block;
}

.investigation-type-label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

/* Responsive Design for Deep Dives */
@media (max-width: 1024px) {
    .deep-dives-view {
        padding: 20px 40px;
    }
    
    .comparison-periods {
        gap: 40px;
    }
    
    .period-value {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .deep-dives-view {
        padding: 15px 25px;
    }
    
    .deep-dives-title {
        font-size: 22px;
    }
    
    .deep-dives-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .deep-dives-select {
        min-width: 100%;
    }
    
    .comparison-periods {
        flex-direction: column;
        gap: 24px;
    }
    
    .comparison-result {
        flex-direction: column;
        gap: 12px;
    }
    
    .drop-indicator,
    .investigate-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Overall Metrics Section */
.overview-metrics-section {
    margin-top: 32px;
}

.metrics-chart-container {
    width: 100%;
    padding: 24px;
    background: #feffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.metrics-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.metrics-chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metrics-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.metrics-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metrics-dropdown label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.metrics-dropdown select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 14px;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.metrics-dropdown select:hover {
    border-color: #9ca3af;
}

.metrics-dropdown select:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.metrics-line-chart-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    min-height: 400px;
}

.metrics-line-chart {
    width: 100%;
    height: 100%;
}

/* Responsive design for overview bottom section */
@media (max-width: 1024px) {
    .overview-bottom-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .product-split-container,
    .overview-right-section {
        width: 100%;
    }
    
    .overview-metrics-section {
        margin-top: 24px;
    }
    
    .metrics-chart-container {
        padding: 20px;
    }
    
    .metrics-chart-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .overview-bottom-section {
        margin-top: 24px;
        min-height: 300px;
    }
    
    .product-split-container {
        padding: 20px;
    }
    
    .donut-chart-wrapper {
        max-width: 280px;
        height: 280px;
    }
    
    .center-value {
        font-size: 32px;
    }
    
    .center-label {
        font-size: 11px;
    }
    
    .label-text {
        font-size: 11px;
    }
    
    .label-percentage {
        font-size: 10px;
    }
}

/* Trend Chart Animations */
@keyframes drawLine {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Hourly View Styles - Based on React Component */
#hourly-view {
    background: #f8fafc;
    height: calc(100vh - 89px);
    overflow-y: auto;
    padding: 20px;
    width: 100vw;
    position: fixed;
    top: 89px;
    left: 0;
    right: 0;
    bottom: 0;
}

.hourly-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hourly-header {
    text-align: center;
    margin-bottom: 32px;
}

.hourly-header h1 {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.hourly-header p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.hourly-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.hourly-metric-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hourly-metric-selector label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.hourly-metric-selector select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    min-width: 140px;
}

.hourly-view-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.hourly-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.hourly-view-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.hourly-view-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.hourly-view-btn.active:hover {
    background: #2563eb;
}

.hourly-sub-view h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: -28px 0 12px 0;
    text-align: center;
}

.hourly-chart-container {
    background: #feffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hourly-chart-container svg {
    width: 100%;
    height: 400px;
    max-width: 1200px; /* Increased to allow full width */
}

.time-periods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.time-period-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.time-period-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.time-period-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
    line-height: 1.2;
}

.time-period-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

/* Smart 6-color distribution-based coding from dark red to dark green */
.time-period-card.metric-color-1 {
    border-color: #7f1d1d;
    background: #fef2f2;
}

.time-period-card.metric-color-1 .time-period-value {
    color: #7f1d1d; /* Dark red - worst */
}

.time-period-card.metric-color-2 {
    border-color: #dc2626;
    background: #fef2f2;
}

.time-period-card.metric-color-2 .time-period-value {
    color: #dc2626; /* Red */
}

.time-period-card.metric-color-3 {
    border-color: #ea580c;
    background: #fff7ed;
}

.time-period-card.metric-color-3 .time-period-value {
    color: #ea580c; /* Orange/Yellow - neutral */
}

.time-period-card.metric-color-4 {
    border-color: #22c55e;
    background: #effdf4;
}

.time-period-card.metric-color-4 .time-period-value {
    color: #22c55e; /* Lighter shade of the same dark green tone */
}

.time-period-card.metric-color-5 {
    border-color: #059669;
    background: #f0fdf4;
}

.time-period-card.metric-color-5 .time-period-value {
    color: #059669; /* Medium green */
}

.time-period-card.metric-color-6 {
    border-color: #064e3b;
    background: #ecfdf5;
}

.time-period-card.metric-color-6 .time-period-value {
    color: #064e3b; /* Dark green - best */
}


/* Heatmap Table Styles */
.heatmap-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
    overflow-x: auto;
}

.heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.heatmap-table th,
.heatmap-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
    font-weight: 600;
}

.heatmap-table th {
    background: #f8fafc;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
}

.heatmap-table td.hour-label {
    background: #f8fafc;
    color: #374151;
    font-weight: 700;
    text-align: left;
    padding-left: 16px;
}

/* Heatmap 7-tier color system: Dark Red -> Red -> Light Green -> Dark Green */
/* Smart 6-color distribution-based heatmap coding */
.heatmap-cell.heatmap-color-1 {
    /* Dark red - worst performance */
    background-color: #7f1d1d;
    color: #ffffff;
}

.heatmap-cell.heatmap-color-2 {
    /* Red - poor performance */
    background-color: #dc2626;
    color: #ffffff;
}

.heatmap-cell.heatmap-color-3 {
    /* Orange - below average */
    background-color: #ea580c;
    color: #ffffff;
}

.heatmap-cell.heatmap-color-4 {
    /* Light green - above average */
    background-color: #effdf4;
    color: #22c55e;
}

.heatmap-cell.heatmap-color-5 {
    /* Green - good performance */
    background-color: #f0fdf4;
    color: #059669;
}

.heatmap-cell.heatmap-color-6 {
    /* Dark green - best performance */
    background-color: #ecfdf5;
    color: #064e3b;
}

/* Responsive Design */
@media (max-width: 1200px) {
    #hourly-view {
        padding: 20px 30px;
    }
    
    .heatmap-table {
        font-size: 10px;
    }
    
    .heatmap-table th,
    .heatmap-table td {
        padding: 6px 8px;
    }
}

@media (max-width: 768px) {
    #hourly-view {
        padding: 15px 20px;
    }
    
    .hourly-header h1 {
        font-size: 12px;
    }
    
    .hourly-view-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hourly-view-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .time-periods-grid {
        grid-template-columns: 1fr;
    }
}

/* Zone Analysis Cards */
.zone-analysis-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.zone-analysis-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zone-analysis-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.zone-analysis-impact-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zone-analysis-lost {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
}

.zone-analysis-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.zone-analysis-reliability {
    font-size: 11px;
    color: #9ca3af;
    padding: 2px 6px;
    background: #f9fafb;
    border-radius: 4px;
    font-weight: 600;
}

.zone-analysis-impact {
    font-size: 11px;
    color: #1f2937;
    padding: 2px 6px;
    background: #f9fafb;
    border-radius: 4px;
    font-weight: 600;
}

/* Red border and background colors for top 7 zones */
.zone-analysis-card.zone-red-1,
.zone-analysis-card.zone-red-2,
.zone-analysis-card.zone-red-3,
.zone-analysis-card.zone-red-4,
.zone-analysis-card.zone-red-5,
.zone-analysis-card.zone-red-6,
.zone-analysis-card.zone-red-7 {
    border-left: 4px solid #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.zone-analysis-card.zone-red-1 {
    border-left-color: #000000;
    background: #fca5a5;
}

.zone-analysis-card.zone-red-2 {
    border-left-color: #450a0a;
    background: #fdb2b2;
}

.zone-analysis-card.zone-red-3 {
    border-left-color: #7f1d1d;
    background: #fdc0c0;
}

.zone-analysis-card.zone-red-4 {
    border-left-color: #991b1b;
    background: #fecaca;
}

.zone-analysis-card.zone-red-5 {
    border-left-color: #b91c1c;
    background: #fed7d7;
}

.zone-analysis-card.zone-red-6 {
    border-left-color: #dc2626;
    background: #fee2e2;
}

.zone-analysis-card.zone-red-7 {
    border-left-color: #ef4444;
    background: #fef2f2;
}

/* Green styling for zone improvements in compare mode */
.zone-analysis-card.zone-green-1,
.zone-analysis-card.zone-green-2,
.zone-analysis-card.zone-green-3,
.zone-analysis-card.zone-green-4,
.zone-analysis-card.zone-green-5,
.zone-analysis-card.zone-green-6 {
    border-left: 4px solid #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.zone-analysis-card.zone-green-1 {
    border-left-color: #065f46;
    background: #a7f3d0;
}

.zone-analysis-card.zone-green-2 {
    border-left-color: #047857;
    background: #bbf7d0;
}

.zone-analysis-card.zone-green-3 {
    border-left-color: #059669;
    background: #d1fae5;
}

.zone-analysis-card.zone-green-4 {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.zone-analysis-card.zone-green-5 {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.zone-analysis-card.zone-green-6 {
    border-left-color: #4ade80;
    background: #f7fee7;
}

/* Grey styling for remaining zones */
.zone-analysis-card.zone-grey {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.zone-analysis-card.zone-grey .zone-analysis-name {
    color: #6b7280;
}

.zone-analysis-card.zone-grey .zone-analysis-lost {
    color: #9ca3af;
}

.zone-analysis-card.zone-grey .zone-analysis-impact {
    color: #9ca3af;
}

/* Back Button and Title Styling */
.back-to-hours-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.back-to-hours-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.zones-analysis-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.zones-analysis-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 16px;
}

/* Zones-First Analysis Interface */
.zones-first-interface {
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.zones-first-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    text-align: center;
}

.zones-first-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 16px;
}

.zones-first-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 80px;
}

/* Hours-From-Zones Analysis Interface */
.hours-from-zones-interface {
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.back-to-zones-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.back-to-zones-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.back-to-analyze-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.back-to-analyze-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.back-to-previous-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.back-to-previous-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.metrics-analysis-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metrics-analysis-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 24px;
}

.metrics-grid {
    display: block;
    margin: 0 auto;
}

.metrics-main-section,
.metrics-breakdown-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.metrics-subtitle {
    width: 100%;
    text-align: center;
    margin: 24px 0 16px 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 992px) {
    .metrics-main-section,
    .metrics-breakdown-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-main-section,
    .metrics-breakdown-section,
    .metrics-first-main-section,
    .metrics-first-breakdown-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .metrics-main-section,
    .metrics-breakdown-section,
    .metrics-first-main-section,
    .metrics-first-breakdown-section {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-name {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.metric-unit {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

.hours-from-zones-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    text-align: center;
}

.hours-from-zones-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 16px;
}

.hours-from-zones-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin: 0 auto 80px auto;
}

/* Zone selection styling for zones-first analysis */
.zone-first-card {
    position: relative;
}

.zone-selection-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.zone-first-card.selected {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
    transform: scale(1.02) translateY(-2px) !important;
}

/* Floating action button for zones */
.floating-action-btn-zones {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #6b7280;
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: none;
    outline: none;
    white-space: nowrap;
    width: auto;
    max-width: 200px;
}

.floating-action-btn-zones:hover {
    background: #4b5563;
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.floating-action-btn-zones-from-hours {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #6b7280;
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: none;
    outline: none;
    white-space: nowrap;
    width: auto;
    max-width: 250px;
}

.floating-action-btn-zones-from-hours:hover {
    background: #4b5563;
}

.zone-analysis-card.selected {
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
    transform: scale(1.02) translateY(-2px) !important;
}

.zone-selection-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2563eb;
    color: white;
    padding: 4px 6px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.floating-action-btn-hours-from-zones {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #6b7280;
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: none;
    outline: none;
    white-space: nowrap;
    width: auto;
    max-width: 250px;
}

.floating-action-btn-hours-from-zones:hover {
    background: #4b5563;
}

.floating-action-btn-hours-from-metrics {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    transition: all 0.3s ease;
}

.floating-action-btn-hours-from-metrics:hover {
    background: #4b5563;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Metrics-first drill-down interfaces - using same structure as existing */
.metrics-first-interface,
.hours-from-metrics-interface,
.zones-from-metrics-interface {
    padding: 20px;
}

.metrics-first-header,
.hours-from-metrics-header,
.zones-from-metrics-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.metrics-first-content,
.hours-from-metrics-content,
.zones-from-metrics-content {
    /* Match the existing content structure */
}

.metrics-first-title,
.hours-from-metrics-title,
.zones-from-metrics-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metrics-first-subtitle,
.hours-from-metrics-subtitle,
.zones-from-metrics-subtitle {
    color: #6b7280;
    margin: 0 0 24px 0;
    font-size: 16px;
    text-align: center;
}

.metrics-first-main-section,
.metrics-first-breakdown-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.metrics-first-subtitle {
    width: 100%;
    text-align: center;
    margin: 24px 0 16px 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.hours-from-metrics-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin: 0 auto 80px auto;
    overflow: hidden;
}

.hours-from-metrics-grid .hour-orders {
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
}

.zones-from-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 0 auto 80px auto;
}

/* Metric cards for metrics-first flow - using same styling as existing metric-card */
.metrics-first-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.metrics-first-card[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: black;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: normal;
    width: 320px;
    text-align: center;
    line-height: 1.4;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.metrics-first-card[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
    z-index: 1000;
    margin-bottom: 2px;
}

.metric-card {
    position: relative;
}

.metric-card[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: black;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: normal;
    width: 320px;
    text-align: center;
    line-height: 1.4;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.metric-card[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
    z-index: 1000;
    margin-bottom: 2px;
}

.metrics-first-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metrics-first-card.selected {
    border: 2px solid #2563eb;
    background: #dbeafe;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.metrics-first-card .metric-name {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metrics-first-card .metric-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.metrics-first-card.selected .metric-name {
    color: #1e40af;
}

.metrics-first-card.selected .metric-value {
    color: #1e40af;
}

/* Metrics flow now uses existing .hour-card and .zone-analysis-card classes */

/* Consistent white background for all drill-down interfaces */
.hours-analysis-interface,
.zones-analysis-interface,
.zones-first-interface,
.hours-from-zones-interface,
.metrics-analysis-interface,
.metrics-first-interface,
.hours-from-metrics-interface,
.zones-from-metrics-interface {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 20px 0 40px 0;
    padding: 20px;
}

/* Back button styling to match existing flows */
.back-to-analyze-btn,
.back-to-hours-btn,
.back-to-zones-btn,
.back-to-metrics-btn {
    background: #f8f9fa;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-to-analyze-btn:hover,
.back-to-hours-btn:hover,
.back-to-zones-btn:hover,
.back-to-metrics-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.hour-card.selected {
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
    transform: scale(1.02) translateY(-2px) !important;
}

.hour-selection-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2563eb;
    color: white;
    padding: 3px 5px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}





/* Custom Dirham Symbol */
.dirham-symbol {
    display: inline-block;
    position: relative;
    font-weight: bold;
    margin-right: 2px;
    font-family: serif;
    font-size: 1em;
}

.dirham-symbol::before {
    content: "D";
    position: relative;
    font-weight: bold;
}

.dirham-symbol::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 40%;
    width: 70%;
    height: 1.5px;
    background: currentColor;
    transform: translateY(-50%);
    border-left: 2px solid currentColor;
    border-right: 2px solid currentColor;
    box-shadow: 0 8px 0 currentColor, -2px 8px 0 currentColor, 2px 8px 0 currentColor;
}



/* Reduce Deep Dives comparison components by 20% */
.period-label {
    font-size: 11.2px !important; /* 14px * 0.8 */
    margin-bottom: 6.4px !important; /* 8px * 0.8 */
}

.period-value {
    font-size: 25.6px !important; /* 32px * 0.8 */
}

.comparison-periods {
    gap: 48px !important; /* 60px * 0.8 */
    margin-bottom: 12.8px !important; /* 16px * 0.8 */
}

.drop-indicator {
    padding: 9.6px 16px !important; /* 12px 20px * 0.8 */
    font-size: 12.8px !important; /* 16px * 0.8 */
    gap: 6.4px !important; /* 8px * 0.8 */
}

.investigate-button {
    padding: 9.6px 19.2px !important; /* 12px 24px * 0.8 */
    font-size: 12.8px !important; /* 16px * 0.8 */
}

/* Add padding above the single/compare periods toggle */
.toggle-container {
    margin-top: 20px !important;
}


/* White text for dark green hour cards (first 3) */
.hour-card.hour-green-1,
.hour-card.hour-green-2, 
.hour-card.hour-green-3 {
    color: white !important;
}

.hour-card.hour-green-1 .hour-time,
.hour-card.hour-green-1 .hour-orders-small,
.hour-card.hour-green-1 .hour-impact,
.hour-card.hour-green-2 .hour-time,
.hour-card.hour-green-2 .hour-orders-small,
.hour-card.hour-green-2 .hour-impact,
.hour-card.hour-green-3 .hour-time,
.hour-card.hour-green-3 .hour-orders-small,
.hour-card.hour-green-3 .hour-impact {
    color: white !important;
}

