﻿/* ==========================================================================
   Bootstrap 5.3 — изолированная область (.dashboard-bootstrap)
   Не влияет на остальной сайт
   ========================================================================== */

/* Сбрасываем всё внутри дашборда */
.dashboard-bootstrap, .dashboard-bootstrap * {
    all: revert;
    box-sizing: border-box;
}

/* Основные переменные */
.dashboard-bootstrap {
    --bs-primary: #0d6efd;
    --bs-success: #198754;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.5;
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    line-height: var(--bs-body-line-height);
    color: #212529;
    background-color: #f8f9fa;
    padding: 1rem;
}

    /* Контейнеры */
    .dashboard-bootstrap .container-fluid {
        width: 100%;
        margin-right: auto;
        margin-left: auto;
        padding-right: 1rem;
        padding-left: 1rem;
    }

    /* Сетка */
    .dashboard-bootstrap .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -0.75rem;
        margin-left: -0.75rem;
    }

    .dashboard-bootstrap [class*="col-"] {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .dashboard-bootstrap .col-md-6 {
        width: 50%;
    }

    .dashboard-bootstrap .col-lg-4 {
        width: 33.3333%;
    }

    .dashboard-bootstrap .col-12 {
        width: 100%;
    }

    /* Заголовки и текст */
    .dashboard-bootstrap h2 {
        font-weight: 600;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .dashboard-bootstrap .text-muted {
        color: #6c757d !important;
    }

    /* Карточки */
    .dashboard-bootstrap .card {
        background: #fff;
        border: 1px solid rgba(0,0,0,.125);
        border-radius: 0.5rem;
        box-shadow: 0 2px 6px rgba(0,0,0,.1);
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .dashboard-bootstrap .card-header {
        background-color: #f8f9fa;
        border-bottom: 1px solid rgba(0,0,0,.1);
        padding: 0.75rem 1rem;
        font-weight: 600;
    }

    .dashboard-bootstrap .card-body {
        padding: 1rem;
        flex: 1 1 auto;
    }

    /* Вспомогательные классы */
    .dashboard-bootstrap .d-flex {
        display: flex !important;
    }

    .dashboard-bootstrap .align-items-center {
        align-items: center !important;
    }

    .dashboard-bootstrap .justify-content-between {
        justify-content: space-between !important;
    }

    .dashboard-bootstrap .mb-3 {
        margin-bottom: 1rem !important;
    }

    .dashboard-bootstrap .mb-4 {
        margin-bottom: 1.5rem !important;
    }

    .dashboard-bootstrap .mt-2 {
        margin-top: .5rem !important;
    }

    .dashboard-bootstrap .mt-4 {
        margin-top: 1.5rem !important;
    }

    .dashboard-bootstrap .text-primary {
        color: var(--bs-primary) !important;
    }

    /* Значения статусов */
    .dashboard-bootstrap .bg-success {
        background-color: var(--bs-success) !important;
        color: #fff !important;
    }

    .dashboard-bootstrap .bg-warning {
        background-color: var(--bs-warning) !important;
        color: #000 !important;
    }

    .dashboard-bootstrap .bg-danger {
        background-color: var(--bs-danger) !important;
        color: #fff !important;
    }

    /* Бейджи */
    .dashboard-bootstrap .badge {
        display: inline-block;
        padding: .35em .65em;
        font-size: .9em;
        font-weight: 600;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        border-radius: .25rem;
    }

    /* Canvas для графиков */
    .dashboard-bootstrap canvas {
        width: 100%;
        height: 60px;
    }

/* Адаптив */
@media (max-width: 992px) {
    .dashboard-bootstrap .col-lg-4 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .dashboard-bootstrap .col-md-6,
    .dashboard-bootstrap .col-lg-4 {
        width: 100%;
    }
}
