/* ===== DASHBOARD CSS - VERSÃO LIMPA E ORGANIZADA ===== */
/* Arquivo criado em 2025-01-20 - Todas as duplicações removidas e erros corrigidos */

/* ===== VARIÁVEIS CSS ===== */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-primary-bold: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-titles: 'Inter', sans-serif;

    /* Dashboard colors */
    --dash-primary: #000000;
    --dash-primary-hover: #333333;
    --dash-secondary: #666666;
    --dash-accent: #000000;

    /* Glassmorphism colors */
    --dash-glass-bg: rgba(255, 255, 255, 0.1);
    --dash-glass-border: rgba(255, 255, 255, 0.2);
    --dash-glass-shadow: rgba(0, 0, 0, 0.1);

    /* Text colors */
    --dash-text-primary: #ffffff;
    --dash-text-secondary: rgba(255, 255, 255, 0.8);
    --dash-text-muted: rgba(255, 255, 255, 0.6);
}

/* REMOVIDO: Estilos do loading screen fake - agora usando overlay de transição de módulos */
/* Os estilos antigos (.dashboard-loading) foram removidos pois o sistema foi substituído */

/* Estilos para loading de módulos */
.module-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 2rem;
}

.module-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.module-loading p {
    color: #666666;
    font-size: 1rem;
    text-align: center;
}

/* ===== SISTEMA DE TRANSIÇÃO DE MÓDULOS ===== */
/* Overlay de transição com glassmorphism premium */
.module-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.85) 0%, rgba(30, 30, 30, 0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.module-transition-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Container do spinner de transição */
.module-transition-overlay .transition-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.35s ease;
}

.module-transition-overlay.active .transition-content {
    transform: scale(1);
    opacity: 1;
}

/* Spinner premium com múltiplos anéis */
.module-transition-overlay .transition-spinner {
    position: relative;
    width: 70px;
    height: 70px;
}

.module-transition-overlay .spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.module-transition-overlay .spinner-ring:nth-child(1) {
    border-top-color: #ffffff;
    animation: spinnerRing1 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.module-transition-overlay .spinner-ring:nth-child(2) {
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
    border-right-color: rgba(255, 255, 255, 0.6);
    animation: spinnerRing2 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.module-transition-overlay .spinner-ring:nth-child(3) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    animation: spinnerRing1 1.8s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

/* Ponto central pulsante */
.module-transition-overlay .spinner-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 50%;
    animation: spinnerPulse 1s ease-in-out infinite;
}

/* Texto de transição */
.module-transition-overlay .transition-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
}

.module-transition-overlay .transition-subtext {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: -0.5rem;
}

/* Keyframes para o spinner */
@keyframes spinnerRing1 {
    0% {
        transform: rotate(0deg);
    }

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

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

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

@keyframes spinnerPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.5;
    }
}

/* Animação de saída do conteúdo antigo */
#main-content-area.module-fade-out {
    animation: moduleFadeOut 0.25s ease-out forwards;
    pointer-events: none;
}

/* Animação de entrada do conteúdo novo */
#main-content-area.module-fade-in {
    animation: moduleFadeIn 0.35s ease-out forwards;
}

@keyframes moduleFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

@keyframes moduleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== RESET E BASE ===== */
body {
    font-family: var(--font-primary);
    margin: 0;
    background-color: #f1f5f9;
    color: #333;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.strong-text {
    font-family: var(--font-primary-bold);
}

