/* Analytics Dashboard Styles */

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

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.analytics-header h1 {
    font-size: 22px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #202124;
}

.analytics-header h1 i {
    color: #673ab7;
}

.analytics-header p {
    margin: 4px 0 0 0;
    color: #5f6368;
    font-size: 13px;
}

/* Summary Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #202124;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #5f6368;
    margin-top: 2px;
}

/* Chart Cards */
.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.chart-card.chart-wide {
    grid-column: 1 / -1;
}

.chart-card h3 {
    font-size: 15px;
    color: #202124;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card h3 i {
    color: #4285f4;
    font-size: 14px;
}

.chart-wrapper {
    height: 280px;
    position: relative;
}

.chart-wrapper-wide {
    height: 300px;
    position: relative;
}

/* Table Cards */
.table-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    margin-bottom: 16px;
    overflow-x: auto;
}

.table-card h3 {
    font-size: 15px;
    color: #202124;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-card h3 i {
    color: #4285f4;
    font-size: 14px;
}

.table-subtitle {
    color: #5f6368;
    font-size: 13px;
    margin: 0 0 16px 0;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analytics-table th {
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #5f6368;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.analytics-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #202124;
}

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

.table-link {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
}

.table-link:hover {
    text-decoration: underline;
}

/* Dormant badges */
.dormant-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.dormant-mild {
    background: #fff8e1;
    color: #e37400;
}

.dormant-warning {
    background: #fce4ec;
    color: #c62828;
}

.dormant-critical {
    background: #ea4335;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .analytics-container {
        padding: 10px;
    }

    .analytics-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .chart-row {
        grid-template-columns: 1fr;
    }

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

    .stat-value {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}
