:root {
    --primary-color: #0d2137;
    --accent-color: #21a453;
    --text-color: #333;
    --bg-light: #f9f9f9;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--accent-color);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background-color: var(--primary-color);
    padding: 15px 0;
    color: var(--white);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: #d4af37;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
}

.btn-text {
    background: var(--accent-color);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    margin-right: 20px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 20px;
}

.brand-cta {
    color: #b8974d;
}

.btn-cta {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 18px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(33, 164, 83, 0.3)
}

.features {
    padding: 60px 0;
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero-image img {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 0 auto;
}


/* ==========================================
   ESTILIZAÇÃO DA PÁGINA DE LOGIN 
========================================== */

.login-page {
    background-color: var(--primary-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background-color: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-logo {
    font-weight: 2rem;
    color: #b8974d;
    margin-bottom: 20px;
}

.login-box h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-box p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--accent-color);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 30px;
}

.login-options a {
    color: var(--accent-color);
    text-decoration: none;
}

.btn-login {
    width: 100%;
    background: var(--accent-color);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #1a8a44;
}

.signup-link {
    margin-top: 25px;
    font-size: 0.85rem !important;
}

.signup-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}


/* ==========================================
   ESTILIZAÇÃO DA PÁGINA DE CADASTRO 
========================================== */

.signup-container {
    max-width: 530px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}


/* ==========================================
   MODAIS DE EDIÇÃO E VISUALIZAÇÃO (POP-UP)
========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 450px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}


/* ==========================================
   NOTIFICAÇÕES (TOAST)
========================================== */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--white, #ffffff);
    color: #333;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid transparent;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}


/* ==========================================
   ESTILOS ONBOARDING
========================================== */

.selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.select-card {
    border: 2px solid #eee;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-card:hover {
    border-color: var(--accent-color);
    background-color: rgba(33, 164, 83, 0.05);
}

.select-card.active {
    border-color: var(--accent-color);
    background-color: rgba(33, 164, 83, 0.1);
    transform: scale(1.05);
}

.icon-circle {
    font-size: 2rem;
    margin-bottom: 10px;
}

.select-card h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.select-card span {
    font-size: 0.8rem;
    color: #666;
}

.logout {
    color: #ff6b6b !important;
}

.logout:hover {
    background-color: rgba(255, 107, 107, 0.1) !important;
    border-left: 4px solid #ff6b6b !important;
    color: #ff4757 !important;
}


/* ==========================================
   ÁREA DE UPLOAD DE LOGO
========================================== */

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
}

.upload-area:hover {
    border-color: var(--accent-color);
    background-color: rgba(33, 164, 83, 0.05);
}


/* ==========================================
   ESTILO DOS FILTROS RÁPIDOS (CHIPS)
========================================== */

.btn-chip {
    background-color: #e0e7ff;
    color: #4f46e5;
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-chip:hover {
    background-color: #c7d2fe;
    transform: scale(1.05);
}

.chip-limpar {
    background-color: #f3f4f6;
    color: #ef4444;
}

.chip-limpar:hover {
    background-color: #fee2e2;
}


/* ==========================================
   📱 MODO CELULAR (RESPONSIVIDADE GERAL)
========================================== */

@media (max-width: 768px) {
    /* 1. Arrumando a Barra Lateral */
    .sidebar {
        position: fixed;
        left: -260px !important;
        top: 0;
        height: 100vh;
        width: 260px !important;
        /* Trava de segurança contra esmagamento */
        z-index: 9999 !important;
        transition: left 0.3s ease;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
        background-color: #0f172a !important;
    }
    .sidebar.active {
        left: 0 !important;
    }
    /* 2. O Botão Sanduíche */
    #btnMenuMobile {
        display: block !important;
        margin-right: 15px;
        position: relative;
        z-index: 10 !important;
        /* Coloca o botão por cima de TUDO no universo */
        pointer-events: auto !important;
        /* Obriga o navegador a aceitar o clique nele */
    }
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    /* 3. Barra de Filtros: Caixas cheias, Botões normais */
    .filter-bar {
        flex-direction: column;
        align-items: stretch !important;
    }
    .filter-bar input,
    .filter-bar select {
        width: 100% !important;
        margin-bottom: 8px;
    }
    /* Protege os botões chips de ficarem gigantes */
    .btn-chip {
        width: auto !important;
        flex-grow: 1;
        text-align: center;
        justify-content: center;
    }
    /* 4. Salvando as Tabelas Esmagadas (Rolagem Lateral) */
    .card {
        padding: 20px 15px !important;
        width: 100% !important;
        overflow-x: auto !important;
        /* 🚨 Trocamos 'hidden' por 'auto'. Isso devolve o scroll! */
        -webkit-overflow-scrolling: touch !important;
        /* Deixa o arrasto suave igual app nativo */
    }
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        display: block !important;
        margin-top: 15px !important;
        padding-bottom: 15px !important;
    }
    .data-table {
        min-width: 800px !important;
        /* Mantém a tabela esticada para não esmagar as letras */
    }
    /* PROÍBE os textos da tabela de quebrarem linha */
    .data-table th,
    .data-table td {
        white-space: nowrap !important;
    }
    /* 5. Ajustes de Modais (Pop-ups) e Grids do Cadastro */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px 15px;
    }
    .input-grid {
        grid-template-columns: 1fr !important;
        gap: 0;
    }
    /* 6. Ajustes do Cabeçalho (Evita o Esmagamento Superior) */
    .top-header {
        padding: 15px !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
        /* 🚨 Permite a quebra de linha no celular */
    }
    .top-header>div:first-child {
        order: 1 !important;
        gap: 12px !important;
    }
    .user-profile-link {
        order: 2 !important;
        /* Mantém a foto na linha de cima */
        margin-left: auto !important;
        /* Empurra a foto toda para a direita */
    }
    /* Faz o Botão Verde cair para a 2ª linha e ficar gigantão */
    .top-header .btn-primary,
    .top-header .btn-text {
        order: 3 !important;
        min-width: 100% !important;
        text-align: center !important;
        margin-top: 5px !important;
        margin-right: 0 !important;
        padding: 12px !important;
        font-size: 0.9rem !important;
    }
    .breadcrumb strong {
        font-size: 1.1rem !important;
        white-space: nowrap !important;
        /* Proíbe o título de quebrar */
    }
    .top-header #nomeUsuario {
        display: none !important;
        /* Deixa apenas a foto, ganhando espaço */
    }
}