:root {
    --app-sidebar-width: 260px;
    --app-sidebar-bg: #111827;
    --app-sidebar-hover: #1f2937;
    --app-body-bg: #f3f4f6;
}

body.app {
    background: var(--app-body-bg);
}

/* Sidebar */
.app-sidebar {
    background: var(--app-sidebar-bg);
    --bs-offcanvas-bg: var(--app-sidebar-bg);
    --bs-offcanvas-color: #fff;
    --bs-offcanvas-width: var(--app-sidebar-width);
}

@media (min-width: 992px) {
    /* O .offcanvas-lg do Bootstrap zera o fundo em telas grandes. */
    .app-sidebar {
        background-color: var(--app-sidebar-bg) !important;
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--app-sidebar-width);
        z-index: 1030;
    }

    .app-main {
        margin-left: var(--app-sidebar-width);
    }
}

.app-brand {
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.app-nav-section {
    padding: 1rem 1rem .35rem;
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ca3af;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0 .5rem;
    padding: .45rem .75rem;
    border-radius: .375rem;
    color: #d1d5db;
    font-size: .9rem;
}

.app-nav-link:hover,
.app-nav-link:focus {
    background: var(--app-sidebar-hover);
    color: #fff;
}

.app-nav-link.active {
    background: var(--bs-primary);
    color: #fff;
}

.app-nav-link.disabled {
    color: #6b7280;
}

/* Header / conteúdo */
.app-header {
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-content .card {
    border: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    font-size: 1.25rem;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.sales-chart {
    display: flex;
    align-items: stretch;
    gap: .35rem;
    height: 180px;
}

.sales-chart-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sales-chart-bar-wrap {
    flex: 1;
    display: flex;
    align-items: flex-end;
    border-bottom: 1px solid #e5e7eb;
}

.sales-chart-bar {
    width: 100%;
    background: var(--bs-primary);
    border-radius: .25rem .25rem 0 0;
    opacity: .85;
}

.sales-chart-col:hover .sales-chart-bar {
    opacity: 1;
}

.sales-chart-label {
    font-size: .65rem;
    color: #6b7280;
    text-align: center;
    margin-top: .25rem;
    white-space: nowrap;
    overflow: hidden;
}

.table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6b7280;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.filters-card .form-label {
    font-size: .8rem;
    margin-bottom: .2rem;
    color: #6b7280;
}

.dl-compact dt {
    font-weight: 500;
    color: #6b7280;
    font-size: .85rem;
}

.dl-compact dd {
    margin-bottom: .6rem;
}

.product-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: .375rem;
    background: #e5e7eb;
}

/* Motor de seleção */
.selection-score {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1;
}

.criteria-bar {
    height: .35rem;
}

.table-active-selection > td {
    background-color: rgba(25, 135, 84, .06);
}

.autocomplete-menu {
    position: absolute;
    z-index: 1050;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
}

/* Login */
.auth-page {
    background: linear-gradient(135deg, #111827 0%, #1e3a8a 100%);
}

.auth-page .text-center h1,
.auth-page .text-center p {
    color: #fff !important;
}
