/* Basic Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

:root {
    --cor01: #F58220;
    --cor02: #fff;
    --cor03: #000;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--cor02);
    /* Dark background inspired by Cakto */
    color: var(--cor02);
    /* Light text color */
}

.dashboard-container {
    display: grid;
    grid-template-columns: 200px 1fr; /* Largura do Sidebar e conteúdo principal */
    grid-template-rows: auto 1fr;     /* Altura do Header e conteúdo principal */
    min-height: 100vh;
}

/* Header Styling (navbar) */
/* Seu estilo existente para .navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--cor02);
    padding: 20px;
    display: flex;
    /* justify-content: space-between; */ /* REMOVA ou COMENTE esta linha */
    justify-content: flex-start; /* ADICIONE esta linha para alinhar tudo à esquerda */
    align-items: center;
    z-index: 1000;
    box-shadow: #ffffff 0px 13px 27px -5px, #F58220 0px 8px 16px -8px;
}

/* NOVO: Estilo para a div que agrupa o ícone e a logo */
.navbar .left-section {
    display: flex;
    align-items: center; /* Alinha o ícone e a logo verticalmente */
    gap: 15px; /* Espaçamento entre o ícone e a logo */
    /* Se houver outros elementos no navbar e você quiser que eles fiquem à direita, adicione: */
    /* margin-right: auto; */
}

/* Seu estilo existente para .navbar .logo */
.navbar .logo {
    display: flex; /* Mantenha para alinhar a imagem internamente */
    align-items: center; /* Alinha a imagem verticalmente dentro do seu próprio container */
    height: 50px; /* Use 50px como no HTML, ou 60px se for a intenção final */
    color: var(--cor03);
    font-size: 20px;
    font-weight: 700;
}

/* Estilo para o ícone do menu, se não tiver um */
.navbar .menu-icon {
    display: none;
    cursor: pointer;
    font-size: 1.5em; /* Tamanho do ícone */
    color: var(--cor03); /* Cor do ícone */
}


/* menu */


/* Sidebar Styling */
/* Sidebar Styling */
.sidebar {
    margin-top:90px; /* Ajuste para descer após o header fixo de 90px de altura (padding + imagem) */
    grid-row: 2 / -1; /* Ocupa as linhas restantes após o header */
    background-color: #fcfcfc; /* Fundo do sidebar é um branco suave */
    padding: 20px 10px;
    font-weight: 700;
    border-right: 1px solid var(--cor01); /* Borda direita laranja */
}

.sidebar .main-nav ul {
    list-style: none;
}

.sidebar .main-nav li {
    margin-bottom: 10px;
}

.sidebar .main-nav a {
    display: flex;
    align-items: center;
    padding: 10px;
    padding-left: 15px;
    padding-right: 20px;
    color: var(--cor03); /* Cor do texto padrão do link é preto */
    text-decoration: none;
    transition: background-color 0.5s ease, color 0.5s ease; /* Transição para fundo e cor do texto */
    font-size: 15px;
}

.sidebar .main-nav a:hover {
    background-color: var(--cor01); /* Fundo laranja no hover */
    border-radius: 10px;
    color: var(--cor02); /* Texto branco no hover */
}

.sidebar .main-nav i {
    margin-right: 10px;
    font-size: 16px;
    color: var(--cor01); /* Cor do ícone padrão é laranja */
    padding-right: 5px;
    transition: color 0.5s ease; /* Transição suave para a cor do ícone */
}

.sidebar .main-nav a:hover i {
    color: var(--cor02); /* Ícone branco no hover */
}

.sidebar .main-nav .new-tag {
    background-color: #4CAF50;
    /* Green for new tag */
    color: var(--cor02);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: auto;
    /* Pushes to the right */
}

/* Main Content Styling */
.main-content {
    margin-top: 50px;
    grid-column: 2 / -1;
    grid-row: 2 / -1;
    padding: 20px;
    overflow-y: auto;
    /* Enable scrolling for content if it overflows */
}

.top-banner {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    /* Ensures image corners are rounded */
}

.top-banner img {
    width: 100%;
    height: auto;
    display: block;
    /* Removes extra space below image */
    border-radius: 8px;
}

.dashboard-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-header-main h2 {
    font-size: 24px;
    margin-left: 53px;
    margin-top: 50px;
    color: Black;
}


.dashboard-header-main .filters1 select {
    background-color: var(--cor01);
    color: var(--cor02);
    border: solid 2px #ffb726;
    padding: 12px 62px;
    border-radius: 5px;
    margin-left: 10px;
    margin-right: 30px;
    cursor: pointer;
    margin-top: 60px;
}


