:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #c0392b;
    --light-gray: #ecf0f1;
    --border-color: #dce1e8;
    --text-color: #2c3e50;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --header-height: 60px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

body {
    background-color: #f4f4f4;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    color: var(--text-color);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Layout Structure */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: #fff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.sidebar-logo {
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.2s;
}

#sidebar.collapsed .sidebar-logo {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    padding-left: 12px;
    padding-right: 12px;
}

.sidebar-toggle:hover {
    opacity: 1;
}

.sidebar-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-account {
    flex-shrink: 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar.collapsed .sidebar-account {
    padding: 8px 0;
}

#sidebar.collapsed .sidebar-account .nav-category {
    display: none;
}

#sidebar.collapsed .sidebar-account .user-info-box,
#sidebar.collapsed .sidebar-account .logout-container {
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
}

.developer-credit {
    flex-shrink: 0;
    padding: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar.collapsed .developer-credit {
    font-size: 0.55rem;
    padding: 8px 4px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Navigation */
/* Navigation & Sidebar UI */
.nav-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
    padding: 20px 20px 8px;
    letter-spacing: 1px;
}

#sidebar.collapsed .nav-category {
    display: none;
}

/* Sidebar Account Section - Compacto */
.sidebar-account {
    flex-shrink: 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-account .nav-category {
    padding: 0 14px 8px;
    font-size: 0.6rem;
}

.user-info-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    margin: 0 12px 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    gap: 10px;
    transition: background 0.2s ease;
}

.user-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
    letter-spacing: 0.6px;
    margin-bottom: 1px;
}

.user-name {
    font-size: 0.88rem;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-container {
    padding: 0 12px;
}

.logout-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    border: 2px solid #e74c3c;
    color: #e74c3c !important;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.logout-pill:hover {
    background: #e74c3c;
    color: #fff !important;
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
    transform: translateY(-1px);
}

.logout-pill i {
    font-size: 1rem;
}

/* Collapsed Sidebar - Corrige bug texto SAIR sobreposto */
#sidebar.collapsed .user-info-box {
    margin: 4px 5px;
    padding: 6px 0;
    background: transparent;
    border: none;
    justify-content: center;
    min-width: 0;
}

#sidebar.collapsed .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

#sidebar.collapsed .user-details,
#sidebar.collapsed .logout-pill .logout-text,
#sidebar.collapsed .logout-pill span,
#sidebar.collapsed .sidebar-account .nav-category {
    display: none !important;
}

#sidebar.collapsed .logout-container {
    display: flex;
    justify-content: center;
    padding: 4px 0;
}

#sidebar.collapsed .logout-pill {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    overflow: hidden;
}

#sidebar.collapsed .logout-pill i {
    margin: 0;
    font-size: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.nav-link.active {
    border-left-color: var(--accent-color);
    background-color: rgba(20, 30, 40, 0.3);
}

.nav-icon {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.1rem;
}

#sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 10px;
}

#sidebar.collapsed .nav-icon {
    margin-right: 0;
}

#sidebar.collapsed .nav-text {
    display: none;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 20px 30px;
    transition: margin-left var(--transition-speed);
    width: calc(100% - var(--sidebar-width));
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Responsive Layout & Sidebar Sync */
#sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.mobile {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        background: var(--primary-color);
        color: white;
        padding: 10px 15px;
        margin: -15px -15px 20px -15px;
    }
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.page-title {
    color: var(--primary-color);
    font-size: 1.85rem;
    font-weight: 600;
    margin: 0;
}

h2 {
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    text-align: center;
    line-height: 1.2;
}

h2::after {
    content: "";
    position: absolute;
    width: 60%;
    height: 3px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 20%;
    border-radius: 2px;
}

.mobile-header {
    display: none;
}

/* ========== GLOBAL COMPONENTS & TABLES ========== */

.container,
.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

/* Card-like look for the main content block */
.main-content>.container,
.main-content>.container-fluid {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    margin-top: 5px;
    min-height: auto;
    width: calc(100% - 40px);
}

