body {
    background-color: #eaeef3;
}
.menu-header{
    color: #FFF !important;
}
/* ========================================
   SIDEBAR MODERNO - Menu colapsável
   ======================================== */

/* Estrutura principal do sidebar */
.sidebar {
    background-color: #222c3c;
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* Header do sidebar (botão toggle) */
.sidebar-header {
    padding: 1.4rem 1rem;
    background-color: #1a2332;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    color: #c7cace;
    padding: 0.75rem 1rem;
    font-size: 1.3rem;
    width: auto;
    text-align: left;
    transition: all 0.2s;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
}

.sidebar-toggle:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.sidebar-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* Wrapper do menu com scroll */
.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

/* Scrollbar personalizada */
.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Menu principal */
.sidebar-menu {
    margin: 0;
    padding: 0;
}

.sidebar-item {
    list-style: none;
    position: relative;
}

/* Links do menu */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: #c7cace;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    gap: 0.75rem;
}

.sidebar-link i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-text {
    flex: 1;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s;
}

.sidebar-arrow {
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.2s;
}

.sidebar-link[aria-expanded="true"] .sidebar-arrow {
    transform: rotate(180deg);
}

/* Hover e estados ativos */
.sidebar-link:hover {
    color: #ffffff;
    background-color: #354358;
    text-decoration: none;
}

.sidebar-link.active {
    color: #ffffff;
    background-color: #3b82f6;
    border-left: 3px solid #60a5fa;
}

.sidebar-link[aria-expanded="true"] {
    background-color: #19222d;
    color: #ffffff;
}

/* Submenu */
.sidebar-submenu {
    background-color: #1a2332;
    margin: 0;
    padding: 0;
}

