/* Manager Analytics Page Styles */

body {
    font-family: 'Roboto', sans-serif;
}

/* Metric cards */
.metric-card {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
}

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

/* Progress bar colors based on score */
.progress-bar.score-excellent {
    background-color: #10B981 !important;
}

.progress-bar.score-good {
    background-color: #F59E0B !important;
}

.progress-bar.score-warning {
    background-color: #F97316 !important;
}

.progress-bar.score-poor {
    background-color: #EF4444 !important;
}

/* Score text colors */
.score-excellent {
    color: #10B981 !important;
}

.score-good {
    color: #F59E0B !important;
}

.score-warning {
    color: #F97316 !important;
}

.score-poor {
    color: #EF4444 !important;
}

/* Chart container */
.chart-container {
    position: relative;
    width: 100%;
}

/* Rankings table */
#rankings-table-body tr.current-manager {
    background-color: rgba(13, 110, 253, 0.1);
    font-weight: 600;
}

#rankings-table-body tr.current-manager td:first-child::before {
    content: ">";
    margin-right: 0.25rem;
    color: #0d6efd;
}

/* Stages table */
#stages-table-body tr.best-stage {
    background-color: rgba(16, 185, 129, 0.1);
}

#stages-table-body tr.best-stage td:first-child::after {
    content: " (лучшая)";
    font-size: 0.75rem;
    color: #10B981;
}

#stages-table-body tr.needs-attention {
    background-color: rgba(239, 68, 68, 0.1);
}

#stages-table-body tr.needs-attention td:first-child::after {
    content: " !";
    font-size: 0.75rem;
    color: #EF4444;
    font-weight: bold;
}

#stages-table-body tr.current-stage {
    border-left: 3px solid #0d6efd;
}

/* Tasks table */
#tasks-table-body .status-done {
    color: #10B981;
}

#tasks-table-body .status-replaced {
    color: #F59E0B;
}

#tasks-table-body tr:hover {
    cursor: pointer;
}

/* Pagination */
.pagination .page-link {
    border-radius: 0;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Alert styling */
#low-sample-warning {
    border-radius: 0;
}

/* Table sticky header */
.table thead.sticky-top th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
}

/* Score badge in tables */
.score-badge {
    display: inline-block;
    min-width: 50px;
    padding: 0.25rem 0.5rem;
    text-align: center;
    font-weight: 600;
}

/* Context card integral score styling */
#integral-score.score-excellent {
    color: #10B981 !important;
}

#integral-score.score-good {
    color: #F59E0B !important;
}

#integral-score.score-warning {
    color: #F97316 !important;
}

#integral-score.score-poor {
    color: #EF4444 !important;
}

/* Override for white background */
.bg-primary #integral-score {
    color: white !important;
}

/* Filter section */
#filters-section .btn-check:checked + .btn-outline-primary {
    background-color: #0d6efd;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .metric-value {
        font-size: 1.5rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }
}

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

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Hover effects for cards */
.card {
    transition: box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

/* Metric explanations popovers */
.metric-explanation {
    max-width: 280px;
}

.metric-explanation .interpretation {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.metric-explanation .badge.bg-orange {
    background-color: #F97316 !important;
}

/* Cursor help for elements with explanations */
[data-metric-key] {
    cursor: help;
}

/* Popover styling */
.popover {
    border-radius: 0;
    max-width: 320px;
}

.popover-header {
    background-color: #f8f9fa;
    border-radius: 0;
    font-weight: 600;
}

.popover-body {
    font-size: 0.875rem;
}