.dashboard-header-main .filters select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6c63ff;
}

.sales-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    margin-left: 50px;
    background-color: var(--cor02);
    border-left: 5.5px solid var(--cor01);
    padding: 30px;
    border-radius: 13px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    position: relative;
}

.card1 {
    margin-right: 20px;
    background-color: var(--cor02);
    border-left: 5.5px solid var(--cor01);
    padding: 30px;
    border-radius: 13px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    position: relative;
}

.card3 {

    margin-left: 50px;
    background-color: white;
    padding: 20px;
    border-radius: 13px;
    box-shadow: 0 4px 8px rgba(236, 143, 50, 0.73); /* Aqui está a sombra! */
    border: solid 2 px #ff7a06;
    position: relative;
}


.card h3 {
    font-size: 16px;
    color: var(--cor03);
    margin-bottom: 10px;
}

.card1 h3 {
    font-size: 16px;
    color: var(--cor03);
    margin-bottom: 10px;
}

.card .value {
    font-size: 28px;
    font-weight: bold;
    color: var(--cor03);
}

.card1 .value {
    font-size: 28px;
    font-weight: bold;
    color: var(--cor03);
}


.card i.fa-eye {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--cor01);
    font-size: 18px;
    cursor: pointer;
}

.card1 i.fa-eye {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--cor01);
    font-size: 18px;
    cursor: pointer;
}

/* Add this to your style.css */
.chart-section {
    margin-top: 20px;
    padding: 20px;
    margin-right: 25px;
    padding-left: 50px;
    /* Aumente este valor para mover o gráfico para a direita */
    height: 400px;
    display: flex;
    flex-direction: column;
    background-color: #fffefd;
    border-radius: 13px;
    box-shadow: 0 4px 8px #f6ae62cc;
}

.chart-section h3 {
    margin-bottom: 15px;
    color: var(--cor02);
}

#hourlySalesChart {
    flex-grow: 1;
    padding-bottom: 30px;
    /* Aumente este valor para dar espaço aos labels */
}


  

  



/* Add this to your style.css */

/* --- Mobile Specific Styles --- */


/* Regra para desktop: oculta o ícone do menu, mostra a sidebar (se tiver um display: none no global) */
/* Ensure these rules are correctly placed within your style.css
   and specifically inside the @media (max-width: 768px) block */

@media (max-width: 1600px) {

    .body {
        overflow-x: hidden;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        /* Empurra os itens para as extremidades */
        align-items: center;
        /* Centraliza verticalmente */
        width: 100%;
        /* Garante que ocupe a largura total */
        padding: 15px 20px;
        /* Ajuste o padding conforme necessário */
    }

    /* O ícone do menu no mobile */
    .menu-icon {
        display: block;
        /* Garante que o ícone esteja visível */
        font-size: 28px;
        color: var(--cor03);
        /* Ou a cor desejada */
        cursor: pointer;
        /* Define a ordem visual. '0' ou '1' para o primeiro item */
        order: 0;
        /* Coloca o menu-icon como o primeiro item */
    }

    /* A logo no mobile */
    .navbar .logo {
        
        display: flex;
        align-items: center;
        color: var(--cor03);
        font-size: 20px;
        font-weight: 700;
        /* Opcional: Adiciona um pequeno espaço entre o ícone e a logo */
    }
}

@media (max-width: 768px) {

    .body {
        overflow-x: hidden;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        /* Empurra os itens para as extremidades */
        align-items: center;
        /* Centraliza verticalmente */
        width: 100%;
        /* Garante que ocupe a largura total */
        padding: 15px 20px;
        /* Ajuste o padding conforme necessário */
    }

    /* O ícone do menu no mobile */
    .navbar .menu-icon {
        display: flex;
        cursor: pointer;
        font-size: 1.5em; /* Tamanho do ícone */
        color: var(--cor01); /* Cor do ícone */
    }
    
    /* A logo no mobile */
    .navbar .logo {
        margin-left: 50%;
        display: flex;
        align-items: center;
        color: var(--cor03);
        font-size: 20px;
        font-weight: 700;
        /* Opcional: Adiciona um pequeno espaço entre o ícone e a logo */
    }

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000; /* abaixo da sidebar (que tem 1001) */
}

