html {
    color-scheme: dark;
    background-color: #111827;
}

body {
    margin: 0;
}

.fundo-escuro-padrao {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.fundo-escuro-padrao.tema-home {
    background-color: #001a2b;
    background-image: radial-gradient(circle at 70% 40%, #004976 0%, #001a2b 80%);
    justify-content: center;
}

@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

.dropdown-menu {
    background-color: #1c2434;
    border: none;
    border-top: 4px solid #005aa5;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    color: white;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #005aa5;
    color: white;
    padding-left: 1.5rem;
}

.bg-header-escuro {
    background-color: #1c2434 !important;
}

.nav-item .nav-link {
    color: #ffffff !important;
    transition: color 0.2s;
}

.nav-item .nav-link:hover {
    color: #ff6200 !important;
}

.logo-slim {
    height: clamp(25px, 5vh, 50px) !important;
    width: auto;
}

.nav-link-slim {
    font-size: clamp(14px, 1.1vw, 15px) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.dashboard-layout {
    min-height: calc(100vh - 55px);
    background-color: #f3f6fb;
    font-family: 'Open Sans', sans-serif;
}

.dashboard-sidebar {
    width: 185px;
    min-width: 185px;
    height: calc(100vh - 55px);
    background: linear-gradient(180deg, #0f1d46 0%, #102a70 100%);
    padding: 0.85rem;
}

.dashboard-main {
    gap: 0.65rem;
}

.dashboard-sidebar-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.12);
}

.dashboard-sidebar-title {
    font-size: 0.9rem;
}

.dashboard-sidebar-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 0.68rem;
}

.dashboard-filter-label {
    color: rgba(255,255,255,0.75);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.dashboard-filter-select {
    border: 1px solid rgba(15,23,42,0.16);
    color: #0f172a;
    border-radius: 9px;
    padding: 0.45rem 0.5rem;
    font-size: 0.76rem;
}

.dashboard-card {
    border-top: 4px solid #ff6600 !important;
}

.dashboard-graph-box {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.dashboard-graph-box > div,
.dashboard-graph-box .bk-root,
.dashboard-graph-box .bk,
.dashboard-graph-box-meter > div,
.dashboard-graph-box-meter .bk-root,
.dashboard-graph-box-meter .bk {
    width: 100% !important;
    height: 100% !important;
}

.dashboard-zoom {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 92vw !important;
    height: 86vh !important;
    max-width: 1500px !important;
    z-index: 9999 !important;
    background-color: #fff !important;
    border-radius: 14px !important;
    padding: 40px 14px 14px 14px !important;
    box-shadow: 0 0 0 9999px rgba(15,23,42,0.62), 0 18px 50px rgba(15,23,42,0.35) !important;
    display: flex;
    flex-direction: column;
}

.dashboard-zoom .dashboard-chart-body {
    flex-grow: 1 !important;
    height: 100% !important;
}

.custom-select-focus:focus {
    border-color: #ff6600 !important;
    box-shadow: 0 0 0 1px rgba(255, 102, 0, 0.2) !important;
}

@media (max-width: 1200px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        height: auto;
    }
}

@media (max-width: 576px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-donut-wrap {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
}

.dashboard-zoom-dark {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    height: 85vh !important;
    max-width: 1400px !important;
    z-index: 9999 !important;
    background-color: #1a2236 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.85), 0 15px 40px rgba(0,0,0,0.5) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.dashboard-zoom-dark .dashboard-chart-body {
    flex-grow: 1 !important;
    height: 100% !important;
}