.sidebar-subitem {
    list-style: none;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem 0.75rem 3rem;
    color: #b0b5ba;
    text-decoration: none;
    transition: all 0.2s;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.sidebar-sublink i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-sublink:hover {
    color: #ffffff;
    background-color: #2a3648;
    text-decoration: none;
    padding-left: 3.25rem;
}

.sidebar-sublink.active {
    color: #ffffff;
    background-color: #2a3648;
    border-left: 3px solid #60a5fa;
}

/* ========================================
   SIDEBAR COLAPSADO (collapsed)
   ======================================== */

.sidebar.collapsed {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
}

.sidebar.collapsed .sidebar-header {
    text-align: center;
    justify-content: center;
}

.sidebar.collapsed .sidebar-toggle {
    width: auto;
    justify-content: center;
}

.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-arrow {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar.collapsed .sidebar-link,
.sidebar.collapsed .sidebar-sublink {
    justify-content: center;
    padding: 0.875rem 0;
    position: relative;
}

.sidebar.collapsed .sidebar-link i:first-child {
    margin: 0;
}

.sidebar.collapsed .sidebar-submenu {
    display: none !important;
}

/* Hover no modo colapsado - Mostra tooltip */
.sidebar.collapsed .sidebar-link {
    --tooltip-top: 0px;
}

.sidebar.collapsed .sidebar-link:hover::after {
    content: attr(title);
    position: fixed;
    left: 70px;
    top: var(--tooltip-top, 0);
    transform: translateY(0);
    background-color: #354358;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.875rem;
    pointer-events: none;
    animation: fadeIn 0.2s ease-in-out;
    margin-left: 5px;
}

/* Dropdown expandido via hover no modo colapsado */
.sidebar.collapsed .sidebar-item {
    position: relative;
}

.sidebar.collapsed .sidebar-item:hover .sidebar-submenu {
    display: block !important;
    position: fixed;
    left: 63px;
    min-width: 250px;
    background-color: #354358;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    animation: slideIn 0.2s ease-in-out;
}

.sidebar.collapsed .sidebar-item:hover .sidebar-submenu .sidebar-text {
    position: static;
    opacity: 1;
    width: auto;
    height: auto;
    overflow: visible;
    pointer-events: auto;
}

.sidebar.collapsed .sidebar-item:hover .sidebar-sublink {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
}

.sidebar.collapsed .sidebar-item:hover .sidebar-sublink i {
    width: 16px;
    flex-shrink: 0;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVO - Mobile (< 768px)
   ======================================== */

@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        min-width: 250px;
        max-width: 250px;
    }

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

    .sidebar.collapsed {
        transform: translateX(-100%);
    }

    /* Overlay para fechar menu mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1020;
    }

    .sidebar-overlay.active {
        display: block;
    }
}
/* Wrapper flex que contém sidebar e content */
.d-flex {
    min-height: 100vh;
}

/* Área de conteúdo ajustada ao sidebar */
.content {
    width: 100%;
    margin-left: 270px;
    padding-top: 100px !important;
    padding-bottom: 80px !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

/* Remove espaçamentos extras de elementos dentro do content (mas não do content) */
.content > * {
    margin-top: 0 !important;
}

.content > .p-1 {
    padding-top: 0.25rem !important;
}

.content > .p-2 {
    padding-top: 0.5rem !important;
}

.content > .p-3 {
    padding-top: 1rem !important;
}

.content .list-group-item:first-child {
    margin-top: 0 !important;
}

/* Corrige altura de elementos flex (cabeçalhos) */
.content .d-flex {
    min-height: auto !important;
}

.content .d-flex.align-items-center {
    min-height: auto !important;
    height: auto !important;
}

/* Cabeçalho da página com botões */
.content .d-flex.align-items-center.bg-light {
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem !important;
}

/* Preserva espaçamento dos botões no toolbar */
.content .btn-toolbar .btn-group {
    margin-right: 0.5rem !important;
}

.content .btn-toolbar .btn-group:last-child {
    margin-right: 0 !important;
}

/* Corrige altura de títulos */
.content .titulo,
.content h1,
.content h2,
.content h3,
.content h4,
.content .display-4 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* Corrige altura de cards e formulários */
.content .card {
    margin-bottom: 1rem !important;
}

.content .card-header {
    padding: 0.75rem 1rem !important;
}

.content .card-body {
    padding: 1rem !important;
}

.content .form-row {
    margin-bottom: 0 !important;
}

.content .form-group {
    margin-bottom: 1rem !important;
}

/* Corrige altura de botões */
.content .btn,
.content button {
    padding: 0.375rem 0.75rem !important;
    line-height: 1.5 !important;
}

/* Mantém estrutura do Bootstrap para btn-toolbar e btn-group */
.content .btn-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.content .btn-group {
    display: inline-flex !important;
}

/* Modal buttons - normalize heights */
.modal-body .btn,
.modal-footer .btn,
#view_data_transfer .btn,
#viewTransferModal .btn,
#viewTransferModal button {
    padding: 0.375rem 0.75rem !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    margin: 0.25rem !important;
    font-size: 0.875rem !important;
}

.modal-body .card-body .btn {
    margin-bottom: 0.25rem !important;
    padding: 0.375rem 0.75rem !important;
}

/* Transfer action buttons specific styling - super specific selectors */
#view_data_transfer .card-body .d-flex.flex-wrap {
    gap: 0.5rem !important;
}

#viewTransferModal #view_data_transfer .card .card-body .btn,
#viewTransferModal #view_data_transfer .card-body .d-flex .btn,
#viewTransferModal #view_data_transfer .card-body .btn.mr-2,
#viewTransferModal #view_data_transfer .btn.btn-info,
#viewTransferModal #view_data_transfer .btn.btn-warning,
#viewTransferModal #view_data_transfer .btn.btn-success,
#viewTransferModal #view_data_transfer .btn.btn-secondary,
#viewTransferModal #view_data_transfer .btn.btn-outline-secondary,
#viewTransferModal #view_data_transfer button[type="button"],
.modal#viewTransferModal .modal-body #view_data_transfer button,
.modal#viewTransferModal .modal-body #view_data_transfer .btn {
    padding: 0.375rem 0.75rem !important;
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    font-size: 0.875rem !important;
    margin: 0 0.5rem 0 0 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    border-width: 1px !important;
}

/* Force reset para TODOS os botões dentro do view_data_transfer */
.content #view_data_transfer .btn,
.content #view_data_transfer button {
    padding: 0.375rem 0.75rem !important;
    line-height: 1.5 !important;
    height: auto !important;
}

/* Ultra-specific rules for transfer action buttons using onclick attribute */
#view_data_transfer button[onclick^="confirmPickup"],
#view_data_transfer button[onclick^="openDeliveryModal"],
#view_data_transfer button[onclick^="confirmReceipt"],
#view_data_transfer .card .card-body button,
#view_data_transfer .card .card-body .btn {
    display: inline-block !important;
    padding: 0.375rem 0.75rem !important;
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: 38px !important;
    font-size: 0.875rem !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

