/* ============================================
   1. FONTES E IMPORTAÇÕES
   ============================================ */

/* Fontes locais */
@font-face {
    font-family: 'NaturaAndCo';
    src: url('https://images.rede.natura.net/html/HTML-LIGA-DAS-ATIVAS-20260401/fonts/NaturaAndCo-Medium.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'NaturaAndCo';
    src: url('https://images.rede.natura.net/html/HTML-LIGA-DAS-ATIVAS-20260401/fonts/NaturaAndCo-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'NaturaAndCo';
    src: url('https://images.rede.natura.net/html/HTML-LIGA-DAS-ATIVAS-20260401/fonts/NaturaAndCo-Light.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
}



/* Fonte externa */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* ============================================
   2. VARIÁVEIS GLOBAIS
   ============================================ */

:root {
    /* Fontes */
    --font-main: 'Roboto', sans-serif;
    --font-brand: 'NaturaAndCo', sans-serif;
    --bs-body-font-family: var(--font-main);
    
    /* Cores principais */
    --color-primary: #D3D8C7;
    --color-primary-dark: #4F6422;
    --color-secondary: #4F6422;
    --color-accent: #F0C344;
    --color-bg-light: #F6F7F4;
    --color-bg-dark: #D3D8C7;
    --color-bg-table: #E8EEF5;
    --color-bg-table-alt: #DDE5ED;
    --color-white: #ffffff;
    --color-bg-nav-active:#F0C344;
    --color-bg-footer:#FBF0D0;

    
    /* Bordas */
    --border-radius-sm: 5px;
    --border-radius-md: 8px;
    --border-radius-lg: 20px;
    --border-radius-xl: 2rem;
}

/* ============================================
   3. ESTILOS GLOBAIS
   ============================================ */

body {
    font-family: var(--bs-body-font-family);
    font-weight: 400;

}



/* ============================================
   4. UTILITÁRIOS PERSONALIZADOS
   ============================================ */

.rounded-5 {
    border-radius: var(--border-radius-xl) !important;
}

.custom-border{
    border-radius: 20px;
    border: 1px solid #4F6422;
    background: #FFF;
}

.btn-custom {
    background-color: var(--color-primary-dark) !important;
    border: none;
    border-radius: var(--border-radius-md);
    color: var(--color-white)!important;
}

.btn-custom:hover {
    opacity: 0.9;
}

/* ============================================
   5. COMPONENTES DE LOGIN
   ============================================ */

.bg-login {
    background-image: url('https://images.rede.natura.net/html/HTML-LIGA-DAS-ATIVAS-20260401/liga-das-ativas-img/bg-liga-das-ativas-login.png'), url('https://images.rede.natura.net/html/HTML-LIGA-DAS-ATIVAS-20260401/liga-das-ativas-img/bandeira-liga-das-ativas-desk.png');
    background-size: 35%, 30%;
    background-position: 105% 100%, left bottom;
    background-repeat: no-repeat;
}

.login-header h1 {
    font-family: var(--font-brand) !important;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-left: 15px;
    color: var(--color-primary-dark);
}

.form_login .txt_form--login {
    color: var(--color-secondary);
}

/* Inputs */
input#codigo,
input#email,
.form-control {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-secondary);
}

/* ============================================
   6. COMPONENTES DO DASHBOARD
   ============================================ */

/* Fundo */
.bg-dashboard {
    background-color: #F0C344;
    min-height: 100vh;
}


/* Card principal */
.c-dashboard {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    min-height: 80vh;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

/* ============================================
   7. HEADER E NAVEGAÇÃO
   ============================================ */

.c-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    flex-wrap: wrap;
}

.c-dashboard__logo img {
    width: 110px;
    margin-right: 20px;
}

/* Navegação */
.c-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
    justify-content: space-around;
}

.c-nav__list {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.c-nav__link,
.c-nav__posicao {
    text-decoration: none;
    color: var(--color-primary-dark);
    background-color: var(--color-primary);
    padding: 6px 15px;
    border-radius: var(--border-radius-lg);
    font-size: 0.75rem;
    white-space: nowrap;
    transition: 0.3s;
}

.c-nav__link--active{
    background: var(--color-bg-nav-active);
}

.c-nav__link:hover {
    opacity: 0.8;
}

.c-nav__posicao {
    text-decoration: none;
    color: var(--color-accent);
    background-color: var(--color-primary-dark);
    padding: 6px 15px;
    border-radius: var(--border-radius-lg);
    font-size: 0.75rem;
    white-space: nowrap;
    transition: 0.3s;
    box-shadow: 1px 1px 4px 0 rgba(79, 100, 34, 0.50);

}

.c-nav__btn-exit {
    border: 1px solid var(--color-primary-dark);
    background: transparent;
    color: var(--color-primary-dark);
    padding: 5px 20px;
    border-radius: var(--border-radius-lg);
    font-size: 0.7rem;
}

/* Botão voltar mobile */
.seta-voltar-mb img {
    width: 35px;
}

/* ============================================
   8. TÍTULOS E FILTROS
   ============================================ */

.c-dashboard__title {
    font-family: var(--font-main);
    color: var(--color-secondary);
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.c-filters label {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-primary-dark);
    margin-right: 5px;
}

.c-filters__select {
    display: inline-block;
    width: auto;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-primary-dark);
    font-size: 0.6rem;
}

.c-dashboard__btn-download {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    border: none;
    padding: 6px 20px;
    border-radius: var(--border-radius-lg);
    font-size: 0.75rem;
}

.c-dashboard__btn-download svg{
    margin-left: 5px;
}
/* ============================================
   9. TABELA PRINCIPAL
   ============================================ */

.c-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.62rem;
    vertical-align: middle;
}

