/* Layout geral */
body {
    padding-top: 56px;
}

/* Sidebar — fixed, full height below navbar, independent scroll */
.sidebar {
    position: fixed;
    top: 56px;              /* exactly below the fixed navbar */
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar > div {
    padding: 0.5rem 0;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.sidebar .nav-link:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .nav-link.active {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid #0d6efd;
}

.sidebar .nav-link i {
    width: 20px;
}

.sidebar .nav.flex-column.mb-2 {
    margin-bottom: 0 !important;
}

.sidebar-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #0d6efd !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0.2rem !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid #dee2e6;
}

.sidebar hr {
    margin: 0.3rem 0.75rem !important;
}

/* Main content */
main {
    margin-top: 16px;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Tables */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Forms */
.form-label {
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
}

/* PDV Styles */
.pdv-container {
    height: calc(100vh - 120px);
}

.pdv-items {
    max-height: 60vh;
    overflow-y: auto;
}

.pdv-item {
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 0;
}

.pdv-totals {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
}

.pdv-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #198754;
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    .no-print {
        display: none !important;
    }

    main {
        margin: 0 !important;
        padding: 0 !important;
    }
}