/* Conteúdo quando sidebar está colapsado */
body.sidebar-collapsed .content {
    margin-left: 70px;
}

/* Mobile - conteúdo ocupa tela inteira */
@media (max-width: 767px) {
    .content {
        margin-left: 0 !important;
        padding-top: 85px !important;
        padding-bottom: 80px !important;
    }

    body.sidebar-collapsed .content {
        margin-left: 0 !important;
    }
}

/* Ajuste do navbar para trabalhar com sidebar fixo */
.navbar {
    position: fixed;
    top: 0;
    left: 270px;
    right: 0;
    z-index: 1020;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 70px;
    padding: 0.75rem 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
}

/* Botão toggle mobile no header */
#mobileMenuToggle {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#mobileMenuToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

#mobileMenuToggle:focus {
    outline: none;
    box-shadow: none;
}

#mobileMenuToggle .navbar-toggler-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Navbar quando sidebar está colapsado */
body.sidebar-collapsed .navbar {
    left: 70px;
}

/* Mobile - navbar ocupa toda a largura */
@media (max-width: 767px) {
    .navbar {
        left: 0 !important;
    }

    body.sidebar-collapsed .navbar {
        left: 0 !important;
    }
}

.titulo{
    font-size: 2.0rem !important;
}

.new-title{
    font-size: 1rem !important;
}

.imagem{
    width: 120px;
    height: 120px;
    margin-left: 5px !important;
    margin-right: 5px !important;
}

.img-media{
    width: 250px;
    height: 250px;
}

.text-center.order-payment{
    vertical-align: middle !important;
}

/* Estilos customizados para o novo layout */
.kpi-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.kpi-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-weight: 600;
}

.kpi-icon {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
    display: inline-block;
}

.status-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.status-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    border: none;
}

.status-table td {
    vertical-align: middle;
    font-size: 0.95rem;
    border-color: #f1f3f5;
}

