/* ============================================
   Reports Page Styles
   ============================================ */

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.report-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.report-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.report-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.report-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.report-icon .material-icons-round {
    font-size: 22px;
}

.report-card h3 {
    font-size: 15px;
    font-weight: 700;
}

.report-card .report-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.report-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.report-card-footer .last-run {
    font-size: 11px;
    color: var(--text-muted);
}

/* Report Charts */
.report-chart-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.report-chart-header h3 {
    font-size: 16px;
    font-weight: 700;
}

/* Gender Distribution */
.gender-chart {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 20px;
}

.gender-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gender-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gender-bar-label {
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
}

.gender-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.gender-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    transition: width 0.6s ease;
}

/* Department Chart */
.dept-chart {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.dept-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dept-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.dept-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dept-legend-item .count {
    margin-left: auto;
    font-weight: 700;
}

/* Turnover Chart */
.turnover-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding: 0 10px 30px;
}

.turnover-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 0;
}

.turnover-bars {
    display: flex;
    gap: 4px;
    width: 100%;
    height: 100%;
    align-items: flex-end;
}

.turnover-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
}

.turnover-bar.hires { background: var(--accent-green); }
.turnover-bar.exits { background: var(--accent-coral); }

.turnover-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

.chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 16px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.chart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.report-preview-modal {
    max-width: 1080px;
    width: min(1080px, calc(100vw - 32px));
}

.report-preview {
    display: grid;
    gap: 20px;
}

.report-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.report-preview-header h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.report-preview-header p {
    color: var(--text-secondary);
    max-width: 640px;
}

.report-preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.report-preview-metric {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f8ff 100%);
}

.report-preview-metric span,
.report-preview-metric strong {
    display: block;
}

.report-preview-metric span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.report-preview-metric strong {
    font-size: 24px;
}

.report-preview-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.report-preview-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.report-preview-table th,
.report-preview-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    font-size: 13px;
}

.report-preview-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: #faf9ff;
}

@media (max-width: 768px) {
    .dept-chart {
        grid-template-columns: 1fr;
    }

    .gender-chart {
        flex-direction: column;
    }

    .report-preview-header {
        flex-direction: column;
    }

    .report-preview-metrics {
        grid-template-columns: 1fr;
    }
}