/* Cabeçalho */
.table.c-table thead {
    background: var(--color-accent);
}

.c-table thead th {
    color: var(--color-primary-dark);
    text-align: center;
    padding: 10px 5px;
    border: none;
}

/* Bordas arredondadas no topo */
.c-table thead tr th:first-child {
    border-radius: 10px 0 0 0;
}

.c-table thead tr th:last-child {
    border-radius: 0 10px 0 0;
}

table tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}

/* Corpo da tabela */
.c-table tbody tr {
    background-color: var(--color-bg-table);
}

.c-table tbody tr:nth-child(even) {
    background-color: var(--color-bg-table-alt);
}

.c-table tr td {
    padding: 6px 5px;
    text-align: center;
    border-bottom: 1px solid var(--color-primary-dark);
}

.c-table tr:last-child td {
    border-bottom: none;
}

.c-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.c-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.c-table td:nth-child(2) {
    text-align: left;
    color: var(--color-primary-dark) !important;
    font-weight: 400;
}

.c-table a,
.c-table .email-send {
    color: var(--color-secondary);
    text-decoration: none;
    cursor: pointer;
}

.c-table__input {
    border: 1px solid var(--color-primary) !important;
    height: 25px;
}

/* Linhas alternadas */
.c-table tbody tr:nth-child(odd) td {
    --bs-table-bg: var(--color-bg-light);
    background-color: var(--bs-table-bg);
    color: var(--color-secondary);
}

.c-table tbody tr:nth-child(even) td {
    --bs-table-bg: var(--color-bg-dark);
    background-color: var(--bs-table-bg);
    color: var(--color-secondary);
}

/* ============================================
   10. FOOTER DO DASHBOARD
   ============================================ */

.c-dashboard__timestamp {
    background-color: var(--color-bg-footer);
    padding: 5px 15px;
    border-radius: var(--border-radius-sm);
    font-size: 0.7rem;
    color: var(--color-primary-dark);
}

.c-dashboard__timestamp img{
    width: 20px;
    margin: 0px 5px 0px 0px;
}

/* ============================================
   11. MENU MOBILE (HAMBÚRGUER)
   ============================================ */

.c-mobile-trigger {
    padding: 0;
    border: none;
    background: transparent;
}

.c-mobile-trigger__icon {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--color-primary-dark);
    position: relative;
    border-radius: 3px;
}

.c-mobile-trigger__icon::before,
.c-mobile-trigger__icon::after {
    content: "";
    width: 30px;
    height: 3px;
    background-color: var(--color-primary-dark);
    position: absolute;
    left: 0;
    border-radius: 3px;
}

.c-mobile-trigger__icon::before {
    top: -8px;
}

.c-mobile-trigger__icon::after {
    top: 8px;
    width: 20px;
}

/* Offcanvas */
.c-offcanvas {
    width: 300px !important;
    border-left: none !important;
}

.offcanvas-header{
        margin: 0 20px 0 0px;
}

.offcanvas-header .fechar-menu-mob{
    width: 30px;
    height: auto;
}

.c-mobile-menu {
    border: 1px solid var(--color-bg-table-alt);
}

.c-mobile-menu {
    border: 1px solid var(--color-bg-table-alt);
}

.c-mobile-menu__item {
    background-color: var(--color-bg-light);
    border-bottom: 1px solid var(--color-primary-dark);
    transition: 0.3s;
}

.c-mobile-menu__item:last-child {
    border-bottom: none;
}

.c-mobile-menu__item a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: var(--color-primary-dark);
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
}

.c-mobile-menu__item:hover {
    background-color: var(--color-bg-dark);
}

.btn-close {
    font-size: 1.2rem;
    opacity: 1;
    color: var(--color-primary);
}

/* ============================================
   12. FORMULÁRIOS E INPUTS ESPECÍFICOS
   ============================================ */

input.form-control.form-control-sm.border-navy {
    width: 70%;
    margin: 0 auto;
    font-size: 0.6rem;
    border: 0.5px solid var(--color-secondary);
}

input.form-check-input {
    width: 2em;
    height: 2em;
    border-radius: 4px;
    border: 0.5px solid var(--color-secondary);
    background: var(--color-white);
}