.badge-count {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.mini-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.mini-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.mini-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.mini-card-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

.section-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.quick-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.quick-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Containers de agrupamento visual */
.section-group {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.section-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Padronização de altura das tabelas */
.status-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    min-height: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.status-table table {
    height: 100%;
}

.status-table tbody {
    height: 100%;
}

/* Container para tabelas na mesma linha */
.table-row-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.table-col {
    flex: 1;
}

/* Separadores de seção */
.section-divider {
    height: 3px;
    background: linear-gradient(to right, #3498db, transparent);
    margin: 1.5rem 0 1rem 0;
    border-radius: 2px;
}

/* Card de seção com destaque */
.highlight-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Grupos de mini-cards */
.mini-cards-group {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #e9ecef;
}

/* Altura padrão para containers de RH */
.section-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    min-height: 260px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.section-container h6 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

/* Garantir altura igual para colunas */
.equal-height-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.equal-height-col {
    display: flex;
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

.equal-height-col > * {
    width: 100%;
}

/* Cards de pagamento com altura uniforme */
.payment-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.payment-card .kpi-value {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0.75rem 0;
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Filtro de datas */
.filter-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.filter-form {
    margin: 0;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-input {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    width: 100%;
}

.filter-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

.btn-filter {
    padding: 0.35rem 1.25rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    white-space: nowrap;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-filter-clear {
    padding: 0.35rem 1.25rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    white-space: nowrap;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-filter-clear:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Container para grupo de botões de filtro */
.btn-group-filters {
    gap: 0;
}

@media (min-width: 576px) {
    .btn-group-filters {
        gap: 0.5rem;
        align-items: center;
    }

    .btn-group-filters .btn-filter,
    .btn-group-filters .btn-filter-clear {
        margin-left: 0;
        flex: 0 0 auto;
    }
}

/* Tablets: botões apenas com ícones */
@media (min-width: 768px) and (max-width: 991.98px) {
    .btn-group-filters .btn-filter,
    .btn-group-filters .btn-filter-clear {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        align-items: center;
    }
}

/* Ajustes para filtros em telas pequenas */
@media (max-width: 991px) {
    .filter-container .col-md-3 {
        margin-bottom: 0.75rem;
    }

    .btn-filter,
    .btn-filter-clear {
        width: 100%;
        margin-left: 0;
        margin-bottom: 0.5rem;
    }
}

.permission-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.permission-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.level-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.permission-table {
    width: 100%;
    margin-top: 1rem;
}

.permission-table th {
    background-color: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.permission-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.permission-table tr:last-child td {
    border-bottom: none;
}

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

.custom-switch-lg {
    padding-left: 3.5rem;
}

.custom-switch-lg .custom-control-label {
    padding-top: 0.5rem;
    padding-left: 1rem;
}

.custom-switch-lg .custom-control-label::before {
    height: 2rem;
    width: 3.5rem;
    border-radius: 2rem;
}

.custom-switch-lg .custom-control-label::after {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 1.5rem;
}

.custom-switch-lg .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(1.5rem);
}

.section-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    color: #6c757d;
}

.section-name {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #2c3e50;
}

.save-btn {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-info-custom {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* ==================== VARIÁVEIS CSS PARA RESPONSIVIDADE ==================== */
:root {
    --primary-color: #4a90e2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --secondary-color: #6c757d;

    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* ==================== TÍTULOS DE SEÇÃO RESPONSIVOS ==================== */
.section-title {
    font-size: clamp(1.125rem, 3vw, 1.5rem) !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin-bottom: var(--spacing-lg) !important;
    padding-bottom: var(--spacing-sm) !important;
    border-bottom: 3px solid #e9ecef !important;
    display: flex !important;
    align-items: center !important;
}

.section-title i {
    font-size: clamp(1.25rem, 3vw, 1.75rem) !important;
    margin-right: var(--spacing-sm) !important;
    color: var(--primary-color) !important;
}

/* ==================== KPI CARDS RESPONSIVOS ==================== */
.kpi-card {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--card-shadow) !important;
    transition: var(--transition) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 140px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.kpi-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--card-shadow-hover) !important;
}

.kpi-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 100px !important;
    height: 100px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    transform: translate(30%, -30%) !important;
}

.kpi-label {
    font-size: clamp(0.65rem, 1.5vw, 0.75rem) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    opacity: 0.95 !important;
    margin-bottom: var(--spacing-xs) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
}

.kpi-value {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin: var(--spacing-xs) 0 !important;
    word-break: break-word !important;
}

.kpi-card small {
    font-size: clamp(0.65rem, 1.2vw, 0.75rem) !important;
    opacity: 0.9 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.kpi-icon {
    position: absolute !important;
    right: var(--spacing-md) !important;
    bottom: var(--spacing-md) !important;
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    opacity: 0.15 !important;
}

/* ==================== TABELAS DE STATUS RESPONSIVAS ==================== */
.status-table thead th {
    font-size: clamp(0.875rem, 2vw, 1rem) !important;
    font-weight: 700 !important;
    padding: var(--spacing-md) !important;
}

.status-table tbody td {
    font-size: clamp(0.875rem, 1.8vw, 1rem) !important;
    padding: var(--spacing-md) !important;
    vertical-align: middle !important;
}

.status-table tbody tr {
    transition: var(--transition) !important;
}

.status-table tbody tr:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.01) !important;
}

.badge-count {
    font-size: clamp(0.875rem, 2vw, 1rem) !important;
    padding: var(--spacing-xs) var(--spacing-md) !important;
    border-radius: 20px !important;
}

/* ==================== MINI CARDS RESPONSIVOS ==================== */
.mini-card {
    background: white !important;
    border-radius: var(--border-radius) !important;
    padding: var(--spacing-lg) !important;
    box-shadow: var(--card-shadow) !important;
    transition: var(--transition) !important;
    text-align: center !important;
    min-height: 180px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    border-left: 4px solid !important;
}

.mini-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--card-shadow-hover) !important;
}

.mini-card i {
    font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
    margin-bottom: var(--spacing-sm) !important;
}

.mini-card-value {
    font-size: clamp(1.5rem, 4vw, 2.25rem) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin: var(--spacing-xs) 0 !important;
}

.mini-card-label {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem) !important;
    font-weight: 600 !important;
    color: #6c757d !important;
    margin: 0 !important;
    text-align: center !important;
    line-height: 1.3 !important;
}

/* ==================== SECTION CONTAINER RESPONSIVO ==================== */
.section-container h6 {
    font-size: clamp(1rem, 2.5vw, 1.125rem) !important;
    margin-bottom: var(--spacing-md) !important;
}

.quick-stat-label {
    font-size: clamp(0.875rem, 2vw, 1rem) !important;
    color: #6c757d !important;
    margin: 0 !important;
}

.quick-stat-value {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

/* ==================== PAYMENT CARDS RESPONSIVOS ==================== */
.payment-card {
    min-height: 160px !important;
}

.payment-card .kpi-value {
    font-size: clamp(1.25rem, 3vw, 1.75rem) !important;
    line-height: 1.2 !important;
}

.payment-card .kpi-label {
    font-size: clamp(0.65rem, 1.3vw, 0.7rem) !important;
}

/* ==================== ANIMAÇÕES ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card, .mini-card, .status-table, .section-container {
    animation: fadeIn 0.5s ease-out;
}

/* ==================== ACESSIBILIDADE ==================== */
a.text-decoration-none:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.kpi-card:focus-within,
.mini-card:focus-within {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

/* ==================== SCROLL SUAVE ==================== */
html {
    scroll-behavior: smooth;
}

/* ==================== BADGES RESPONSIVOS ==================== */
.badge {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem) !important;
    padding: var(--spacing-xs) var(--spacing-sm) !important;
    font-weight: 600 !important;
}

/* ==================== MEDIA QUERIES - RESPONSIVIDADE ==================== */

/* Tablets e acima */
@media (min-width: 768px) {
    .content {
        padding: var(--spacing-lg);
    }

    .kpi-card {
        min-height: 160px !important;
    }

    .mini-card {
        min-height: 200px !important;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .content {
        padding: var(--spacing-xl);
    }

    .filter-container {
        padding: var(--spacing-xl);
    }

    .kpi-card {
        min-height: 180px !important;
    }
}

/* Mobile pequeno */
@media (max-width: 576px) {
    .kpi-card {
        min-height: 120px !important;
        margin-bottom: var(--spacing-md) !important;
    }

    .kpi-label {
        font-size: 0.65rem !important;
    }

    .kpi-value {
        font-size: 1.5rem !important;
    }

    .kpi-icon {
        font-size: 1.75rem !important;
    }

    .kpi-card small {
        font-size: 0.65rem !important;
    }

    .mini-card {
        min-height: 140px !important;
        padding: var(--spacing-md) !important;
    }

    .mini-card i {
        font-size: 1.75rem !important;
    }

    .mini-card-value {
        font-size: 1.5rem !important;
    }

    .mini-card-label {
        font-size: 0.75rem !important;
    }

    .status-table thead th {
        font-size: 0.7rem !important;
        padding: var(--spacing-sm) !important;
    }

    .status-table tbody td {
        font-size: 0.8rem !important;
        padding: var(--spacing-sm) !important;
    }

    .section-title {
        font-size: 1rem !important;
    }

    .section-container {
        padding: var(--spacing-md) !important;
        margin-bottom: var(--spacing-md) !important;
    }

    .quick-stat-value {
        font-size: 1.25rem !important;
    }

    .quick-stat-label {
        font-size: 0.75rem !important;
    }

    .btn-filter {
        width: 100%;
        margin-bottom: var(--spacing-xs);
        padding: 0.3rem 1rem;
        font-size: 0.8rem;
    }

    .btn-filter-clear {
        width: 100%;
        margin-left: 0;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .filter-container .col-md-3 {
        margin-bottom: var(--spacing-sm);
    }

    .payment-card .kpi-value {
        font-size: 1.25rem !important;
    }

    .payment-card .kpi-label {
        font-size: 0.6rem !important;
    }
}

/* Tablets */
@media (min-width: 577px) and (max-width: 991px) {
    .kpi-card {
        min-height: 140px !important;
    }

    .col-lg-6.mb-3 {
        margin-bottom: var(--spacing-md) !important;
    }
}

/* Grid Responsivo */
@media (max-width: 767px) {
    .form-row > [class*="col-"] {
        margin-bottom: var(--spacing-md);
    }

    .form-row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .btn-filter-margin {
        margin-top: 10px;
    }
}

/* ==================== IMPRESSÃO ==================== */
/* Disabled - using print.css instead
@media print {

}
*/

/* ==================== DARK MODE ==================== */
@media (prefers-color-scheme: dark) {
    :root {
        --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .filter-container,
    .status-table,
    .mini-card,
    .section-container {
        background: #2d3748;
        color: #e2e8f0;
    }

    .section-title,
    .quick-stat-label,
    .mini-card-label {
        color: #cbd5e0;
    }

    .section-group {
        background: #1a202c;
    }
}

.bg-success-light {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}
.bg-danger-light {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

/* ==================== RELOCATION MODAL STYLES ==================== */
/**
 * Relocation Modal - CSS
 *
 * Estilos personalizados para o modal de cadastro de remanejos
 * Suporta dois modos: Single (loja única) e Multiple (múltiplas lojas)
 *
 * @copyright (c) 2025, Chirlanio Silva - Grupo Meia Sola
 */

/* Modal Header */
#addRelocationModal .modal-header {
    border-bottom: 2px solid #28a745;
}

/* Modal Messages */
#modal-messages-relocation {
    margin-bottom: 1rem;
}

#modal-messages-relocation .alert {
    margin-bottom: 0;
}

/* Tabs */
#relocationTypeTabs .nav-link {
    color: #495057;
    font-weight: 500;
}

#relocationTypeTabs .nav-link.active {
    color: #28a745;
    border-bottom-color: #28a745;
}

#relocationTypeTabs .nav-link:hover {
    color: #218838;
}

/* Cards dentro do modal */
#addRelocationModal .card-header {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Alertas dentro do modal */
#addRelocationModal .alert-info {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    color: #004085;
}

#addRelocationModal .alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Botões de download */
#addRelocationModal .btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

#addRelocationModal .btn-outline-primary:hover {
    background-color: #007bff;
    color: #fff;
}