/* ===== LAYOUT PRINCIPAL ===== */
.dashboard-container {
    display: flex;
    width: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    position: relative;
    z-index: 10001;
    /* Higher than sidebar (10000) to establish stacking context */
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR STYLES ===== */
/* Todos os estilos do sidebar foram movidos para public/css/dashboard-sidebar.css */
/* para garantir centralização e evitar conflitos. */


/* ===== MAIN CONTENT ===== */
/* ===== MAIN CONTENT ===== */
.dashboard-main {
    /* Rail Width (90px) */
    margin-left: 90px;
    width: calc(100% - 90px);
    flex: 1;
    padding: 30px;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 20000;
    /* Higher than sidebar (10000) to ensure children (modals) appear above */
    background-color: #f4f6f9;
    /* The "gray" background */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-placeholder {
    text-align: center;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-placeholder h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: var(--font-titles);
}

/* ===== MODULE CONTENT AREA ===== */
.module-content-area {
    width: 100%;
    padding: 0;
    margin: 0;
}

.module-header,
.module-section,
.module-card,
.module-row {
    margin-bottom: 10px !important;
}

.overview-module>*:first-child,
.checkout-module>*:first-child,
.inventory-module>*:first-child,
.products-module>*:first-child,
.store-layout-module>*:first-child {
    margin-top: 0 !important;
}

.dashboard-content {
    padding-top: 10px !important;
}

.dashboard-main .dashboard-content {
    padding-bottom: 10px;
}

/* ===== HEADER ===== */
.dashboard-header {
    
    background-color: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 900;
    min-height: 70px;
}

/* Breadcrumb Styles */
.dashboard-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #666;
    margin-right: 20px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-category {
    font-weight: 500;
    color: #888;
}

.breadcrumb-separator {
    color: #ccc;
    font-size: 0.8rem;
}

.breadcrumb-module {
    font-weight: 600;
    color: #333;
}

body.modal-open .dashboard-header {
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-voyger-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 8px 12px;
    transition: all 0.25s ease;
}



.header-voyger-logo {
    display: block;
    height: 22px;
    width: auto;
}

.header-left #module-title {
    font-size: 1.5em;
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    font-family: var(--font-titles);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    color: rgba(0, 0, 0, 0.6);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.8);
    transform: translateY(-1px);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Search bar */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-bar input {
    padding: 12px 20px 12px 45px;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 1rem;
    width: 100%;
    min-width: 280px;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: 48px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.4);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.25);
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-bar input:focus+i {
    color: rgba(0, 0, 0, 0.7);
}

.search-bar input::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-weight: 400;
}

/* Notifications */
.notifications {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.notifications:hover {
    background-color: rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.notifications i {
    font-size: 1.4em;
    color: rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease;
}

.notifications:hover i {
    color: rgba(0, 0, 0, 0.8);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7em;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: pulse-notification 2s infinite;
}

/* User profile */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    gap: 10px;
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.user-profile .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
}

.user-profile:hover .avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.user-profile #user-name {
    font-weight: 600;
    font-family: var(--font-body);
    color: rgba(0, 0, 0, 0.8);
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.user-profile:hover #user-name {
    color: rgba(0, 0, 0, 0.9);
}

.user-profile .fa-chevron-down {
    font-size: 0.8em;
    color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    color: #777;
}

/* Profile dropdown */
.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1001;
    margin-top: 10px;
    padding-top: 10px;
}

.user-profile::after {
    content: '';
    position: absolute;
    height: 10px;
    width: 100%;
    bottom: -10px;
    left: 0;
    z-index: 1000;
}

.user-profile:hover .profile-dropdown,
.profile-dropdown:hover,
.user-profile.active .profile-dropdown {
    display: block;
}

