/* Порт inline <style> блока из zzd-php/decomposition_curators.php
   (строки 865-988). */

/* контейнер с прокруткой */
.decomp-wrapper {
    overflow: auto;
    max-height: calc(100vh - 260px);
    position: relative;
}

/* таблица */
.decomp-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.decomp-table td,
.decomp-table th {
    padding: 3px 6px !important;
    vertical-align: middle;
    white-space: nowrap;
}

/* первая колонка (Показатель) */
.decomp-label-col,
.decomp-label {
    min-width: 200px;
    max-width: 260px;
    white-space: normal;
    font-size: 11px;
    line-height: 1.3;
}

/* sticky: левый столбец */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
    box-shadow: 2px 0 4px rgba(0,0,0,0.08);
}

/* sticky: заголовки */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #e9ecef;
}

/* пересечение sticky-col + sticky-header */
.sticky-col.sticky-header {
    z-index: 10;
    background: #e9ecef;
}

/* секции */
.decomp-section-row td {
    background: #dee2e6 !important;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #495057;
    padding: 5px 6px !important;
}
.decomp-section-row .sticky-col {
    background: #dee2e6 !important;
}

/* куратор в заголовке */
.decomp-table th.curator-th {
    font-weight: 500;
    font-size: 11px;
    min-width: 80px;
    max-width: 110px;
    white-space: normal;
    line-height: 1.3;
    text-align: center;
    vertical-align: bottom;
}

/* ячейки план/факт */
.plan-cell { background: #fffde7; }
.fact-cell { background: #f1f8e9; }

/* колонка Итого */
.total-col,
.total-col-th {
    border-left: 2px solid #adb5bd !important;
    font-weight: 600;
    background: #f8f9fa;
    min-width: 80px;
}

/* hover строки */
.decomp-table tbody tr:not(.decomp-section-row):hover td {
    background-color: #eef2f9 !important;
}
.decomp-table tbody tr:not(.decomp-section-row):hover .sticky-col {
    background-color: #eef2f9 !important;
}

/* разделитель между основным блоком и плановыми показателями */
.decomp-spacer-row td {
    height: 18px;
    border-top: 2px solid #dee2e6 !important;
    border-bottom: none !important;
    background: #fff !important;
    padding: 0 !important;
}

/* highlight столбца */
.decomp-table .col-highlight {
    background-color: #eef2f9 !important;
}
.decomp-table tbody tr:not(.decomp-section-row):hover td.col-highlight {
    background-color: #dce6f5 !important;
}
