﻿:root {
    --be-primary: #1185e0;
    --be-primary-dark: #173b86;
    --be-primary-darker: #0f2758;
    --be-primary-soft: #edf6ff;
    --be-accent: #31a8ff;
    --be-bg: #f4f7fb;
    --be-card: #ffffff;
    --be-text: #1f2a37;
    --be-muted: #7b8794;
    --be-border: #dbe5f0;
    --be-shadow: 0 10px 30px rgba(17, 55, 120, 0.08);
    --be-radius: 18px;
    --be-sidebar-width: 240px;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--be-bg);
    color: var(--be-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.be-app-body {
    background: var(--be-bg);
}

.be-app-shell {
    min-height: 100vh;
    display: flex;
}

.be-sidebar {
    width: var(--be-sidebar-width);
    min-width: var(--be-sidebar-width);
    background: linear-gradient(180deg, var(--be-primary-darker), var(--be-primary-dark));
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.08);
}

.be-sidebar-header {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.be-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.be-sidebar-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
}

.be-sidebar-brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.1;
}

.be-sidebar-brand-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.78);
}

.be-sidebar-nav {
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.be-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .be-sidebar-link:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }

    .be-sidebar-link.active {
        background: linear-gradient(90deg, var(--be-primary), #3a6cf0);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    }

.be-sidebar-icon {
    width: 22px;
    text-align: center;
    font-size: 1rem;
}

.be-sidebar-parent {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.be-sidebar-toggle {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
}

    .be-sidebar-toggle:not(.active) {
        color: rgba(255,255,255,0.9);
    }

    .be-sidebar-toggle.active {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }

.be-sidebar-arrow {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    opacity: 0.9;
    margin-left: auto;
}

.be-sidebar-toggle[aria-expanded="true"] .be-sidebar-arrow {
    transform: rotate(180deg);
}

.be-sidebar-submenu {
    display: none;
    margin-top: -2px;
    margin-bottom: 6px;
    margin-left: 8px;
    padding: 6px;
    border-left: 2px solid rgba(255,255,255,0.12);
}

    .be-sidebar-submenu.open {
        display: block;
    }

.be-sidebar-sublink {
    display: block;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .be-sidebar-sublink:hover {
        color: #fff;
        background: rgba(255,255,255,0.08);
    }

    .be-sidebar-sublink.active {
        color: #fff;
        background: linear-gradient(90deg, rgba(17,133,224,0.40), rgba(58,108,240,0.20));
        border: 1px solid rgba(255,255,255,0.06);
    }

.be-sidebar-footer {
    margin-top: auto;
    padding: 18px;
    opacity: 0.18;
    font-size: 3rem;
    text-align: center;
}

.be-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.be-topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--be-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
}

.be-topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--be-primary-dark);
}

.be-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.be-topbar-user {
    color: var(--be-primary-dark);
    font-weight: 600;
    background: var(--be-primary-soft);
    border: 1px solid #d8e9ff;
    padding: 8px 12px;
    border-radius: 999px;
}

.be-topbar-logout {
    color: #fff;
    background: linear-gradient(90deg, var(--be-primary), var(--be-accent));
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
}

    .be-topbar-logout:hover {
        color: #fff;
        opacity: 0.95;
    }

.be-page-content {
    padding: 24px;
}

.be-page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--be-primary-dark);
    margin-bottom: 0.25rem;
}

.be-page-subtitle {
    color: var(--be-muted);
    margin-bottom: 0;
}

.be-hero {
    background: linear-gradient(135deg, #ffffff, #eef6ff);
    border: 1px solid var(--be-border);
    border-radius: 24px;
    box-shadow: var(--be-shadow);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.be-hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
    align-items: center;
}

.be-hero-text h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--be-primary-dark);
    margin-bottom: 8px;
}

.be-hero-text p {
    color: var(--be-muted);
    font-size: 1rem;
    margin-bottom: 0;
}

.be-hero-visual {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.be-glasses-box {
    background: linear-gradient(135deg, #dbeeff, #ffffff);
    border-radius: 22px;
    border: 1px solid #d6e7ff;
    padding: 18px;
    min-height: 110px;
    min-width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.be-glasses-icon {
    font-size: 3rem;
}

.be-filter-card,
.be-section-card,
.be-kpi-card {
    background: var(--be-card);
    border: 1px solid var(--be-border);
    border-radius: var(--be-radius);
    box-shadow: var(--be-shadow);
}

.be-filter-card {
    padding: 18px;
    margin-bottom: 22px;
}

.be-kpi-card {
    padding: 18px 20px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .be-kpi-card::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--be-primary), var(--be-accent));
    }

.be-kpi-label {
    color: var(--be-muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.be-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--be-primary-dark);
    margin-bottom: 0;
}

.be-section-card {
    overflow: hidden;
}

.be-section-header {
    background: linear-gradient(90deg, var(--be-primary-dark), #4a73f0);
    color: #fff;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.be-section-body {
    padding: 18px;
}

.be-mini-title {
    color: var(--be-muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.be-mini-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--be-primary-dark);
    margin-bottom: 8px;
}

.be-mini-subvalue {
    color: var(--be-text);
    font-weight: 600;
    font-size: 1.05rem;
}

.btn-be-primary {
    background: linear-gradient(90deg, var(--be-primary), var(--be-accent));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
}

    .btn-be-primary:hover {
        color: #fff;
        opacity: 0.95;
    }

.btn-be-secondary {
    background: #fff;
    color: var(--be-primary-dark);
    border: 1px solid var(--be-border);
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid var(--be-border);
    min-height: 44px;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--be-primary);
        box-shadow: 0 0 0 0.2rem rgba(17,133,224,0.12);
    }

.table {
    background: #fff;
}

    .table thead.table-dark th {
        background: linear-gradient(90deg, var(--be-primary-dark), #243b6b) !important;
        border-color: #31456f !important;
    }

.be-chart-card canvas {
    max-width: 100%;
}


.be-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.be-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--be-primary-soft);
    color: var(--be-primary-dark);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    border: 1px solid #d8e9ff;
}

    .be-mobile-menu-btn:hover {
        background: #e3f0ff;
    }

.be-sidebar-overlay {
    display: none;
}

@media (max-width: 1200px) {
    .be-sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

        .be-sidebar.be-sidebar-mobile-open {
            transform: translateX(0);
        }

    .be-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 39, 88, 0.38);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s ease;
        display: block;
    }

        .be-sidebar-overlay.show {
            opacity: 1;
            visibility: visible;
        }

    .be-page-content {
        padding: 18px;
    }

    .be-hero-grid {
        grid-template-columns: 1fr;
    }

    .be-hero-visual {
        justify-content: flex-start;
    }

    body.be-mobile-menu-open {
        overflow: hidden;
    }
}