/* ============================================
   1. FONTES E IMPORTAÇÕES
   ============================================ */

/* Fonte externa (o @import precisa vir antes de qualquer outra regra) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* 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;
}

/* ============================================
   2. VARIÁVEIS GLOBAIS (KV Natal 2026)
   ============================================ */

:root {
    /* Fontes */
    --font-main: 'Roboto', sans-serif;
    --font-brand: 'NaturaAndCo', sans-serif;
    --bs-body-font-family: var(--font-main);

    /* Cores principais */
    --color-primary: #F6CF9D;          /* bege dos botões do menu */
    --color-primary-dark: #AE0025;     /* vermelho Natal */
    --color-secondary: #AE0025;
    --color-white: #ffffff;
    --color-row-light: #FEFAF5;        /* linhas ímpares da tabela */
    --color-row-dark: #FCF1E2;         /* linhas pares da tabela */
    --color-row-border: #F6CF9D;       /* separador das linhas */
    --color-bg-footer: rgba(240, 195, 68, 0.25);
    --color-bg-fallback: #810016;

    /* Imagens da campanha */
    --img-bg-natal: url('https://images.rede.natura.net/html/crm/campanha/20260918/bg-natal-cb2026_desk_20260918.jpg');

    /* Bordas */
    --border-radius-sm: 5px;
    --border-radius-md: 10px;
    --border-radius-lg: 20px;
    --border-radius-pill: 50px;
}

/* ============================================
   3. ESTILOS GLOBAIS
   ============================================ */

body {
    font-family: var(--bs-body-font-family);
    font-weight: 400;
}

/* ============================================
   4. UTILITÁRIOS PERSONALIZADOS
   ============================================ */

.btn-custom {
    background-color: var(--color-primary-dark) !important;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--color-white) !important;
}

.btn-custom:hover {
    opacity: 0.9;
}

/* ============================================
   5. LOGIN
   ============================================ */

.bg-login {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--color-bg-fallback);
    background-image: var(--img-bg-natal);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 574px;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header "MeuNegócio" */
.login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 21px;
    margin-bottom: 60px;
}

.login-header__icone {
    width: 95px;
    height: auto;
}

.login-header__titulo {
    margin: 0;
    font-family: var(--font-brand);
    font-size: 68px;
    font-weight: 100;
    line-height: 1.2;
    color: var(--color-white);
    white-space: nowrap;
}

.login-header__titulo b {
    font-weight: 700;
}

/* Card */
.login-card {
    width: 100%;
    background: var(--color-white);
    border: 1px solid #4F6422;
    border-radius: var(--border-radius-lg);
    padding: 26px 40px 46px;
    text-align: center;
}

.login-card__logo {
    width: 216px;
    height: auto;
    margin-bottom: 20px;
}

.form_login__campo {
    margin-bottom: 20px;
}

.form_login .txt_form--login {
    display: block;
    margin-bottom: 11px;
    font-size: 16px;
    color: var(--color-secondary);
}

.form_login .form-control {
    height: 40px;
    text-align: center;
    border: 1px solid var(--color-secondary);
    border-radius: var(--border-radius-sm);
}

.form_login .btn-custom {
    width: 154px;
    height: 40px;
    margin-top: 0;
    font-size: 16px;
    font-weight: 400;
}

/* Decoração */
.login-bolas {
    position: absolute;
    top: 0;
    left: calc(75% + 18px);
    width: 13.2vw;
    max-width: 253px;
    height: auto;
    pointer-events: none;
}

.login-logo-natal {
    position: absolute;
    top: calc(50% + 6px);
    left: 9.4%;
    transform: translateY(-50%);
    width: 17.4vw;
    max-width: 334px;
    height: auto;
    pointer-events: none;
}

/* ============================================
   6. DASHBOARD
   ============================================ */

/* Fundo */
.bg-dashboard {
    background-color: var(--color-bg-fallback);
    background-image: var(--img-bg-natal);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    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;
    padding-bottom: 25px;
}

/* ============================================
   7. HEADER E NAVEGAÇÃO
   ============================================ */

.c-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 51px 20px 40px !important;
    flex-wrap: wrap;
}

.c-dashboard__logo img {
    width: 216px;
    height: auto;
    margin-right: 40px;
}

