/* ====== Страница «Отчёты» — на всю ширину ====== */
body.page-reports .container {
    max-width: none;
    padding: 16px;
}

#report-container { display: block; }

/* ====== Блок недели / итогового периода ====== */
.report-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}
.report-block__title {
    margin: 0;
    padding: 10px 16px;
    font-size: 15px;
    color: #1f2937;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}
.report-block__table-wrap {
    overflow-x: auto;
}
.report-block__empty {
    padding: 16px;
    margin: 0;
}

/* Сводный блок «Итого за весь период» — выделяем оранжевым */
.report-block--total {
    border-color: #fb923c;
}
.report-block--total .report-block__title {
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
    color: #fff;
    border-bottom-color: #ea580c;
}

/* ====== Поле выбора периода (flatpickr) ====== */
.period-input,
input.flatpickr-input + input.form-control,
input.flatpickr-alt-input {
    min-width: 260px;
    padding: 8px 12px 8px 36px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    background: #fff
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%231f2937" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>')
        no-repeat 12px center;
    cursor: pointer;
}
.period-input:focus { outline: 2px solid #93c5fd; }

#status.ok   { color: #15803d; font-weight: 600; }
#status.fail { color: #b91c1c; font-weight: 600; }

/* ====== Сама таблица отчёта ====== */
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.report-table thead th {
    background: #374151;
    color: #fff;
    padding: 6px 10px;
    text-align: left;
    border: 1px solid #4b5563;
    font-weight: 600;
    white-space: nowrap;
}
.report-table thead th.num {
    text-align: right;
}
.report-table thead .report-table__group th {
    background: #1f2937;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-align: center;
}

.report-table tbody td {
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}
.report-table tbody td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.report-table tbody tr:nth-child(even) td {
    background: #f9fafb;
}
.report-table tbody tr:hover td {
    background: #dbeafe;
}

/* ====== Условное форматирование ====== */
.report-table .cell-expense {
    background: #fef9c3 !important;
}
.report-table .cell-expense-vat {
    background: #fef9c3 !important;
    font-weight: 600;
}
.report-table .cell-good { background: #bbf7d0 !important; font-weight: 600; }
.report-table .cell-warn { background: #fde68a !important; font-weight: 600; }
.report-table .cell-bad  { background: #fecaca !important; font-weight: 600; }

.report-table .strong {
    font-weight: 600;
}

/* ====== Стрелки сравнения с предыдущим периодом ====== */
.arrow {
    margin-left: 4px;
    font-size: 10px;
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
}
.arrow-good { color: #15803d; }
.arrow-bad  { color: #dc2626; }

/* ====== Итоговая строка — оранжевая, как в исходной таблице ====== */
.report-table tfoot .report-table__total td {
    background: #fb923c !important;
    color: #1f2937;
    font-weight: 700;
    border: 1px solid #ea580c;
    padding: 8px 10px;
    font-size: 14px;
}