.profile-dropdown a,
.profile-dropdown .profile-link {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    font-family: var(--font-body);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.profile-dropdown a:hover,
.profile-dropdown .profile-link:hover {
    background-color: #f8f9fa;
}

.profile-dropdown a i,
.profile-dropdown .profile-link i {
    margin-right: 10px;
    color: #777;
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 5px 0;
}

/* ===== MAIN CONTENT ===== */
.dashboard-main {
    /* Rail Width (90px) + Extra Gap if needed */
    margin-left: 90px;
    flex: 1;
    padding: 30px;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 20000;
    /* Keep this above sidebar so module-level fixed modals can overlay correctly */
    background-color: #f4f6f9;
    /* The "gray" background */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-placeholder {
    text-align: center;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-placeholder h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: var(--font-titles);
}

/* ===== MODULE CONTENT AREA ===== */
.module-content-area {
    width: 100%;
    padding: 0;
    margin: 0;
}

.module-header,
.module-section,
.module-card,
.module-row {
    margin-bottom: 10px !important;
}

.overview-module>*:first-child,
.checkout-module>*:first-child,
.inventory-module>*:first-child,
.products-module>*:first-child,
.store-layout-module>*:first-child {
    margin-top: 0 !important;
}

.dashboard-content {
    padding-top: 10px !important;
}

.dashboard-main .dashboard-content {
    padding-bottom: 10px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-secondary));
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
    min-height: 28px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dash-primary-hover), var(--dash-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: #666666;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
    min-height: 28px;
}

.btn-secondary:hover {
    background: #555555;
    transform: translateY(-2px);
}

/* ===== SCROLLBARS ===== */
/* Webkit scrollbars */
.dashboard-sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    width: 12px;
}

.dashboard-sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin: 12px 0;
}

.dashboard-sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: background 0.3s ease;
    min-height: 70px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.dashboard-main::-webkit-scrollbar,
.dashboard-content::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.profile-modal-content::-webkit-scrollbar,
.profile-modal-sections::-webkit-scrollbar,
.profile-modal-nav::-webkit-scrollbar,
.overview-module::-webkit-scrollbar,
.checkout-module::-webkit-scrollbar,
.inventory-module::-webkit-scrollbar,
.products-module::-webkit-scrollbar,
.store-layout-module::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.data-table::-webkit-scrollbar,
.list-container::-webkit-scrollbar,
.form-container::-webkit-scrollbar,
.form-group::-webkit-scrollbar,
.card::-webkit-scrollbar,
.card-body::-webkit-scrollbar {
    width: 8px;
}

.dashboard-main::-webkit-scrollbar-track,
.dashboard-content::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
.profile-modal-content::-webkit-scrollbar-track,
.profile-modal-sections::-webkit-scrollbar-track,
.profile-modal-nav::-webkit-scrollbar-track,
.overview-module::-webkit-scrollbar-track,
.checkout-module::-webkit-scrollbar-track,
.inventory-module::-webkit-scrollbar-track,
.products-module::-webkit-scrollbar-track,
.store-layout-module::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track,
.data-table::-webkit-scrollbar-track,
.list-container::-webkit-scrollbar-track,
.form-container::-webkit-scrollbar-track,
.form-group::-webkit-scrollbar-track,
.card::-webkit-scrollbar-track,
.card-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.dashboard-main::-webkit-scrollbar-thumb,
.dashboard-content::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.profile-modal-content::-webkit-scrollbar-thumb,
.profile-modal-sections::-webkit-scrollbar-thumb,
.profile-modal-nav::-webkit-scrollbar-thumb,
.overview-module::-webkit-scrollbar-thumb,
.checkout-module::-webkit-scrollbar-thumb,
.inventory-module::-webkit-scrollbar-thumb,
.products-module::-webkit-scrollbar-thumb,
.store-layout-module::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.data-table::-webkit-scrollbar-thumb,
.list-container::-webkit-scrollbar-thumb,
.form-container::-webkit-scrollbar-thumb,
.form-group::-webkit-scrollbar-thumb,
.card::-webkit-scrollbar-thumb,
.card-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.dashboard-main::-webkit-scrollbar-thumb:hover,
.dashboard-content::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover,
.profile-modal-content::-webkit-scrollbar-thumb:hover,
.profile-modal-sections::-webkit-scrollbar-thumb:hover,
.profile-modal-nav::-webkit-scrollbar-thumb:hover,
.overview-module::-webkit-scrollbar-thumb:hover,
.checkout-module::-webkit-scrollbar-thumb:hover,
.inventory-module::-webkit-scrollbar-thumb:hover,
.products-module::-webkit-scrollbar-thumb:hover,
.store-layout-module::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover,
.data-table::-webkit-scrollbar-thumb:hover,
.list-container::-webkit-scrollbar-thumb:hover,
.form-container::-webkit-scrollbar-thumb:hover,
.form-group::-webkit-scrollbar-thumb:hover,
.card::-webkit-scrollbar-thumb:hover,
.card-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox scrollbars */
.dashboard-sidebar,
.sidebar-nav,
.dashboard-main,
.dashboard-content,
.modal,
.profile-modal-content,
.profile-modal-sections,
.profile-modal-nav,
.overview-module,
.checkout-module,
.inventory-module,
.products-module,
.store-layout-module,
.table-container,
.data-table,
.list-container,
.form-container,
.form-group,
.card,
.card-body {
    scrollbar-width: thin;
}