/* If nested, make the inner container transparent */
.container .container,
.container-fluid .container,
.container-fluid .container-fluid {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    min-width: 800px;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

th,
td {
    border: 1px solid #ebeef2;
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
}

h3 {
    padding-top: 20px;
    color: #3a4a5d;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ========== GLOBAL COMPONENT DEFAULTS ========== */
input[type="text"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
input[type="email"],
input[type="password"],
select {
    height: 44px;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #495057;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: none;
}

input:focus,
select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

label,
.filtro-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    text-align: left;
}

button,
.btn-padrao {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

button:hover,
.btn-padrao:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: white;
}

/* Form Layout */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

form button[type="submit"] {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content Area Styling Refinement */
/* Main Content Area Styling Refinement */
.main-content>.container,
.main-content>.container-fluid {
    background: transparent;
    padding: 20px 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 30px;
    margin-top: 15px;
    min-height: calc(100vh - 140px);
    width: calc(100% - 40px);
    max-width: 1500px;
}

/* Page Header Centering */
.page-header {
    width: 100%;
    margin-bottom: 35px;
    display: flex;
    justify-content: center;
}

h2 {
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
    text-align: center;
    line-height: 1.2;
}

h2::after {
    content: "";
    position: absolute;
    width: 60%;
    height: 3px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 20%;
    border-radius: 2px;
}

/* Form & Filter Grid Optimization */
.filtro-row {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    row-gap: 22px;
    width: 100%;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 12px 0;
}

.filtro-item {
    flex: 1 1 200px;
    max-width: 350px;
    padding: 8px 0;
}

/* Specific fix for checkbox items in filtro-row */
.filtro-item.checkbox-item {
    flex: 0 1 auto;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 5px;
}

/* Compact button placement */
form button[type="submit"],
.filtro-row button,
.btn-consultar {
    height: 44px;
    padding: 0 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    width: auto;
}

/* Modal Core Styles - RESTORED */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 30, 40, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 16px;
    width: 100%;
    max-width: 1100px;
    margin: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#modalContent,
.modal-body-content {
    padding: 30px;
}

.modal-body-content .modal-header h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    font-size: 18px;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover,
.close:focus {
    color: black;
    background-color: #f0f0f0;
    text-decoration: none;
}

/* Link de cupom e ícone de olho */
.cupom-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cupom-link:hover {
    background-color: #f8f9fa;
    color: var(--secondary-color);
    text-decoration: none;
}

.eye-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    transition: all 0.2s ease;
}

.eye-icon svg {
    width: 100%;
    height: 100%;
    fill: #6c757d;
    transition: fill 0.2s ease;
}

.cupom-link:hover .eye-icon svg {
    fill: var(--primary-color);
}

/* Destaque para descontos e acréscimos */
.desconto-com-valor {
    color: #dc3545 !important;
    font-weight: bold !important;
    background-color: #fff5f5 !important;
    border-radius: 4px;
    padding: 2px 4px;
}

.acrescimo-com-valor {
    color: #28a745 !important;
    font-weight: bold !important;
    background-color: #f0fff4 !important;
    border-radius: 4px;
    padding: 2px 4px;
}

/* Estilo para células com duas linhas */
td>div {
    line-height: 1.4;
}

td>div:first-child {
    font-weight: 500;
    margin-bottom: 2px;
}

td>div:last-child {
    font-size: 0.9em;
}

td>div:last-child:not(:has(.cupom-link)) {
    color: #6c757d;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.tab-button {
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
}

.tab-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.tab-button.active {
    background: white;
    border-color: var(--primary-color);
    border-bottom-color: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(44, 62, 80, 0.12);
}

.tab-content {
    display: none;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

/* Código de cliente */
.codigo-tipo {
    font-size: 11px;
    color: #6c757d;
    font-weight: normal;
}

/* Animação de progresso */
@keyframes progress-animation {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.progress-container {
    display: none;
    margin: 20px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    animation: progress-animation 2s ease-in-out infinite;
}

.progress-text {
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 8px;
}

/* ========== ESTILOS DE FORMULÁRIOS E FILTROS ========== */

.filtro-row {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    align-items: flex-end;
    justify-content: space-between;
    grid-column: span 2;
}

/* Filtro row com grid para pix_troco */
.filtro-row[style*="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 12px;
    align-items: end;
}

.filtro-item {
    flex: 1;
    min-width: 0;
}

/* Checkbox item para pix_troco */
.checkbox-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item label {
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    font-weight: 600;
    color: #495057;
    margin: 0;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    justify-content: flex-start;
    font-size: 14px;
}

.checkbox-container:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.filtro-label {
    display: block;
    margin-bottom: 5px;
    text-align: left;
    font-weight: bold;
}

.sem-resultados {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.info-pdv {
    font-size: 11px;
    color: #6c757d;
    display: block;
}

.info-detalhes {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.form-grupo {
    margin-bottom: 20px;
}

/* ========== ESTILOS ESPECÍFICOS - INDEX ========== */

.pdv-container {
    grid-column: span 2;
    margin: 10px 0 20px;
    padding: 12px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.pdv-all-option {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
}

.pdv-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pdv-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: white;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    min-width: 120px;
}

.pdv-item label {
    margin: 0;
    font-weight: normal;
    font-size: 13px;
    cursor: pointer;
}

.pdv-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.loading-text,
.sem-pdvs {
    padding: 10px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* ========== ESTILOS ESPECÍFICOS - PAGAMENTOS ========== */

.tipo-pagamento {
    font-weight: bold;
    color: var(--secondary-color);
}

tfoot tr {
    background: #e9f4ff;
    font-weight: bold;
}

.results-container {
    margin-top: 0;
}

/* Multiselect */
.multiselect-container {
    position: relative;
    width: 100%;
    min-height: 42px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.multiselect-container.has-text .search-icon {
    color: #28a745;
    transform: translateY(-50%) scale(1.1);
}

.multiselect-container.open .search-icon {
    color: var(--primary-color);
}

.multiselect-input {
    width: 100%;
    padding: 10px 35px 10px 32px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    background-color: #fff;
    cursor: text;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.multiselect-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.multiselect-input:placeholder-shown {
    color: #adb5bd;
}

.multiselect-input.typing {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.multiselect-input::placeholder {
    color: #6c757d;
    font-style: italic;
    font-weight: 400;
}

.multiselect-input::selection {
    background-color: var(--primary-color);
    color: #ffffff;
}

.selected-items {
    position: absolute;
    top: 1px;
    left: 32px;
    right: 35px;
    bottom: 1px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    pointer-events: none;
    z-index: 1;
}

.selected-item {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Report Utility Classes */
.row-striped-even {
    background-color: #f8f9fa;
}

.row-striped-odd {
    background-color: white;
}

.row-success-light {
    background-color: #e6ffe6 !important;
}

.text-danger-bold {
    color: #dc3545 !important;
    font-weight: bold !important;
}

.text-success-bold {
    color: #28a745 !important;
    font-weight: bold !important;
}

.selected-item.all-selected {
    background: #28a745;
    font-weight: 600;
}

.multiselect-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 12px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.multiselect-container.open .multiselect-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--primary-color);
}

.multiselect-container.open .multiselect-input {
    border-color: var(--primary-color);
    border-bottom-color: #ffffff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 2px 4px rgba(44, 62, 80, 0.12);
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff !important;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: dropdownFadeIn 0.2s ease-out;
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

.multiselect-dropdown::-webkit-scrollbar {
    width: 6px;
}

.multiselect-dropdown::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.multiselect-dropdown::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 3px;
}

.multiselect-dropdown::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.multiselect-container.open .multiselect-dropdown {
    display: block;
}

.multiselect-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    background-color: #ffffff;
}

.multiselect-option:hover,
.multiselect-option.hover {
    background-color: #f8f9fa !important;
}

.multiselect-container.open .multiselect-option:hover,
.multiselect-container.open .multiselect-option.hover {
    background-color: #e3f2fd;
}

.multiselect-option.selected {
    background-color: #e3f2fd;
}

.multiselect-option:last-child {
    border-bottom: none;
}

.option-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.option-main {
    font-weight: 600;
    flex: 1;
    color: #212529;
}

.option-code {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.option-type {
    font-size: 11px;
    font-weight: 500;
    color: #6c757d;
    font-style: italic;
}

.option-text {
    font-weight: 600;
    color: #212529;
}

/* Autocomplete de cliente */
.cliente-autocomplete-container {
    position: relative;
    width: 100%;
}

.cliente-autocomplete-input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.cliente-autocomplete-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.cliente-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cliente-autocomplete-container.open .cliente-autocomplete-dropdown {
    display: block;
}

.cliente-option {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.2s ease;
}

.cliente-option:hover,
.cliente-option.hover {
    background-color: #f8f9fa;
}

.cliente-option:last-child {
    border-bottom: none;
}

.cliente-codigo {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 8px;
}

.cliente-nome {
    color: #212529;
}

/* ========== ESTILOS ESPECÍFICOS - VENDAS FUNCIONÁRIOS ========== */

.funcionario-select {
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #cce5ff;
    background-color: #f0f7ff;
    margin-bottom: 20px;
}

select.funcionario-dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    font-family: 'Consolas', 'Courier New', monospace;
}

select.funcionario-dropdown optgroup {
    font-weight: bold;
    color: #495057;
}

select.funcionario-dropdown option {
    padding: 8px;
}

select.funcionario-dropdown option::before {
    content: attr(value);
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 8px;
}

.funcionario-bloco {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.funcionario-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.funcionario-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.funcionario-nome {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    min-width: 300px;
}

.funcionario-total {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
    min-width: 200px;
    text-align: right;
}

.expandir-btn {
    padding: 8px 20px;
    border-radius: 6px;
    border: 1px solid var(--primary-color);
    background: #f0f7ff;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 100px;
}

.expandir-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ========== ESTILOS ESPECÍFICOS - CHECAGEM PIX ========== */

.summary-box {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #dce1e8;
}

.stat-item.pendente {
    border-left: 4px solid #dc3545;
}

.stat-item.ok {
    border-left: 4px solid #28a745;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-item.pendente .stat-value {
    color: #dc3545;
}

.stat-item.ok .stat-value {
    color: #28a745;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: #f8f9fa;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-btn.pendente.active {
    background-color: #dc3545;
    border-color: #dc3545;
}

.filter-btn.ok.active {
    background-color: #28a745;
    border-color: #28a745;
}

.filter-btn.nao-vinculadas.active {
    background-color: #dc3545;
    border-color: #dc3545;
}

.side-by-side-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.side-panel {
    border: 2px solid #dce1e8;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
    max-height: 700px;
    overflow-y: auto;
}

.side-panel.pdv-pendentes,
.side-panel.banco-nao-vinculadas {
    border-color: #dce1e8;
    border-left: 5px solid #dce1e8;
}

.side-panel h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #dce1e8;
    color: #333;
    font-size: 18px;
}

.side-panel.pdv-pendentes h3,
.side-panel.banco-nao-vinculadas h3 {
    color: #333;
    border-bottom-color: #dce1e8;
}

/* Estilo padronizado para todos os itens - PDV e Banco */
.side-item,
.side-item.pdv-item,
.side-item.banco-item {
    display: block;
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

.side-item:hover,
.side-item.pdv-item:hover,
.side-item.banco-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.side-item.selected,
.side-item.pdv-item.selected,
.side-item.banco-item.selected {
    border: 3px solid var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.25);
    background-color: #f0f7ff;
}

/* Estilos padronizados para header, valor, data e detalhes */
.side-item-header,
.side-item.pdv-item .side-item-header,
.side-item.banco-item .side-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.side-item-header>div:first-child {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.side-item-header>div:first-child strong {
    font-size: 14px;
    font-weight: 600;
}

.side-item-header>div:last-child {
    display: block;
    margin-left: 10px;
    flex-shrink: 0;
}

.side-item-valor,
.side-item.pdv-item .side-item-valor,
.side-item.banco-item .side-item-valor {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.side-item-data,
.side-item.pdv-item .side-item-data,
.side-item.banco-item .side-item-data {
    font-size: 12px;
    color: #6c757d;
    display: block;
    margin-bottom: 0;
}

.side-item-detalhes,
.side-item.pdv-item .side-item-detalhes,
.side-item.banco-item .side-item-detalhes {
    font-size: 13px;
    color: #495057;
    margin-top: 5px;
    display: block;
}

.btn-associar {
    margin-top: 8px;
    padding: 6px 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.btn-associar:hover {
    background-color: #218838;
}

.badge-manual {
    background-color: #17a2b8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 5px;
}

.date-nav-btn {
    transition: all 0.2s ease;
}

.date-nav-btn:hover {
    background-color: #ffb300 !important;
    transform: scale(1.1);
}

.date-nav-btn:active {
    transform: scale(0.95);
}

.date-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.date-nav-btn.hidden {
    visibility: hidden;
    opacity: 0 !important;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.btn-salvar {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-salvar:hover {
    background-color: #218838;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.banco-data-indicador {
    background: #fff3cd;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ffc107;
}

.data-texto {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}



.total-banco-valor {
    font-size: 16px;
    color: #495057;
}

@media (max-width: 1200px) {
    .side-by-side-container {
        grid-template-columns: 1fr;
    }
}

/* ========== ESTILOS ESPECÍFICOS - AFERIÇÃO FECHAMENTO ========== */

.afericao-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.afericao-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #dee2e6;
}

.afericao-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

.afericao-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.afericao-table tbody tr:hover {
    background-color: #e3f2fd;
}

.valor-monetario {
    font-weight: 600;
    text-align: right;
}

.valor-positivo {
    color: #28a745;
}

.valor-negativo {
    color: #dc3545;
}

.valor-neutro {
    color: #6c757d;
}

.status-ok {
    background-color: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.status-divergente {
    background-color: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.resumo-totais {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.resumo-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.resumo-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.resumo-valor {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

/* ========== ESTILOS ESPECÍFICOS - RELATÓRIOS ========== */

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.report-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.report-icon {
    width: 48px;
    height: 48px;
    background: #f0f7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.report-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #212529;
}

.report-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
}

/* ========== ESTILOS ESPECÍFICOS - PIX TROCO ========== */

/* Filtro row específico para pix_troco usa grid */
form[action="/pix-troco"] .filtro-row,
form[action*="pix-troco"] .filtro-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 20px;
    align-items: end;
}

form[action="/pix-troco"] .filtro-item,
form[action*="pix-troco"] .filtro-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

form[action="/pix-troco"] .filtro-item label,
form[action*="pix-troco"] .filtro-item label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    margin: 0;
    line-height: 1.2;
    height: 20px;
}

form[action="/pix-troco"] .filtro-item select,
form[action="/pix-troco"] .filtro-item input[type="date"],
form[action*="pix-troco"] .filtro-item select,
form[action*="pix-troco"] .filtro-item input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    color: #495057;
    height: 44px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    position: relative;
}

.header-container h2 {
    margin: 0;
    text-align: center;
}

.portal-caixa-btn {
    background-color: #28a745;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
    position: absolute;
    right: 0;
}

.portal-caixa-btn:hover {
    background-color: #218838 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3) !important;
}

.total {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    padding: 15px;
    background-color: #e9f4ff;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    text-align: left;
}

.total-wrapper {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
}

.table-container {
    overflow-x: auto;
}

/* Estilos de tabela para pix_troco */
.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th,
.table-container td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
}

.table-container thead th {
    background: var(--primary-color);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-container tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.color-legend {
    margin: 14px 0;
}

.color-legend-content {
    display: flex;
    gap: 16px;
    align-items: center;
}

.color-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
}

.green {
    color: #198754;
}

.red {
    color: #dc3545;
}

.checkbox-pago {
    text-align: center;
}

/* Valor cell para pix_troco */
.valor-cell {
    font-weight: 600;
}

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background-color: #28a745;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    white-space: nowrap;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: #28a745;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-a {
    background: #e8eaed;
    color: var(--primary-color);
}

.badge-b {
    background: #e8f5e9;
    color: #198754;
}

.badge-c {
    background: #fff3cd;
    color: #856404;
}

.editable-cell {
    position: relative;
    transition: background-color .3s ease;
}

.editable-cell:hover {
    background-color: #f8f9fa;
}

.editable-cell::after {
    content: '✏️';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0;
    transition: opacity .2s ease;
}

.editable-cell:hover::after {
    opacity: 0.5;
}

.tab-content#tab-C .editable-cell {
    background-color: #f8f9fa;
    color: #6c757d;
}

.tab-content#tab-C .editable-cell::after {
    content: '🔒';
    opacity: 0.3;
}

.tab-content#tab-C .editable-cell:hover {
    background-color: #e9ecef;
}

button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
    height: 44px;
    font-size: 14px;
}

button:hover {
    background: var(--secondary-color);
}

/* Garante botao CONSULTAR/Filtrar/Buscar dos formularios com cor padrao (sobrescreve qualquer azul residual) */
.main-content form button[type="submit"],
.main-content .container-fluid form button[type="submit"],
.container-fluid form button[type="submit"] {
    background: var(--primary-color);
    color: #fff;
}

.main-content form button[type="submit"]:hover,
.main-content .container-fluid form button[type="submit"]:hover,
.container-fluid form button[type="submit"]:hover {
    background: var(--secondary-color);
}

/* Link estilizado como botao (padrao azul, igual ao submit) */
.btn-padrao {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease;
    height: 44px;
    line-height: 24px;
    box-sizing: border-box;
}

.btn-padrao:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* ========== MEDIA QUERIES ========== */

@media (max-width: 1200px) {

    .filtro-row {
        flex-wrap: wrap;
        gap: 14px;
    }

    .filtro-item {
        flex: 1 1 calc(33.333% - 14px);
        min-width: 140px;
    }

    .filtro-item select,
    .filtro-item input[type="date"] {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        background: #fff;
        color: #495057;
        height: 44px;
        box-sizing: border-box;
        font-size: 14px;
        font-family: inherit;
    }

    .checkbox-item {
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .toast {
        max-width: 300px;
        font-size: 12px;
        padding: 12px 16px;
    }
}

@media (max-width: 900px) {
    .filtro-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .filtro-item {
        flex: 1 1 calc(50% - 12px);
        min-width: 120px;
    }

    .filtro-item select,
    .filtro-item input[type="date"] {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        background: #fff;
        color: #495057;
        height: 44px;
        box-sizing: border-box;
        font-size: 14px;
        font-family: inherit;
    }

    .checkbox-item {
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .toast {
        max-width: 300px;
        font-size: 12px;
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px auto;
        padding: 15px;
        max-height: 95vh;
    }

    .close {
        right: 10px;
        top: 10px;
        font-size: 28px;
        width: 28px;
        height: 28px;
    }

    .afericao-table {
        font-size: 12px;
    }

    .afericao-table th,
    .afericao-table td {
        padding: 8px 4px;
    }

    .resumo-totais {
        grid-template-columns: 1fr;
    }

    .portal-caixa-btn {
        position: static !important;
        display: block;
        margin: 10px auto 0 auto;
        text-align: center;
        width: fit-content;
    }
}

@media (max-width: 600px) {
    .filtro-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filtro-item {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .filtro-item select,
    .filtro-item input[type="date"] {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        background: #fff;
        color: #495057;
        height: 44px;
        box-sizing: border-box;
        font-size: 14px;
        font-family: inherit;
    }

    .checkbox-item {
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .toast {
        max-width: 250px;
        font-size: 11px;
        padding: 10px 12px;
    }
}

/* ========== ESTILOS ESPECÍFICOS - DASHBOARD ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-card.pix-abertos {
    border-left-color: var(--success-color);
}

.dashboard-card.pix-baixados {
    border-left-color: var(--warning-color);
}

.dashboard-card.pix-conciliados {
    border-left-color: #17a2b8;
}

.dashboard-card.vendas-hoje {
    border-left-color: var(--danger-color);
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.card-count {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 15px;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.status-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 1px;
}

.status-table {
    width: 100%;
    border-collapse: collapse;
}

.status-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ebeef2;
    font-size: 12px;
}

.status-table tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.aberto {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.fechado {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.integrando {
    background-color: #fff3cd;
    color: #856404;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.summary-item {
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.summary-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2px;
}

.summary-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ensure data containers have white background since main container is transparent */
.tab-content,
.table-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 15px;
}

/* Remove duplicate padding/shadow if nested */
.tab-content .table-container {
    padding: 0;
    box-shadow: none;
    margin-top: 0;
    background: transparent;
}

/* ========== INDEX PAGE SPECIFIC STYLES (Consulta de Cupons) ========== */

.index-layout-grid {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin-top: 10px;
    width: 100%;
}

.index-layout-grid.no-pdv-sidebar {
    display: block;
}

.pdv-section,
.payment-section {
    display: flex;
    flex-direction: column;
}

.payment-section {
    flex: 1;
}

.filtro-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}

.filtro-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.pdv-multiselect {
    position: relative;
    user-select: none;
}

.pdv-multiselect-header {
    height: 44px;
    padding: 0 15px;
    background: #fdfdfd;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pdv-multiselect-header:hover {
    border-color: var(--accent-color);
    background-color: #fff;
}

.pdv-multiselect-header i.arrow-down {
    border: solid #6c757d;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: 0.3s;
}

.pdv-multiselect.open i.arrow-down {
    transform: rotate(-135deg);
}

.pdv-multiselect-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 2px solid var(--accent-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.pdv-multiselect.open .pdv-multiselect-header {
    border-color: var(--accent-color);
    border-radius: 8px 8px 0 0;
}

.pdv-multiselect.open .pdv-multiselect-content {
    display: block;
}

.pdv-container,
.payment-categories {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sem-pdvs {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin: auto 0;
    /* Centraliza verticalmente quando estiver vazio */
    padding: 20px 0;
    font-size: 13px;
    line-height: 1.4;
}

.pdv-all-option {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.pdv-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pdv-item,
.payment-type-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #fdfdfd;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.pdv-item:hover,
.payment-type-item:hover {
    border-color: var(--accent-color);
    background-color: #f0f7ff;
}

.pdv-item input,
.payment-type-item input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.pdv-item label,
.payment-type-item label {
    cursor: pointer;
    font-size: 13px;
    color: #444;
    margin: 0;
    font-weight: 500;
}

.payment-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.payment-category {
    flex: 1;
    min-width: 150px;
}

.payment-category h4 {
    font-size: 13px;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-types {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Specific to the horizontal list of checkboxes */
.payment-category:last-child .payment-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.loading-text {
    text-align: center;
    color: var(--accent-color);
    font-weight: 600;
    padding: 20px;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .index-layout-grid {
        flex-direction: column;
    }

    .pdv-section {
        flex: 1;
        width: 100%;
    }

    .pdv-options {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .payment-row {
        flex-direction: column;
        gap: 15px;
    }

    .payment-category:last-child .payment-types {
        grid-template-columns: 1fr;
    }
}