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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8f9fa;
    padding: 40px 20px;
    color: #2c3e50;
}

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

h1 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    bottom: -2px;
}

.tab:hover {
    background: #f5f5f5;
}

.tab.active {
    background: white;
    color: #1a1a1a;
    border: 2px solid #e0e0e0;
    border-bottom: 2px solid white;
}

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

/* Leaderboard header filters */
.filter-container {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20%;
}

.filter-group-2 {
    display: contents;
    width: 25%;
    float: right;
}

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

.filter-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 200px;
    cursor: pointer;
}

.date-range-label {
    margin-left: auto;
    padding: 8px 16px;
    background: #e3f2fd;
    border-radius: 20px;
    font-size: 13px;
    color: #1976d2;
    font-weight: 500;
}

/* Leaderboard card */

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #B8B8B8);
    color: white;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: white;
}

.rank-other {
    background: #f3f4f6;
    color: #6b7280;
}

.medal {
    font-size: 20px;
    margin-right: 4px;
}

.user-name {
    font-weight: 500;
    color: #1a1a1a;
}

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

.metric-unit {
    color: #6b7280;
    font-weight: 400;
    margin-left: 4px;
}

.score {
    text-align: right;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Grid Mode Toggle Button */
.analytics-default-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 16px;
}

.analytics-default-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.analytics-default-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.analytics-default-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Optional: Add an icon before text using CSS */
.analytics-default-button::before {
    content: "⛶";
    font-size: 16px;
}

/* Modal Styling */
.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.modal-header {
    border-bottom: 2px solid #f3f4f6 !important;
    padding: 24px 32px !important;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%) !important;
}

.modal-body {
    padding: 24px 32px !important;
    background: #ffffff !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* Modal close button */
.modal-header .btn-close {
    padding: 0.75rem !important;
    margin: -0.5rem -0.5rem -0.5rem auto !important;
}

.modal-header .btn-close:hover {
    opacity: 0.75 !important;
}

/* Responsive modal text */
@media (max-width: 768px) {
    .modal-body {
        padding: 16px !important;
    }
    
    .modal-header {
        padding: 16px 20px !important;
    }
}

/* ROI Matrix Table Styling */
#analyst_month_grouped_roi_table .ag-cell {
    transition: all 0.2s ease;
    padding: 12px;
    border-radius: 4px;
    margin: 2px;
}

#analyst_month_grouped_roi_table .ag-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    border-radius: 6px;
}

#analyst_month_grouped_roi_table .ag-header {
    background-color: #e5e7eb;
    font-weight: 600;
    border-bottom: 2px solid #d1d5db;
}

#analyst_month_grouped_roi_table .ag-header-cell {
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

#analyst_month_grouped_roi_table .ag-row {
    border-bottom: 1px solid #e5e7eb;
}

#analyst_month_grouped_roi_table .ag-row:hover {
    background-color: rgba(243, 244, 246, 0.3);
}

/* Pinned month column */
#analyst_month_grouped_roi_table .ag-pinned-left-cols-container {
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
    background: #fafafa;
}

/* Center align numeric columns */
#analyst_month_grouped_roi_table .ag-cell[col-id="V64"],
#analyst_month_grouped_roi_table .ag-cell[col-id="V65"],
#analyst_month_grouped_roi_table .ag-cell[col-id="V75"],
#analyst_month_grouped_roi_table .ag-cell[col-id="V85"],
#analyst_month_grouped_roi_table .ag-cell[col-id="V86"],
#analyst_month_grouped_roi_table .ag-cell[col-id="GS75"],
#analyst_month_grouped_roi_table .ag-cell[col-id="V4"] {
    text-align: center;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* Add subtle border radius to cells */
#analyst_month_grouped_roi_table .ag-cell-value {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}


.filter-container {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    marginTop: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    flex: 0 1 auto;
}

.filter-group-2 {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex: 0 1 auto;
}

.filter-select {
    min-width: 180px;
    width: 100%;
}

/* Responsive: Stack vertically on smaller screens */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group-2 {
        margin-left: 0;
        justify-content: center;
    }
}


.Select-menu-outer {
    z-index: 1000;
}

.Select-option {
    padding: 10px 12px;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
}

.Select-value-label,
.Select-placeholder {
    line-height: 1.4;
}