/* Dashboard Tabs Navigation */
.dashboard-tabs {
    display: flex;
    gap: 0;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-tabs::-webkit-scrollbar {
    height: 4px;
}

.dashboard-tabs::-webkit-scrollbar-thumb {
    background: var(--mid-gray);
    border-radius: 2px;
}

.dashboard-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-family: var(--body-font);
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dashboard-tab:hover {
    background-color: #f8f9fa;
    color: var(--text-color);
}

.dashboard-tab.active {
    background-color: var(--primary-color);
    color: white;
}

.dashboard-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dashboard-tab.active svg {
    stroke: white;
}

/* Dashboard Page Title */
.dashboard-page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.dashboard-page-title h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--heading-font);
    color: var(--text-color);
}

.dashboard-page-title svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

/* Analytics Cards */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.analytics-card h3 {
    margin: 0 0 1rem 0;
    font-family: var(--heading-font);
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analytics-card h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

/* Customer List Styles */
.customer-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.customer-item:hover {
    background-color: #e9ecef;
}

.customer-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.customer-rank.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.customer-rank.silver {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
}

.customer-rank.bronze {
    background: linear-gradient(135deg, #CD7F32, #B87333);
}

.customer-info {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.customer-value {
    text-align: right;
    flex-shrink: 0;
}

.customer-value .amount {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
}

.customer-value .label {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Alert/Warning Cards */
.alert-card {
    border-left: 4px solid;
    padding-left: calc(1.5rem - 4px);
}

.alert-card.warning {
    border-left-color: #ffc107;
}

.alert-card.danger {
    border-left-color: #dc3545;
}

.alert-card.success {
    border-left-color: #28a745;
}

.alert-card.info {
    border-left-color: #6c757d;
}

/* Metric Highlight */
.metric-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.metric-highlight .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: white;
}

.metric-highlight .icon svg {
    width: 24px;
    height: 24px;
}

.metric-highlight .content {
    flex: 1;
}

.metric-highlight .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: var(--heading-font);
}

.metric-highlight .label {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Time Period Selector */
.period-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.period-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--mid-gray);
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--body-font);
}

.period-btn:hover {
    background-color: #f8f9fa;
}

.period-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Data Table within Cards */
.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.analytics-table th,
.analytics-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.analytics-table th {
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-table tbody tr:hover {
    background-color: #f8f9fa;
}

.analytics-table .trend-up {
    color: #28a745;
}

.analytics-table .trend-down {
    color: #dc3545;
}

/* Progress Indicators */
.progress-mini {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.progress-mini .bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Season Cards */
.season-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.season-card {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.season-card .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.season-card .name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.season-card .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.season-card .change {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Heat Map */
.heatmap-grid {
    display: grid;
    grid-template-columns: auto repeat(8, 1fr);
    gap: 2px;
    font-size: 0.75rem;
}

.heatmap-label {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #666;
}

.heatmap-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 500;
    color: white;
    min-height: 36px;
}

.heatmap-cell.level-0 { background-color: #f0f0f0; color: #999; }
.heatmap-cell.level-1 { background-color: #c6e48b; color: #333; }
.heatmap-cell.level-2 { background-color: #7bc96f; }
.heatmap-cell.level-3 { background-color: #239a3b; }
.heatmap-cell.level-4 { background-color: #196127; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.badge-success { background-color: #d4edda; color: #155724; }
.badge.badge-warning { background-color: #fff3cd; color: #856404; }
.badge.badge-danger { background-color: #f8d7da; color: #721c24; }
.badge.badge-info { background-color: #e9ecef; color: #495057; }
.badge.badge-primary { background-color: #cce5ff; color: #004085; }

/* Full Width Card */
.full-width-card {
    grid-column: 1 / -1;
}

/* Two Column Layout */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .season-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-tabs {
        padding: 0.25rem;
    }

    .dashboard-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .dashboard-tab span {
        display: none;
    }

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
}

/* Loading State */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