/* Campos required */
#addRelocationModal .text-danger {
    font-weight: bold;
}

/* Input file */
#addRelocationModal .form-control-file {
    padding: 0.375rem 0;
}

/* Responsividade */
@media (max-width: 768px) {
    #addRelocationModal .modal-dialog {
        margin: 0.5rem;
    }

    #addRelocationModal .form-row > div {
        margin-bottom: 1rem;
    }
}

/* ==================== VIEW RELOCATION MODAL STYLES ==================== */
/* Estilos para o modal de visualização de remanejos */

/* Loading spinner */
#viewRelocationLoading {
    min-height: 300px;
}

#viewRelocationLoading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Estatísticas */
#viewRelocationModal .card-header {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
}

#viewRelocationModal dl dt {
    font-weight: 600;
    color: #495057;
}

#viewRelocationModal dl dd {
    color: #6c757d;
}

/* Botões de ação */
#viewRelocationModal .btn-group .btn {
    margin: 0;
}

#viewRelocationModal .btn-group .btn:not(:last-child) {
    border-right: none;
}

/* Tabela de produtos */
#viewRelocationModal .table {
    font-size: 0.875rem;
}

#viewRelocationModal .table th {
    background-color: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

#viewRelocationModal .table td,
#viewRelocationModal .table th {
    vertical-align: middle;
    padding: 0.5rem;
}