/* Navegação */
.c-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.c-nav__list {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.c-nav__link,
.c-nav__posicao {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 20px;
    border-radius: var(--border-radius-pill);
    font-size: 14px;
    line-height: 30px;
    white-space: nowrap;
    text-decoration: none;
    transition: 0.3s;
}

.c-nav__link {
    color: var(--color-primary-dark);
    background-color: var(--color-primary);
}

.c-nav__link:hover {
    opacity: 0.8;
    color: var(--color-primary-dark);
}

/* Item ativo e etiqueta da página no mobile */
.c-nav__link--active,
.c-nav__posicao {
    color: var(--color-white);
    background-color: var(--color-primary-dark);
    box-shadow: 1px 1px 4px 0 rgba(79, 100, 34, 0.25);
}

.c-nav__link--active:hover {
    color: var(--color-white);
}

.c-nav__btn-exit {
    height: 30px;
    padding: 0 20px;
    border: 1px solid var(--color-primary-dark);
    background: transparent;
    color: var(--color-primary-dark);
    border-radius: var(--border-radius-pill);
    font-size: 14px;
}

/* Botão voltar mobile */
.seta-voltar-mb img {
    width: 30px;
}

/* ============================================
   8. TÍTULOS E FILTROS
   ============================================ */

.c-dashboard__title {
    font-family: var(--font-main);
    color: var(--color-secondary);
    font-size: 36px;
    font-weight: 700;
    line-height: normal;
}

.c-filters {
    gap: 20px 40px !important;
    margin-top: 40px !important;
}

.c-filters label {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-right: 10px;
}

.c-filters__select {
    display: inline-block;
    width: 181px;
    height: 24px;
    padding: 0 30px 0 10px;
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
    font-size: 12px;
    background-position: right 12px center;
}

.c-dashboard__btn-download {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    height: 30px;
    padding: 2px 20px;
    border: none;
    border-radius: var(--border-radius-pill);
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    font-size: 16px;
    margin-top: 40px !important;
}

.c-dashboard__btn-download svg {
    margin-left: 0;
}

/* ============================================
   9. TABELA PRINCIPAL
   ============================================ */

.table-responsive.c-table-scroll {
    padding: 0 51px !important;
}

.c-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 13px;
    vertical-align: middle;
    margin-bottom: 0;
}

/* Cabeçalho */
.c-table thead th {
    height: 40px;
    padding: 0 10px;
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    vertical-align: middle;
    border: none;
}

.c-table thead tr th:first-child {
    border-top-left-radius: var(--border-radius-lg);
    padding-left: 20px;
}

.c-table thead tr th:last-child {
    border-top-right-radius: var(--border-radius-lg);
}

/* Corpo */
.c-table tr td {
    height: 40px;
    padding: 0 10px;
    text-align: left;
    color: var(--color-secondary);
    border-bottom: 1px solid var(--color-row-border);
}

.c-table tr td:first-child {
    padding-left: 20px;
}

.c-table tbody tr:nth-child(odd) td {
    --bs-table-bg: var(--color-row-light);
    background-color: var(--color-row-light);
    color: var(--color-secondary);
}

.c-table tbody tr:nth-child(even) td {
    --bs-table-bg: var(--color-row-dark);
    background-color: var(--color-row-dark);
    color: var(--color-secondary);
}

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

.c-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius-lg);
}

.c-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius-lg);
}

.c-table td:nth-child(2) {
    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: 0.5px solid var(--color-secondary) !important;
    height: 20px;
}

/* ============================================
   10. FOOTER DO DASHBOARD
   ============================================ */

.c-dashboard__timestamp {
    display: inline-flex !important;
    gap: 5px;
    height: 30px;
    padding: 0 10px;
    background-color: var(--color-bg-footer);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: #000;
}

.c-dashboard__timestamp img {
    width: 19px;
    margin: 0;
}

/* ============================================
   11. MENU MOBILE (HAMBÚRGUER)
   ============================================ */

.c-mobile-trigger {
    padding: 0;
    border: none;
    background: transparent;
}

.c-mobile-trigger__icon {
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--color-primary-dark);
    position: relative;
    border-radius: 2px;
}

.c-mobile-trigger__icon::before,
.c-mobile-trigger__icon::after {
    content: "";
    width: 30px;
    height: 2px;
    background-color: var(--color-primary-dark);
    position: absolute;
    left: 0;
    border-radius: 2px;
}

.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 0;
}

.offcanvas-header .fechar-menu-mob {
    width: 30px;
    height: auto;
}

.c-mobile-menu {
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.c-mobile-menu__item {
    background-color: var(--color-row-light);
    border-bottom: 1px solid var(--color-row-border);
    transition: 0.3s;
}

.c-mobile-menu__item:nth-child(even) {
    background-color: var(--color-row-dark);
}

.c-mobile-menu__item:last-child {
    border-bottom: none;
}

.c-mobile-menu__item a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--color-primary-dark);
    font-size: 16px;
    text-align: center;
}