/* ============================================
   13. BACKGROUNDS ESPECÍFICOS
   ============================================ */

.bg-carrinho-abandonado {
    background:#4F6422;
}

.bg-aniversariantes {
    background-image: url('../lider-img/background-aniversariantes.png');
    background-size: cover;
    background-position: center;
}


.bandeira-mb{
    display: none;
}
/* ============================================
   14. MEDIA QUERIES
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {

    html {
        font-size: 90%; 
    }

    /* Melhore a legibilidade das fontes que estavam muito pequenas */
    .c-table, 
    .c-filters__select,
    input.form-control.form-control-sm.border-navy {
        font-size: 0.8rem !important; 
    }


    .login-header {
        flex-direction: column;
    }
    
    .login-header img {
        margin-bottom: 1rem;
    }
    
    .login-header h1 {
        margin: 0;
        font-size: 1.25rem;
        text-align: center;
    }
    
    /* Tabela responsiva */
    .c-table thead {
        display: none;
    }
    
    .c-table,
    .c-table tbody,
    .c-table tr,
    .c-table td {
        display: block;
        width: 100%;
       
    }
    
    .c-table tr {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 25px !important;
        /* border: 1px solid var(--color-bg-dark) !important; */
        border-radius: 15px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);

         
    }
    
    .c-table td[data-label="NOME"] {
        order: -1 !important;
        background-color: var(--color-bg-nav-active) !important;
        color: var(--color-primary-dark) !important;
        justify-content: left !important;
        font-weight: bold !important;
        font-size: 1.1rem !important;
        padding: 15px !important;
        display: flex !important;
    }
    
    .c-table td[data-label="NOME"]::before {
        display: none !important;
    }
    
    .c-table td:not([data-label="NOME"]) {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 12px 15px !important;
        color: var(--color-secondary) !important;
    }
    
    .c-table td:nth-child(even) {
        background-color: var(--color-bg-light) !important;
    }
    
    .c-table td:last-child{
        border-bottom:none ;
    }
    .c-table td:nth-child(odd) {
        background-color: var(--color-bg-dark) !important;
    }
    
    .c-table td:first-child {
        background-color: var(--color-bg-light) !important;
    }
    
    .c-table td[data-label="NOME"] {
        background-color: var(--color-bg-nav-active) !important;
        color: var(--color-white) !important;
    }
    
    .c-table td:not([data-label="NOME"])::before {
        content: attr(data-label);
        color: var(--color-secondary) !important;
        text-align: left !important;
        font-size: 0.8rem !important;
        flex: 1;
    }
    
    .c-table input.form-control {
        width: 60% !important;
    }
    
    .c-table input.form-check-input {
        margin: 0 !important;
    }
    
    .c-table a,
    .c-table .email-send {
        margin: 0px 5px;
    }
    
    .c-table {
        font-size: 0.85rem;
        vertical-align: middle;
    }

    

 .c-table-scroll {
    max-height: 400px; /* Ajuste para a altura que você desejar */
    overflow-y: auto;  /* Cria a barra de rolagem se o conteúdo exceder a altura */
}

/* Opcional: Para deixar o cabeçalho fixo enquanto você rola a lista */
.c-table-scroll thead th {
    position: sticky;
    top: 0;
    background-color: #fff; /* Ou a cor de fundo da sua tabela */
    z-index: 1;
    box-shadow: inset 0 -1px 0 #dee2e6; /* Linha separadora discreta */
}


}

/* Mobile */
@media (max-width: 768px) {
    .bg-login {
        background-image: url('https://images.rede.natura.net/html/HTML-LIGA-DAS-ATIVAS-20260401/liga-das-ativas-img/bg-liga-das-ativas-topo-mb.png');
        background-size: contain;
        background-position: top;
        background-repeat: no-repeat;
    }

    .bandeira-mb{
        display: block;
        top: 96%;
    }

     .bandeira-mb img{
        width: 70%;
     }

   
}

/* ============================================
   15. AJUSTES PARA CELULARES PEQUENOS (ATÉ 480px)
   ============================================ */

@media (max-width: 480px) {
    /* 1. Ajuste Global de Escala */
    html {
        font-size: 95%; /* Reduz levemente a escala base para ganhar espaço */
    }

    /* 2. Títulos e Header */
    .c-dashboard__title {
        font-size: 1.2rem; /* Título menor para não quebrar em 4 linhas */
        text-align: center;
        margin-bottom: 1rem;
    }

 

}

/* Desktop com scroll na tabela */
@media (min-width: 769px) {
    .c-table-scroll {
        max-height: 550px;
        overflow-y: auto;
        overflow-x: auto;
        position: relative;
    }
    
    .c-table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
        width: 100% !important;
    }
    
    .c-table thead th {
        position: sticky !important;
        top: 0 !important;
        z-index: 100;
        background-color: var(--color-accent) !important;
        border: none !important;
    }
}