#viewRelocationModal .table .img-thumbnail {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Badges de status */
#viewRelocationModal .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Error container */
#viewRelocationError {
    min-height: 200px;
}

#viewRelocationError .alert {
    margin: 2rem auto;
    max-width: 600px;
}

/* Responsividade */
@media (max-width: 768px) {
    #viewRelocationModal .modal-dialog {
        margin: 0.5rem;
    }

    #viewRelocationModal .table {
        font-size: 0.75rem;
    }

    #viewRelocationModal dl dt,
    #viewRelocationModal dl dd {
        font-size: 0.875rem;
    }
}

/* ==================== PRINT STYLES ==================== */
/* Estilos para impressão do modal de visualização */

@media print {
    /* Oculta elementos desnecessários */
    body * {
        visibility: hidden;
    }

    /* Remove scroll bars */
    body,
    html {
        overflow: hidden !important;
        width: 100%;
        height: auto;
    }

    /* Oculta elementos com classe no-print */
    .no-print,
    .modal-header,
    .modal-footer,
    .sidebar,
    .navbar,
    header,
    footer,
    .btn,
    button,
    .pagination,
    #viewRelocationLoading,
    #viewRelocationError,
    .modal-backdrop {
        display: none !important;
        visibility: hidden !important;
    }

    /* Mostra apenas o conteúdo do modal */
    #viewRelocationModal,
    #viewRelocationModal *,
    #viewRelocationContent,
    #viewRelocationContent * {
        visibility: visible;
    }

    /* Posiciona o modal para impressão */
    #viewRelocationModal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #viewRelocationModal .modal-dialog {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #viewRelocationModal .modal-content {
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    #viewRelocationModal .modal-body {
        padding: 15px !important;
        overflow: visible !important;
        width: 100% !important;
    }

    /* Mostra header de impressão */
    .print-only {
        display: block !important;
        visibility: visible !important;
        page-break-after: avoid;
        text-align: center !important;
    }

    .print-only h2,
    .print-only h4 {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Ajusta cards */
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    .card-header {
        background-color: #f0f0f0 !important;
        border-bottom: 2px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        text-align: center !important;
    }

    .card-body {
        padding: 10px !important;
    }

    /* Remove table-responsive wrapper que causa scroll */
    .table-responsive {
        overflow: visible !important;
        width: 100% !important;
        page-break-inside: auto;
    }

    /* Ajusta tabela */
    .table {
        border: 1px solid #000 !important;
        page-break-inside: auto;
        width: 100% !important;
        table-layout: fixed !important;
        overflow: visible !important;
    }

    .table thead {
        display: table-header-group;
    }

    .table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .table th,
    .table td {
        border: 1px solid #000 !important;
        padding: 4px 2px !important;
        font-size: 8pt !important;
        word-wrap: break-word !important;
        overflow: visible !important;
    }

    .table th {
        background-color: #e0e0e0 !important;
        font-weight: bold;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        text-align: center !important;
    }

    /* Ajusta larguras específicas das colunas */
    .table th:nth-child(1),
    .table td:nth-child(1) {
        width: 8% !important;
    }

    .table th:nth-child(2),
    .table td:nth-child(2) {
        width: 8% !important;
    }

    .table th:nth-child(3),
    .table td:nth-child(3) {
        width: 5% !important;
        text-align: center !important;
    }

    .table th:nth-child(4),
    .table td:nth-child(4) {
        width: 10% !important;
    }

    /* Colunas de tamanho dinâmicas */
    .table th.size-col,
    .table td.size-col {
        width: 4% !important;
        text-align: center !important;
    }

    /* Ajusta badges */
    .badge {
        border: 1px solid #000 !important;
        padding: 1px 4px !important;
        font-size: 7pt !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Ajusta imagens */
    .img-thumbnail {
        border: 1px solid #000 !important;
        max-width: 30px !important;
        max-height: 30px !important;
    }

    /* Remove sombras */
    .shadow-sm,
    .shadow,
    .shadow-lg {
        box-shadow: none !important;
    }

    /* Ajusta tipografia */
    h2 {
        font-size: 16pt !important;
        font-weight: bold;
        margin-bottom: 8px !important;
        text-align: center !important;
    }

    h4 {
        font-size: 12pt !important;
        margin-bottom: 6px !important;
        text-align: center !important;
    }

    h5, h6 {
        font-size: 10pt !important;
        text-align: center !important;
    }

    /* Ajusta estatísticas */
    dl dt {
        font-weight: bold;
        font-size: 9pt !important;
    }

    dl dd {
        font-size: 9pt !important;
    }

    /* Oculta colunas menos importantes em telas menores */
    .d-none.d-sm-table-cell {
        display: table-cell !important;
    }

    /* Configurações de página */
    @page {
        size: A4 landscape;
        margin: 0.5cm;
    }

    /* Força quebra de página antes das estatísticas e produtos */
    #viewRelocationContent > .card:first-of-type {
        page-break-before: auto;
    }

    /* Evita quebra de página dentro de elementos */
    .card-body {
        page-break-inside: avoid;
    }
}

/* ==================== User Statistics Dashboard ==================== */

/* Lista de distribuição de estatísticas */
.stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-list-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.stat-list-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.stat-list-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #495057;
}

/* Barra de progresso para estatísticas */
.stat-bar-container {
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.stat-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    border-radius: 5px;
    transition: width 0.6s ease-in-out;
}

.stat-bar-success {
    background: linear-gradient(90deg, #28a745 0%, #218838 100%);
}

/* Responsivo */
@media (max-width: 768px) {
    .stat-list-item {
        padding: 0.5rem 0;
    }

    .stat-list-label,
    .stat-list-value {
        font-size: 0.85rem;
    }
}

/* Print - ocultar dashboard */
@media print {
    #users-statistics-dashboard {
        display: none;
    }
}