* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: #333;
    background: #f5f7f8;
}

.layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
}

/* --- Сайдбар с фильтрами --- */

.sidebar {
    flex: 0 0 220px;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    position: sticky;
    top: 16px;
}

.sidebar h2 {
    margin: 0 0 12px;
    font-size: 15px;
}

.filter-block { margin-bottom: 14px; }

.filter-block label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #82888f;
    margin-bottom: 5px;
}

.filter-block select,
.filter-block input[type="date"] {
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #d5dbe0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

.date-range { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

.period-hint { margin-top: 6px; font-size: 11px; color: #82888f; }

.filter-actions { display: flex; gap: 8px; margin-top: 16px; }

.btn {
    padding: 8px 14px;
    border: 1px solid #d5dbe0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}
.btn:hover { background: #f0f3f5; }

.btn-primary {
    background: #2fc6f6;
    border-color: #2fc6f6;
    color: #fff;
    font-weight: 600;
}
.btn-primary:hover { background: #1cb1e0; }

.btn-small { padding: 4px 10px; font-size: 12px; }

/* --- Мультиселект менеджеров --- */

.multiselect { position: relative; }

.multiselect-toggle {
    width: 100%;
    text-align: left;
    padding: 7px 8px;
    border: 1px solid #d5dbe0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.multiselect-list {
    display: none;
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d5dbe0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    padding: 6px;
}
.multiselect-list.open { display: block; }

.multiselect-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    font-size: 13px;
    text-transform: none;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
}
.multiselect-list label:hover { background: #f0f3f5; }

/* --- Контент --- */

.content { flex: 1; min-width: 0; }

.status {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #d5dbe0;
    border-top-color: #2fc6f6;
    border-radius: 50%;
    display: inline-block;
    animation: spin .8s linear infinite;
    flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.report-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.report-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.report-card-head h3 { margin: 0; font-size: 14px; }

.table-wrap { overflow-x: auto; }

.empty { color: #82888f; padding: 12px 0; }

/* --- Таблица --- */

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
}

th, td {
    padding: 7px 10px;
    border-bottom: 1px solid #eceff1;
    white-space: nowrap;
}

th {
    font-size: 11px;
    font-weight: 600;
    color: #6b7178;
    text-align: right;
    background: #fafbfc;
}
th.dim { text-align: left; }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: #1058d0; background: #f0f3f5; }

td.dim { text-align: left; color: #1058d0; }

td.num {
    position: relative;
    text-align: right;
    min-width: 110px;
}

td.num .bar {
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    background: #c9ecd4;
    border-radius: 2px;
    z-index: 0;
}

td.num .val { position: relative; z-index: 1; }

tr.total td {
    font-weight: 700;
    color: #333;
    border-top: 2px solid #d5dbe0;
}