#overlay.active {
    opacity: 1;
    pointer-events: auto;
}
    .dashboard-container {
        grid-template-columns: 1fr;
        /* Crucial: Make content take full width */
        /* If you have grid-template-rows here, ensure it doesn't conflict
           with the fixed header positioning. */
    }

    .header {
        position: fixed;
        /* Header should stay at the top */
        width: 100%;
        top: 0;
        left: 0;
        z-index: 1000;
        /* Ensure it's on top */
    }

    .menu-icon {
    
        display: flex;
        color: #F58220;
        /* Hamburger icon MUST be visible on mobile */
        /* Add margin-left: auto; to push it to the right within the navbar if needed */
    }

    .sidebar {
        position: fixed;
        /* ABSOLUTELY ESSENTIAL for sliding */
        top: 0;
        /* Start at the very top */
        left: -200px;
        /* HIDE IT OFF-SCREEN (assuming 200px width) */
        width: 200px;
        /* Explicit width for the sidebar */
        height: 100%;
        /* Take full viewport height */
        margin-top: 0;
        /* Remove any desktop-specific top margin */
        z-index: 1001;
        /* Ensure it's above the header and main content */
        transition: left 0.3s ease-out;
        /* Smooth slide effect */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        /* Visual depth */
        border-right: none;
        /* Remove desktop border */
        /* IMPORTANT: Do NOT set display: none; here directly.
                      The 'left' property handles visibility for the slide. */
    }

    .sidebar.active {
        /* This class is added by JavaScript */
        left: 0;
        /* Slide into view */
    }

    .main-content {
        grid-column: 1 / -1;
        /* Make main content span full width, not pushed */
        padding-top: 0px;
        /* Add space for the fixed header */
        /* Adjust other padding as desired for mobile */
        padding-left: 15px;
        padding-right: 15px;
    }



    .dashboard-header-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .dashboard-header-main h2 {
        font-size: 24px;
        margin-left: 5px;
        margin-top: 100px;
        color: Black;
    }


    .dashboard-header-main .filters1 select {
        background-color: var(--cor01);
        color: var(--cor02);
        padding: 8px 15px;
        /* Adjusted padding */
        width: 110px;
        border-radius: 5px;
        margin-right: 10px;
        margin-left: 0px;
        cursor: pointer;
        margin-top: 100px;
    }





    .dashboard-header-main .filters select:focus {
        outline: none;
        box-shadow: 0 0 0 2px #6c63ff;
    }

    .sales-overview {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 20px;
    }

    .card {
        margin-left: 0px;
        background-color: var(--cor02);
        border-left: 5.5px solid var(--cor01);
        padding: 30px;
        border-radius: 13px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        position: relative;
    }

    .card1 {
        margin-right: -1px;
        background-color: var(--cor02);
        border-left: 5.5px solid var(--cor01);
        padding: 30px;
        border-radius: 13px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        position: relative;
    }

    .card3 {

        margin-left: 0px;
        margin-right: -3px;
        background-color: white;
        padding: 20px;
        border-radius: 13px;
        box-shadow: 0 4px 8px rgba(236, 143, 50, 0.73);
        /* Aqui está a sombra! */
        border: solid 2 px #ff7a06;
        position: relative;
    }


    .card h3 {
        font-size: 16px;
        color: var(--cor03);
        margin-bottom: 10px;
    }

    .card1 h3 {
        font-size: 16px;
        color: var(--cor03);
        margin-bottom: 10px;
    }

    .card .value {
        font-size: 28px;
        font-weight: bold;
        color: var(--cor03);
    }

    .card1 .value {
        font-size: 28px;
        font-weight: bold;
        color: var(--cor03);
    }


    .card i.fa-eye {
        position: absolute;
        top: 20px;
        right: 20px;
        color: var(--cor01);
        font-size: 18px;
        cursor: pointer;
    }

    .card1 i.fa-eye {
        position: absolute;
        top: 20px;
        right: 20px;
        color: var(--cor01);
        font-size: 18px;
        cursor: pointer;
    }
}


@media (max-width: 390px) {

    .body {
        overflow-x: hidden;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        /* Empurra os itens para as extremidades */
        align-items: center;
        /* Centraliza verticalmente */
        width: 100%;
        /* Garante que ocupe a largura total */
        padding: 15px 20px;
        /* Ajuste o padding conforme necessário */
    }

    /* O ícone do menu no mobile */
    .navbar .menu-icon {
        display: flex;
        cursor: pointer;
        font-size: 1.5em; /* Tamanho do ícone */
        color: var(--cor01); /* Cor do ícone */
    }
    
    /* A logo no mobile */
    .navbar .logo {
        margin-left: 10%;
        display: flex;
        align-items: center;
        color: var(--cor03);
        font-size: 20px;
        font-weight: 700;
        /* Opcional: Adiciona um pequeno espaço entre o ícone e a logo */
    }

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000; /* abaixo da sidebar (que tem 1001) */
}

