/* =========================================================
   Подсветка контуров разделов для менеджеров и админки
   Без цветной заливки: только аккуратный контур и левая линия
   ========================================================= */

:root {
    --outline-red: #d71920;
    --outline-blue: #2563eb;
    --outline-orange: #f97316;
    --outline-purple: #7c3aed;
    --outline-green: #16a34a;
    --outline-slate: #64748b;
    --outline-yellow: #ca8a04;
    --outline-gray: #d1d5db;
}

/* Общая база для всех крупных разделов */
.card,
.today-money-section,
.calculation-money-section,
.manager-measurements-section,
.activity-section,
.admin-deals-section,
.admin-clients-section,
.admin-measurements-section,
.admin-delete-requests-section,
.deleted-clients-section,
#employeesSection,
#buildersSection {
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 2px solid #e5e7eb !important;
    border-left-width: 7px !important;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05) !important;
    position: relative !important;
}

/* 1. Деньги на сегодня — самый важный, красный контур */
.today-money-section {
    border-color: rgba(215, 25, 32, 0.34) !important;
    border-left-color: var(--outline-red) !important;
}

.today-money-section .card-title h2,
.today-money-section h2 {
    color: var(--outline-red) !important;
}

.today-money-section .table-wrap {
    border-color: rgba(215, 25, 32, 0.22) !important;
}

.today-money-section th {
    border-bottom: 2px solid rgba(215, 25, 32, 0.45) !important;
}

/* 2. Деньги в просчетах и работе */
.calculation-money-section {
    border-color: rgba(249, 115, 22, 0.34) !important;
    border-left-color: var(--outline-orange) !important;
}

.calculation-money-section .card-title h2,
.calculation-money-section h2 {
    color: #9a3412 !important;
}

.calculation-money-section .table-wrap {
    border-color: rgba(249, 115, 22, 0.22) !important;
}

/* 3. На замере / запланирован замер */
.manager-measurements-section {
    border-color: rgba(124, 58, 237, 0.34) !important;
    border-left-color: var(--outline-purple) !important;
}

.manager-measurements-section .card-title h2,
.manager-measurements-section h2 {
    color: #5b21b6 !important;
}

.manager-measurements-section .table-wrap {
    border-color: rgba(124, 58, 237, 0.22) !important;
}

/* 4. Активность в конце дня */
.activity-section {
    border-color: rgba(100, 116, 139, 0.34) !important;
    border-left-color: var(--outline-slate) !important;
}

.activity-section .card-title h2,
.activity-section h2 {
    color: #334155 !important;
}

/* Автоматический контроль */
.page > section.card:first-of-type {
    border-color: rgba(100, 116, 139, 0.30) !important;
    border-left-color: var(--outline-slate) !important;
}

/* Блоки статистики */
.stat {
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    border-top-width: 5px !important;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04) !important;
}

.stat.blue {
    border-color: rgba(215, 25, 32, 0.28) !important;
    border-top-color: var(--outline-red) !important;
}

.stat.green {
    border-color: rgba(22, 163, 74, 0.28) !important;
    border-top-color: var(--outline-green) !important;
}

.stat.orange {
    border-color: rgba(249, 115, 22, 0.28) !important;
    border-top-color: var(--outline-orange) !important;
}

/* =========================
   Админка
   ========================= */

/* Запланированные сделки */
.admin-deals-section {
    border-color: rgba(37, 99, 235, 0.34) !important;
    border-left-color: var(--outline-blue) !important;
}

.admin-deals-section h2 {
    color: #1d4ed8 !important;
}

.admin-deals-section .table-wrap {
    border-color: rgba(37, 99, 235, 0.22) !important;
}

/* Клиенты в работе */
.admin-clients-section {
    border-color: rgba(249, 115, 22, 0.34) !important;
    border-left-color: var(--outline-orange) !important;
}

.admin-clients-section h2 {
    color: #9a3412 !important;
}

.admin-clients-section .table-wrap {
    border-color: rgba(249, 115, 22, 0.22) !important;
}

/* Замеры */
.admin-measurements-section {
    border-color: rgba(124, 58, 237, 0.34) !important;
    border-left-color: var(--outline-purple) !important;
}

.admin-measurements-section h2 {
    color: #5b21b6 !important;
}

.admin-measurements-section .table-wrap {
    border-color: rgba(124, 58, 237, 0.22) !important;
}

/* Запросы на удаление */
.admin-delete-requests-section,
.delete-sidebar-panel {
    border-color: #dc2626 !important;
    border-left-color: #dc2626 !important;
}

.admin-delete-requests-section h2,
.delete-sidebar-panel h2 {
    color: #991b1b !important;
}

/* База удаленных */
.deleted-clients-section {
    border-color: rgba(100, 116, 139, 0.36) !important;
    border-left-color: var(--outline-slate) !important;
}

.deleted-clients-section h2 {
    color: #334155 !important;
}

/* Сотрудники */
#employeesSection {
    border-color: rgba(37, 99, 235, 0.30) !important;
    border-left-color: var(--outline-blue) !important;
}

#employeesSection h2 {
    color: #1d4ed8 !important;
}

/* Строители */
#buildersSection {
    border-color: rgba(22, 163, 74, 0.32) !important;
    border-left-color: var(--outline-green) !important;
}

#buildersSection h2 {
    color: #166534 !important;
}

/* Проблемные переносы — нейтральный контур */
.admin-grid > .card:not(.admin-deals-section):not(.admin-clients-section):not(.admin-measurements-section):not(.admin-delete-requests-section):not(.deleted-clients-section):not(#employeesSection):not(#buildersSection) {
    border-color: rgba(100, 116, 139, 0.28) !important;
    border-left-color: var(--outline-slate) !important;
}

/* Таблицы внутри секций остаются белыми */
.table-wrap,
table,
td,
th {
    background: #ffffff !important;
}

/* Аккуратная подсветка при наведении на раздел */
.today-money-section:hover,
.calculation-money-section:hover,
.manager-measurements-section:hover,
.activity-section:hover,
.admin-deals-section:hover,
.admin-clients-section:hover,
.admin-measurements-section:hover,
#employeesSection:hover,
#buildersSection:hover,
.deleted-clients-section:hover {
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08) !important;
}

/* Мобильная версия */
@media (max-width: 950px) {
    .card,
    .today-money-section,
    .calculation-money-section,
    .manager-measurements-section,
    .activity-section,
    .admin-deals-section,
    .admin-clients-section,
    .admin-measurements-section,
    .admin-delete-requests-section,
    .deleted-clients-section,
    #employeesSection,
    #buildersSection {
        border-left-width: 5px !important;
        border-radius: 10px !important;
    }
}
