/* Dashboard light theme for Vidchuy */

body.dashboard-page {
    background: #f5f7fb;
    color: #1f2430;
}

/* Обёртка, чтобы чуть приподнять всё от фона */
.dashboard-wrapper {
    padding-bottom: 24px;
}

/* Карточки */
.card-dash {
    border-radius: 18px;
    border: 1px solid #e1e5f0;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 35, 95, 0.06);
    padding: 1.5rem 1.5rem;
}

/* Hero */
.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.dash-hello {
    font-size: 1.4rem;
    font-weight: 600;
}

.dash-hello-sub {
    font-size: 0.95rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.dash-hero-role-badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: #e5f0ff;
    color: #1d4ed8;
    white-space: nowrap;
}

/* Маленькі метрики */
.dash-card-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.dash-card-value {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dash-card-sub {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Кольорові фони */
.dash-card-blue {
    background: linear-gradient(135deg, #e0ecff, #ffffff);
}

.dash-card-green {
    background: linear-gradient(135deg, #dcfce7, #ffffff);
}

.dash-card-purple {
    background: linear-gradient(135deg, #ede9fe, #ffffff);
}

.dash-card-orange {
    background: linear-gradient(135deg, #ffedd5, #ffffff);
}

/* Заголовки секцій */
.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.dash-section-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.dash-section-sub {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Таблиця */
.table thead th {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom-color: #e5e7eb;
}

.table tbody td {
    font-size: 0.85rem;
    vertical-align: middle;
}

/* Кнопки в таблиці */
.table .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
}

/* =========================================================
   MOBILE UX (только стиль)
   ========================================================= */

@media (max-width: 992px) {
    .card-dash {
        padding: 1.25rem 1.25rem;
    }
}

@media (max-width: 768px) {
    /* Делаем раскладку "сверху меню — снизу контент" */
    .layout {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    /* Sidebar -> topbar */
    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: sticky;
        top: 0;
        z-index: 1050;
        flex: 0 0 auto;
        border-right: 0 !important;
        border-bottom: 1px solid rgba(225, 229, 240, 0.9);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .sidebar .brand {
        padding: 12px 14px !important;
        gap: 10px;
    }

    /* Навигация горизонтально, чтобы не уезжала за экран */
    .sidebar nav {
        padding: 8px 10px 12px 10px !important;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .sidebar nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar .sidebar-heading {
        display: inline-block;
        margin: 0 10px 0 4px;
        opacity: 0.8;
        white-space: nowrap;
    }

    .sidebar .nav-link {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        margin: 0 6px 0 0;
        padding: 10px 12px !important;
        border-radius: 999px;
        line-height: 1;
        touch-action: manipulation;
    }

    /* Контент на всю ширину */
    .main {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar {
        padding: 12px 14px !important;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .topbar .text-end {
        text-align: left !important;
        width: 100%;
        word-break: break-word;
    }

    .main > main {
        padding: 14px !important;
    }

    .dash-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-hero-role-badge {
        align-self: flex-start;
    }

    .dash-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* Таблицы всегда скроллятся по X, не ломая страницу */
    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Убираем “вылаз” по ширине */
    .card-dash,
    .topbar,
    .main,
    .layout {
        min-width: 0;
    }

    body {
        overflow-x: hidden;
    }

    .btn,
    .btn-sm,
    .nav-link {
        -webkit-tap-highlight-color: transparent;
    }
}

@media (max-width: 420px) {
    .dash-hello {
        font-size: 1.2rem;
    }
    .dash-card-value {
        font-size: 1.45rem;
    }
    .card-dash {
        border-radius: 16px;
        padding: 1.1rem 1.1rem;
    }
}

.smart-match-btn {
    border-radius: 30px;
    padding: 6px 16px;
    transition: all 0.25s ease;
    font-weight: 500;
}

.smart-match-btn:hover {
    background-color: var(--bs-primary);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