#overlay.active {
    opacity: 1;
    pointer-events: auto;
}
    .dashboard-container {
        grid-template-columns: 1fr;
        /* Crucial: Make content take full width */
        /* If you have grid-template-rows here, ensure it doesn't conflict
           with the fixed header positioning. */
    }

    .header {
        position: fixed;
        /* Header should stay at the top */
        width: 100%;
        top: 0;
        left: 0;
        z-index: 1000;
        /* Ensure it's on top */
    }

    .menu-icon {
    
        display: flex;
        color: #F58220;
        /* Hamburger icon MUST be visible on mobile */
        /* Add margin-left: auto; to push it to the right within the navbar if needed */
    }

    .sidebar {
        position: fixed;
        /* ABSOLUTELY ESSENTIAL for sliding */
        top: 0;
        /* Start at the very top */
        left: -200px;
        /* HIDE IT OFF-SCREEN (assuming 200px width) */
        width: 200px;
        /* Explicit width for the sidebar */
        height: 100%;
        /* Take full viewport height */
        margin-top: 0;
        /* Remove any desktop-specific top margin */
        z-index: 1001;
        /* Ensure it's above the header and main content */
        transition: left 0.3s ease-out;
        /* Smooth slide effect */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        /* Visual depth */
        border-right: none;
        /* Remove desktop border */
        /* IMPORTANT: Do NOT set display: none; here directly.
                      The 'left' property handles visibility for the slide. */
    }

    .sidebar.active {
        /* This class is added by JavaScript */
        left: 0;
        /* Slide into view */
    }

    .main-content {
        grid-column: 1 / -1;
        /* Make main content span full width, not pushed */
        padding-top: 0px;
        /* Add space for the fixed header */
        /* Adjust other padding as desired for mobile */
        padding-left: 15px;
        padding-right: 15px;
    }



    .dashboard-header-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .dashboard-header-main h2 {
        font-size: 24px;
        margin-left: 5px;
        margin-top: 100px;
        color: Black;
    }


    .dashboard-header-main .filters1 select {
        background-color: var(--cor01);
        color: var(--cor02);
        padding: 8px 15px;
        /* Adjusted padding */
        width: 110px;
        border-radius: 5px;
        margin-right: 10px;
        margin-left: 0px;
        cursor: pointer;
        margin-top: 100px;
    }





    .dashboard-header-main .filters select:focus {
        outline: none;
        box-shadow: 0 0 0 2px #6c63ff;
    }

    .sales-overview {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 20px;
    }

    .card {
        margin-left: 0px;
        background-color: var(--cor02);
        border-left: 5.5px solid var(--cor01);
        padding: 30px;
        border-radius: 13px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        position: relative;
    }

    .card1 {
        margin-right: -1px;
        background-color: var(--cor02);
        border-left: 5.5px solid var(--cor01);
        padding: 30px;
        border-radius: 13px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        position: relative;
    }

    .card3 {

        margin-left: 0px;
        margin-right: -3px;
        background-color: white;
        padding: 20px;
        border-radius: 13px;
        box-shadow: 0 4px 8px rgba(236, 143, 50, 0.73);
        /* Aqui está a sombra! */
        border: solid 2 px #ff7a06;
        position: relative;
    }


    .card h3 {
        font-size: 16px;
        color: var(--cor03);
        margin-bottom: 10px;
    }

    .card1 h3 {
        font-size: 16px;
        color: var(--cor03);
        margin-bottom: 10px;
    }

    .card .value {
        font-size: 28px;
        font-weight: bold;
        color: var(--cor03);
    }

    .card1 .value {
        font-size: 28px;
        font-weight: bold;
        color: var(--cor03);
    }


    .card i.fa-eye {
        position: absolute;
        top: 20px;
        right: 20px;
        color: var(--cor01);
        font-size: 18px;
        cursor: pointer;
    }

    .card1 i.fa-eye {
        position: absolute;
        top: 20px;
        right: 20px;
        color: var(--cor01);
        font-size: 18px;
        cursor: pointer;
    }
}

/* Ensure this is OUTSIDE the @media (max-width: 768px) block,
   typically at the end of your stylesheet or after the mobile media query. */