.dashboard-sidebar,
.sidebar-nav {
    scrollbar-color: rgba(255, 255, 255, 0.5) rgba(255, 255, 255, 0.1);
}

.dashboard-main,
.dashboard-content,
.modal,
.profile-modal-content,
.profile-modal-sections,
.profile-modal-nav,
.overview-module,
.checkout-module,
.inventory-module,
.products-module,
.store-layout-module,
.table-container,
.data-table,
.list-container,
.form-container,
.form-group,
.card,
.card-body {
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

/* ===== RESPONSIVE DESIGN - CORREÇÕES CRÍTICAS ===== */

/* CORREÇÃO CRÍTICA: Tablets e dispositivos médios */
@media (max-width: 992px) {
    .dashboard-sidebar {
        /* CORREÇÃO CRÍTICA: Altura garantida */
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;

        /* CORREÇÃO CRÍTICA: Transformações */
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;

        /* CORREÇÃO CRÍTICA: Z-index */
        z-index: 1000 !important;

        /* CORREÇÃO CRÍTICA: Box shadow */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
    }

    .dashboard-sidebar.open {
        transform: translateX(0) !important;
        z-index: 1000 !important;
    }

    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    .header-right .search-bar {
        display: none !important;
    }

    /* CORREÇÃO CRÍTICA: Overlay */
    .sidebar-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
        z-index: 998 !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    .sidebar-overlay.active {
        opacity: 1 !important;
    }
}

/* CORREÇÃO CRÍTICA: Desktop normal */
@media (min-width: 993px) {
    .sidebar-overlay {
        display: none !important;
    }

    .dashboard-sidebar {
        z-index: 1002 !important;
    }
}

/* CORREÇÃO COMPLETA: Mobile - Breakpoint 768px */
@media (max-width: 768px) {

    /* CORREÇÃO CRÍTICA: Sidebar mobile */
    .dashboard-sidebar {
        /* CORREÇÃO CRÍTICA: Altura completa da tela */
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;

        /* CORREÇÃO CRÍTICA: Posicionamento */
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;

        /* CORREÇÃO CRÍTICA: Transformações */
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
    }

    /* CORREÇÃO CRÍTICA: Sidebar aberto no mobile */
    .dashboard-sidebar.open {
        transform: translateX(0) !important;
        z-index: 1000 !important;
    }

    /* CORREÇÃO CRÍTICA: Área de navegação mobile */
    .dashboard-sidebar .sidebar-nav {
        /* CORREÇÃO CRÍTICA: Altura dinâmica baseada no conteúdo */
        height: calc(100vh - 140px) !important;
        /* 70px header + 70px footer */
        max-height: calc(100vh - 140px) !important;
        min-height: 200px !important;

        /* CORREÇÃO CRÍTICA: Scroll melhorado */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scroll-behavior: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* CORREÇÃO CRÍTICA: Itens mobile */
    .dashboard-sidebar .sidebar-nav .nav-item {
        min-height: 45px !important;
        flex: 0 0 45px !important;
    }

    .dashboard-sidebar .sidebar-nav .nav-item a {
        height: 45px !important;
        min-height: 45px !important;
        max-height: 45px !important;
        padding: 10px 15px !important;
    }

    /* CORREÇÃO CRÍTICA: Header mobile */
    .dashboard-sidebar .sidebar-header {
        min-height: 70px !important;
        max-height: 70px !important;
        padding: 15px 20px !important;
    }

    /* CORREÇÃO CRÍTICA: Footer mobile */
    .dashboard-sidebar .sidebar-footer {
        min-height: 70px !important;
        max-height: 70px !important;
        padding: 15px 20px !important;
    }

    /* CORREÇÃO CRÍTICA: Primeiro item nunca cortado */
    .dashboard-sidebar .sidebar-nav .nav-item:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
        scroll-margin-top: 0 !important;
        /* REMOVIDO scroll-snap-align - causava o efeito de 'mola' no scroll */
    }
}

/* CORREÇÃO CRÍTICA: Breakpoints de altura - TELAS PEQUENAS */
@media (max-height: 700px) {
    .dashboard-sidebar .sidebar-nav {
        height: calc(100vh - 130px) !important;
        /* 65px header + 65px footer */
        max-height: calc(100vh - 130px) !important;
    }

    .dashboard-sidebar .sidebar-header {
        min-height: 65px !important;
        max-height: 65px !important;
        padding: 12px 20px !important;
    }

    .dashboard-sidebar .sidebar-footer {
        min-height: 65px !important;
        max-height: 65px !important;
        padding: 12px 20px !important;
    }
}

@media (max-height: 600px) {
    .dashboard-sidebar .sidebar-nav {
        height: calc(100vh - 110px) !important;
        /* 55px header + 55px footer */
        max-height: calc(100vh - 110px) !important;
    }

    .dashboard-sidebar .sidebar-header {
        min-height: 55px !important;
        max-height: 55px !important;
        padding: 10px 20px !important;
    }

    .dashboard-sidebar .sidebar-footer {
        min-height: 55px !important;
        max-height: 55px !important;
        padding: 10px 20px !important;
    }

    .dashboard-sidebar .sidebar-nav .nav-item {
        min-height: 40px !important;
    }

    .dashboard-sidebar .sidebar-nav .nav-item a {
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        padding: 8px 15px !important;
    }
}

@media (max-height: 500px) {
    .dashboard-sidebar .sidebar-nav {
        height: calc(100vh - 90px) !important;
        /* 45px header + 45px footer */
        max-height: calc(100vh - 90px) !important;
    }

    .dashboard-sidebar .sidebar-header {
        min-height: 45px !important;
        max-height: 45px !important;
        padding: 8px 20px !important;
    }

    .dashboard-sidebar .sidebar-footer {
        min-height: 45px !important;
        max-height: 45px !important;
        padding: 8px 20px !important;
    }

    .dashboard-sidebar .sidebar-nav .nav-item {
        min-height: 35px !important;
    }

    .dashboard-sidebar .sidebar-nav .nav-item a {
        height: 35px !important;
        min-height: 35px !important;
        max-height: 35px !important;
        padding: 6px 12px !important;
        font-size: 0.85em !important;
    }
}

@media (max-height: 400px) {
    .dashboard-sidebar .sidebar-nav {
        height: calc(100vh - 70px) !important;
        /* 35px header + 35px footer */
        max-height: calc(100vh - 70px) !important;
    }

    .dashboard-sidebar .sidebar-header {
        min-height: 35px !important;
        max-height: 35px !important;
        padding: 6px 20px !important;
    }

    .dashboard-sidebar .sidebar-footer {
        min-height: 35px !important;
        max-height: 35px !important;
        padding: 6px 20px !important;
    }

    .dashboard-sidebar .sidebar-nav .nav-item {
        min-height: 30px !important;
    }

    .dashboard-sidebar .sidebar-nav .nav-item a {
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        padding: 4px 10px !important;
        font-size: 0.8em !important;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    body:not(.sidebar-collapsed) .dashboard-sidebar {
        width: 160px !important;
    }

    body:not(.sidebar-collapsed) .dashboard-main {
        margin-left: 160px !important;
        width: calc(100% - 160px) !important;
    }

    .sidebar-nav .nav-item a span {
        font-size: 0.85em !important;
    }

    .sidebar-header .logo h1 {
        font-size: 1.6rem !important;
    }

    .overview-module,
    .checkout-module,
    .inventory-module,
    .products-module,
    .store-layout-module {
        padding: 10px !important;
    }

    .module-header {
        margin-bottom: 20px !important;
    }

    .module-header h2 {
        font-size: 1.5rem !important;
    }

    .widgets-grid {
        gap: 15px !important;
    }

    .widget {
        border-radius: 8px !important;
    }

    .widget-header {
        padding: 12px 15px !important;
    }

    .widget-content {
        padding: 15px !important;
    }

    .btn-primary,
    .btn-secondary,
    .widget-action-btn,
    .module-actions .btn-primary,
    .module-actions .btn-secondary {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
        border-radius: 4px !important;
        min-height: 20px !important;
    }

    .module-actions {
        gap: 6px !important;
    }

    .btn-primary i,
    .btn-secondary i,
    .widget-action-btn i {
        font-size: 0.85rem !important;
        margin-right: 5px !important;
    }
}

@media (min-width: 769px) and (max-width: 900px) {
    body:not(.sidebar-collapsed) .dashboard-sidebar {
        width: 140px !important;
    }

    body:not(.sidebar-collapsed) .dashboard-main {
        margin-left: 140px !important;
        width: calc(100% - 140px) !important;
    }

    .sidebar-nav .nav-item a span {
        font-size: 0.8em !important;
        max-width: 100px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .sidebar-header .logo h1 {
        font-size: 1.4rem !important;
    }

    .dashboard-content {
        padding: 8px 10px !important;
    }

    .dashboard-header {
        padding: 12px 16px !important;
        min-height: 60px !important;
    }

    .header-left {
        gap: 12px !important;
    }

    .header-right {
        gap: 16px !important;
    }

    .search-bar input {
        min-width: 240px !important;
        max-width: 320px !important;
        padding: 10px 16px 10px 40px !important;
        font-size: 0.95rem !important;
        height: 44px !important;
    }

    .search-bar i {
        left: 14px !important;
        font-size: 0.95rem !important;
    }

    .header-voyger-brand {
        padding: 8px 12px !important;
    }

    .header-voyger-logo {
        height: 20px !important;
    }

    .user-profile {
        padding: 6px 8px !important;
        gap: 8px !important;
    }

    .user-profile .avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
    }

    .user-profile #user-name {
        font-size: 0.9rem !important;
    }

    .notifications {
        padding: 6px !important;
    }

    .notifications i {
        font-size: 1.2em !important;
    }

    .notification-badge {
        font-size: 0.65em !important;
        padding: 2px 5px !important;
        min-width: 16px !important;
    }

    .overview-module,
    .checkout-module,
    .inventory-module,
    .products-module,
    .store-layout-module {
        padding: 8px !important;
    }

    .btn-primary,
    .btn-secondary,
    .widget-action-btn,
    .module-actions .btn-primary,
    .module-actions .btn-secondary {
        padding: 2px 4px !important;
        font-size: 0.65rem !important;
        border-radius: 3px !important;
        min-height: 18px !important;
    }

    .module-actions {
        gap: 4px !important;
    }

    .btn-primary i,
    .btn-secondary i,
    .widget-action-btn i {
        font-size: 0.8rem !important;
        margin-right: 4px !important;
    }

    .btn-primary span,
    .btn-secondary span,
    .widget-action-btn span {
        max-width: 80px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

/* ===== UTILITIES ===== */
.desktop-only {
    display: inline-block;
}

.mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .desktop-only {
        display: none;
    }
}

/* Media query para dispositivos muito pequenos */
@media (max-width: 480px) {
    .dashboard-header {
        padding: 10px 12px !important;
        min-height: 55px !important;
    }

    .header-right {
        gap: 12px !important;
    }

    .search-bar input {
        min-width: 200px !important;
        max-width: 280px !important;
        padding: 8px 14px 8px 36px !important;
        font-size: 0.9rem !important;
        height: 40px !important;
    }

    .header-voyger-brand {
        padding: 6px 10px !important;
    }

    .header-voyger-logo {
        height: 18px !important;
    }

    .user-profile #user-name {
        display: none !important;
    }

    .user-profile .fa-chevron-down {
        display: none !important;
    }

    .notifications {
        padding: 4px !important;
    }

    .notifications i {
        font-size: 1.1em !important;
    }
}

/* Mobile: reduzir padding geral dos módulos */
@media (max-width: 600px) {
    .dashboard-main {
        padding: 12px !important;
    }

    .dashboard-content,
    .dashboard-main .dashboard-content,
    .module-content-area {
        padding: 0 !important;
        margin: 0 !important;
    }

    .module-header,
    .module-section,
    .module-card,
    .module-row {
        margin-bottom: 8px !important;
    }

    .module-content-area > [class$="-module"],
    .module-content-area > [class*="-module"] {
        padding: 8px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

/* ===== OVERRIDES FINAIS ===== */
/* Garantir que o padding global seja removido */
html body .dashboard-container section,
html body .dashboard-main section,
html body .module-content-area section,
html body #main-content-area {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Garantir que todos os botões sejam afetados pelas media queries */
@media (min-width: 769px) and (max-width: 1200px) {

    html body .dashboard-container button,
    html body .dashboard-container .btn,
    html body .dashboard-container [class*="btn"],
    html body .dashboard-container [class*="button"] {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
        min-height: 24px !important;
    }
}


/* === Sidebar: correção final de layout/scroll === */
/* Todas as configurações de scroll já foram aplicadas nas seções específicas acima */

/* === Padronização Global de Botões Primários (toda a aplicação) === */
/* Força identidade visual única (azul sólido) para .btn-primary em todos os módulos */
html body .btn-primary,
html body .btn.btn-primary,
html body .module-actions .btn-primary,
html body [class*="-module"] .btn-primary,
html body .modal .btn-primary {
    background-color: #000000 !important;
    /* Preto padrão */
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none;
    transition: all 0.2s ease;
}

html body .btn-primary:hover,
html body .btn.btn-primary:hover,
html body .module-actions .btn-primary:hover,
html body [class*="-module"] .btn-primary:hover,
html body .modal .btn-primary:hover {
    background-color: #1a1a1a !important;
    /* Hover preto escuro */
    transform: translateY(-1px);
}

html body .btn-primary:active,
html body .btn.btn-primary:active,
html body .module-actions .btn-primary:active,
html body [class*="-module"] .btn-primary:active,
html body .modal .btn-primary:active {
    background-color: #0f0f0f !important;
    /* Active preto mais escuro */
    transform: translateY(0);
}

html body .btn-primary:disabled,
html body .btn.btn-primary:disabled,
html body .module-actions .btn-primary:disabled,
html body [class*="-module"] .btn-primary:disabled,
html body .modal .btn-primary:disabled {
    background-color: #9ca3af !important;
    /* neutral disabled */
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Foco acessível consistente */
html body .btn-primary:focus-visible,
html body .btn.btn-primary:focus-visible,
html body .module-actions .btn-primary:focus-visible,
html body [class*="-module"] .btn-primary:focus-visible,
html body .modal .btn-primary:focus-visible {
    outline: 2px solid #e5e7eb !important;
    /* Cinza claro para foco */
    outline-offset: 2px !important;
}