.c-mobile-menu__item:hover {
    background-color: var(--color-primary);
}

.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: 152px;
    max-width: 100%;
    height: 20px;
    min-height: 20px;
    padding: 0 6px;
    font-size: 12px;
    border: 0.5px solid var(--color-secondary);
    border-radius: 4px;
}

input.form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    border-radius: 4px;
    border: 0.5px solid var(--color-secondary);
    background-color: var(--color-white);
}

input.form-check-input:checked {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* ============================================
   13. MEDIA QUERIES
   ============================================ */

/* Tablet e mobile: fundo branco, sem card (como no Figma mobile) */
@media (max-width: 991.98px) {
    .bg-dashboard {
        background: var(--color-white);
    }

    .bg-dashboard > .container-fluid {
        padding: 0 !important;
    }

    .c-dashboard {
        border-radius: 0;
        box-shadow: none !important;
        min-height: 100vh;
    }

    .c-dashboard__header {
        padding: 30px !important;
    }

    .c-dashboard__logo img {
        width: 65px;
        margin: 0;
    }
}

/* Tabela vira cards */
@media (max-width: 1024px) {

    .c-table,
    .c-filters__select,
    input.form-control.form-control-sm.border-navy {
        font-size: 14px !important;
    }

    .table-responsive.c-table-scroll {
        padding: 0 30px !important;
    }

    .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: 10px !important;
        border-radius: var(--border-radius-md) !important;
        overflow: hidden !important;
    }

    .c-table td,
    .c-table tr td:first-child {
        height: auto;
        min-height: 30px;
        padding: 5px 10px !important;
        border-radius: 0 !important;
        border-bottom: 1px solid var(--color-row-border) !important;
    }

    /* Nome no topo do card */
    .c-table tr td[data-label="NOME"] {
        order: -1 !important;
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        background-color: var(--color-primary-dark) !important;
        color: var(--color-white) !important;
        font-weight: 400 !important;
        font-size: 14px !important;
        border-bottom: none !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;
        color: var(--color-secondary) !important;
        text-align: right;
    }

    .c-table td:nth-child(odd) {
        background-color: var(--color-row-light) !important;
    }

    .c-table td:nth-child(even) {
        background-color: var(--color-row-dark) !important;
    }

    .c-table td:last-child {
        border-bottom: none !important;
    }

    .c-table td:not([data-label="NOME"])::before {
        content: attr(data-label);
        color: var(--color-secondary) !important;
        text-align: left !important;
        font-size: 14px !important;
        flex: 1;
    }

    .c-table input.form-control {
        width: 152px !important;
    }

    .c-table a,
    .c-table .email-send {
        margin: 0 3px;
    }

    .c-table-scroll {
        max-height: none;
        overflow-y: visible;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* ---------- Login ---------- */
    .bg-login {
        align-items: flex-start;
    }

    .login-wrapper {
        max-width: 270px;
        padding: 60px 0 140px;
    }

    .login-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 48px;
    }

    .login-header__icone {
        width: 71px;
    }

    .login-header__titulo {
        font-size: 25px;
    }

    .login-card {
        border: none;
        border-radius: var(--border-radius-md);
        padding: 22px 35px 40px;
    }

    .login-card__logo {
        width: 122px;
        margin-bottom: 4px;
    }

    .form_login__campo {
        margin-bottom: 10px;
        text-align: left;
    }

    .form_login .txt_form--login {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .form_login .form-control {
        height: 30px;
    }

    .form_login .btn-custom {
        height: 30px;
        margin-top: 10px;
        padding: 0;
    }

    .login-bolas {
        left: auto;
        right: 12px;
        width: 80px;
    }

    .login-logo-natal {
        top: auto;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
        width: 101px;
    }

    /* ---------- Dashboard ---------- */
    .c-dashboard__title {
        font-size: 1.2rem;
    }
}

/* Celulares pequenos */
@media (max-width: 480px) {
    .c-dashboard__title {
        text-align: center;
        margin-bottom: 1rem;
    }

    .c-filters label {
        font-size: 14px;
    }
}

/* Desktop com scroll na tabela */
@media (min-width: 1025px) {
    .c-table-scroll {
        max-height: 550px;
        overflow-y: auto;
        overflow-x: auto;
        position: relative;
    }

    .c-table thead th {
        position: sticky !important;
        top: 0 !important;
        z-index: 100;
    }
}
