/* ==========================================================================
   FUNDAÇÃO: Variáveis Globais (Padrão Rústico/Pub)
   ========================================================================== */
:root {
    /* Paleta de Cores Padrão (Sebo Bar) */
    --cor-fundo1: #2B1E16; /* Marrom Escuro Rústico */
    --cor-fundo2: #F4EBD9; /* Creme/Papiro para áreas de conteúdo */
    --cor-fundo3: #E8D8C4; /* Variação de fundo secundário */
    
    --cor-fonte1: #332722; /* Texto principal (escuro para leitura no fundo claro) */
    --cor-fonte2: #6B5B54; /* Texto secundário */
    --cor-fonte3: #F4EBD9; /* Texto claro (para fundos escuros) */
    
    --cor-botao1: #B05B3B; /* Terracota/Tijolo (Primário) */
    --cor-botao2: #5C6E58; /* Verde Musgo Escuro (Secundário) */
    --cor-botao3: #8B2626; /* Vermelho Vinho (Erro/Alerta) */
    
    --cor-borda1: #C2A88D;
    --cor-borda2: #8C7561;

    /* Configurações Estruturais e Tipografia */
    --font-family-base: 'Merriweather', 'Georgia', serif; /* Estilo clássico/rústico */
    --font-family-ui: 'Inter', 'Segoe UI', sans-serif; /* Para legibilidade em inputs/dashboards */
    --border-radius: 6px;
    --transicao-padrao: all 0.3s ease-in-out;
}

/* ==========================================================================
   RESET E BASE
   ========================================================================== */
body {
    background-color: var(--cor-fundo2);
    color: var(--cor-fonte1);
    font-family: var(--font-family-ui);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-base);
    color: var(--cor-fonte1);
}

/* ==========================================================================
   COMPONENTES ESTRUTURAIS: Inputs e Formulários
   ========================================================================== */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--cor-fonte1);
    background-color: #FFFFFF;
    border: 2px solid var(--cor-borda1);
    border-radius: var(--border-radius);
    transition: var(--transicao-padrao);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--cor-botao1);
    box-shadow: 0 0 5px rgba(176, 91, 59, 0.4);
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    margin-bottom: 1.2rem; 
}

.form-group label {
    font-family: var(--font-family-ui); font-weight: 600;
    color: var(--cor-fonte1); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px;
}

/* ==========================================================================
   COMPONENTES ESTRUTURAIS: Botões
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transicao-padrao);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--cor-botao1);
    color: var(--cor-fonte3);
}

.btn-primary:hover {
    background-color: #8C472E;
}

.btn-secondary {
    background-color: var(--cor-botao2);
    color: var(--cor-fonte3);
}

.btn-secondary:hover { 
    background-color: #D1D1D1; 
}

.btn-logout {
    background-color: transparent; border: 1px solid var(--cor-borda2);
    color: var(--cor-fonte3); padding: 6px 12px; border-radius: 4px;
    text-decoration: none; transition: var(--transicao-padrao);
}
.btn-logout:hover { 
    background-color: var(--cor-botao1); 
    border-color: var(--cor-botao1); 
}

.btn-danger {
    background-color: var(--cor-botao3);
    color: var(--cor-fonte3);
}

/* ==========================================================================
   COMPONENTES ESTRUTURAIS: Modais
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(43, 30, 22, 0.7); /* Fundo escurecido rústico */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transicao-padrao);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--cor-fundo2);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--cor-borda1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-width: 500px;
    width: 90%;
}

/* ==========================================================================
   SISTEMA DE MENSAGENS: Toasts
   ========================================================================== */
#toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    color: #FFFFFF;
    text-align: center;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Cores com 80% de opacidade conforme especificação técnica */
.toast-success {
    background-color: rgba(40, 167, 69, 0.8);
}

.toast-error {
    background-color: rgba(220, 53, 69, 0.8);
}

.toast-warning {
    background-color: #f59e0b; /* Amarelo Warning Escuro */
    color: #fffbeb; /* Texto claro para alto contraste */
    border-left: 4px solid #b45309;
}

.toast.info { 
    background-color: #4A6572; 
    border-left: 6px solid #2d3e47; 
}

@keyframes slideIn { 
    from { 
        transform: translateX(120%); 
        opacity: 0; 
    } to { 
        transform: translateX(0); 
        opacity: 1; 
    } 
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 70px;
    background-color: var(--cor-header1, #343A40); /* Fallback caso var falhe */
    color: var(--cor-fonte3, #F4EBD9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
}

.topbar-logo {
    max-height: 50px;
    object-fit: contain;
}

.topbar-brand {
    font-family: var(--font-family-base);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--cor-botao1); /* Detalhe em terracota/tijolo */
}

.page-title {
    font-size: 1.25rem;
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-profile {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cor-botao1);
    font-weight: bold;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==========================================================================
   AVATAR E DROPDOWN
   ========================================================================== */
.avatar-container {
    position: relative;
    cursor: pointer;
}

.avatar-circle {
    width: 45px; height: 45px;
    border-radius: 50%;
    background-color: var(--cor-fundo2);
    color: var(--cor-fonte1);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--cor-borda1);
    transition: var(--transicao-padrao);
}

.avatar-container:hover .avatar-circle {
    border-color: var(--cor-botao1);
}

.dropdown-menu {
    position: absolute;
    top: 60px; right: 0;
    background-color: #FFFFFF;
    border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transicao-padrao);
    display: flex;
    flex-direction: column;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 16px;
    color: var(--cor-fonte1);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--cor-fundo2);
    color: var(--cor-botao1);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--cor-borda1);
    margin: 4px 0;
}

.text-danger { color: var(--cor-botao3) !important; }

/* ==========================================================================
   ESPAÇAMENTO PARA A TOPBAR FIXA
   ========================================================================== */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 30px 40px 30px; /* Top: 100px (Calço da Topbar), Dir/Esq: 30px, Bottom: 40px */
    min-height: calc(100vh - 130px);
}

/* ==========================================
   LAYOUT EM CARDS (DASHBOARD E FORMULÁRIOS)
========================================== */

.erp-card {
    background-color: var(--cor-fundo3);
    border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.dashboard-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; margin-bottom: 3rem;
}

.dash-card {
    background-color: var(--cor-fundo3); 
    border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius); 
    padding: 1.5rem;
    transition: var(--transicao-padrao); 
    display: flex; 
    flex-direction: column; 
    
    /* AS DUAS TRAVAS QUE IMPEDEM A SOBREPOSIÇÃO: */
    height: auto; 
    box-sizing: border-box; 
}

.dash-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    border-color: var(--cor-botao1); 
}

/* ==========================================================================
   AUTENTICAÇÃO E FORMULÁRIOS ISOLADOS
   ========================================================================== */
.auth-wrapper {
    display: flex; justify-content: center; align-items: center; min-height: 70vh; padding: 2rem 0;
}
.auth-card {
    background-color: var(--cor-fundo3); border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius); padding: 2.5rem; width: 100%; max-width: 600px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h2 { color: var(--cor-botao1); margin-bottom: 0.5rem; font-family: var(--font-family-base); }
.input-group { position: relative; margin-bottom: 1.5rem; }
.input-icon {
    position: absolute; top: 40px; left: 15px; /* Ajustado para considerar a label acima */
    color: var(--cor-fonte2); pointer-events: none; display: flex; align-items: center;
}
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; color: var(--cor-fonte1); }
.input-group .form-control { padding-left: 45px; width: 100%; }
.btn-block { width: 100%; padding: 1rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }

/* ==========================================================================
   COMPONENTES DE UI: ABAS (TABS) PARA FORMULÁRIOS COMPLEXOS
   ========================================================================== */
.tabs-container {
    margin-bottom: 2rem;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--cor-borda1);
    gap: 10px;
    overflow-x: auto; /* Permite rolar no celular se houver muitas abas */
    overflow-y: hidden;
    margin-bottom: 20px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab-button {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-family: var(--font-family-ui);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cor-fonte2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -2px; /* Sobrepõe a borda inferior do container */
}

.tab-button:hover {
    color: var(--cor-botao1);
    background-color: var(--cor-fundo2);
}

.tab-button.active {
    color: var(--cor-botao1);
    border-bottom-color: var(--cor-botao1);
    background-color: var(--cor-fundo1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- COMPONENTE: TABS (ABAS) --- */
.erp-tabs {
    display: flex;
    border-bottom: 2px solid var(--cor-borda1);
    margin-bottom: 25px;
    gap: 5px;
    overflow-x: auto; /* Para telas menores */
    overflow-y: hidden; /* Força a morte da barra vertical */
    
    /* Oculta a barra horizontal visualmente, mas mantém o arraste no touch */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.erp-tabs::-webkit-scrollbar {
    display: none;
}

.erp-tab {
    padding: 12px 24px;
    cursor: pointer;
    color: var(--cor-fonte2);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    font-family: var(--font-family-base);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.erp-tab:hover {
    color: var(--cor-fonte1);
    background: rgba(255,255,255,0.02);
}
.erp-tab.active {
    color: var(--cor-botao1);
    border-bottom-color: var(--cor-botao1);
}
.erp-tab-content {
    display: none;
    animation: fadeInTab 0.4s ease forwards;
}
.erp-tab-content.active {
    display: block;
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   UPLOAD DE AVATAR (50x50) E CROPPER.JS MODAL
   ========================================================================== */

/* Header do formulário focado no Avatar */
.form-header-avatar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--cor-borda1);
    padding-bottom: 20px;
    min-height: 60px;
}

.form-header-avatar h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-family-base);
    color: var(--cor-botao1);
}

/* O container absoluto no canto direito */
.avatar-upload-container {
    position: absolute;
    right: 0;
    width: 50px;
    height: 50px;
}

/* O círculo visual com borda */
.avatar-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--cor-fundo3);
    border: 2px solid var(--cor-borda1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transicao-padrao);
}

.avatar-preview:hover {
    border-color: var(--cor-botao1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* A Imagem dentro do Círculo */
.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A Camada Escura com Lápis (Aparece apenas no Hover) */
.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #FFFFFF;
}

.avatar-preview:hover .avatar-overlay {
    opacity: 1;
}

/* Oculta o input nativo feio */
.avatar-input-hidden {
    display: none !important;
    opacity: 0;
    position: absolute;
    z-index: -100;
    width: 0;
    height: 0;
}

/* ==========================================================================
   CROPPER.JS: MOLDE CIRCULAR
   ========================================================================== */
/* Força APENAS o molde a ser redondo */
.cropper-view-box,
.cropper-face {
    border-radius: 50% !important;
}

/* Oculta as linhas quadradas internas do molde */
.cropper-dashed, 
.cropper-line {
    display: none !important;
}

/* Bolinhas de redimensionamento na cor do Pub */
.cropper-point {
    background-color: var(--cor-botao1) !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
}

/* ==========================================================================
   CLASSES UTILITÁRIAS GLOBAIS
   ========================================================================== */
.hidden-field {
    display: none !important;
}

/* ==========================================================================
   COMPONENTES DE RH: CHIPS DE CHECKBOX MULTIPLO (Atividades) - DJANGO 6+
   ========================================================================== */

/* 1. Transforma o container gerado pelo Django 6 em uma grade flexível (lado a lado) */
.checkbox-grid > div {
    display: flex !important;
    flex-wrap: wrap !important; /* Quando a linha enche, ele pula para a próxima automaticamente */
    gap: 12px !important;
    width: 100%;
}

/* 2. Garante que o bloco individual do checkbox não ocupe a linha inteira */
.checkbox-grid > div > div {
    display: inline-flex !important;
}

/* 3. Estiliza a etiqueta do checkbox para parecer um "Chip" rústico e responsivo */
.checkbox-grid label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--cor-fundo2);
    border: 1px solid var(--cor-borda1);
    padding: 8px 16px;
    border-radius: 25px; /* Formato de "Chip/Pílula" */
    cursor: pointer;
    transition: var(--transicao-padrao);
    font-weight: 500 !important;
    font-size: 0.9rem;
    color: var(--cor-fonte1);
    margin: 0 !important;
    white-space: nowrap; /* O SEGREDO: Impede que o nome da atividade quebre ao meio */
}

/* Efeito de Hover e Foco */
.checkbox-grid label:hover {
    border-color: var(--cor-botao1);
    background-color: var(--cor-fundo1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* O input checkbox customizado */
.checkbox-grid input[type="checkbox"] {
    accent-color: var(--cor-botao1);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

/* ==========================================================================
   QUADRO INTERNO DE FORMULÁRIOS E TABELAS (Contraste)
   ========================================================================== */
.inner-dark-box {
    background-color: var(--cor-fundo2); /* Fundo um tom mais escuro que o card branco */
    border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Padronização Global do Breadcrumb */
.breadcrumb-container {
    font-family: var(--font-family-ui); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 20px;
}
.breadcrumb-container a { color: var(--cor-fonte2); text-decoration: none; transition: 0.2s; }
.breadcrumb-container a:hover { color: var(--cor-botao1); }
.breadcrumb-separator { color: var(--cor-borda2); }
.breadcrumb-current { color: var(--cor-botao1); font-weight: 600; }

/* ==========================================================================
   MÓDULO DE PESSOAS: ÁREA DE IDENTIFICAÇÃO E AVATAR
   ========================================================================== */
.identificacao-wrapper {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 20px;
    align-items: start;
    margin-bottom: 15px;
}

.avatar-area {
    width: 100px;
    height: 100px;
}

.avatar-preview-box {
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    border: 2px dashed var(--cor-borda2); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    cursor: pointer; 
    position: relative; 
    background-color: var(--cor-fundo2); 
    transition: border-color 0.2s;
}

/* O Efeito de Lápis transparente quando passa o mouse */
.avatar-preview-box:hover {
    border-color: var(--cor-botao1);
}
.avatar-preview-box:hover .avatar-overlay-box {
    opacity: 1;
}

.avatar-overlay-box {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    opacity: 0; 
    transition: opacity 0.2s;
}

.avatar-image-box {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}

.camera-icon-box {
    position: absolute;
}

/* Celular: O CSS Grid joga o Avatar para o topo e centraliza automaticamente */
@media (max-width: 768px) {
    .identificacao-wrapper {
        grid-template-columns: 1fr; 
    }
    .avatar-area {
        grid-row: 1; 
        margin: 0 auto 20px auto; 
    }
    .campos-area {
        grid-row: 2; 
    }
}

/* ==========================================================================
   MÓDULO 3: ESCALAS E AGENDA OPERACIONAL
   ========================================================================== */
.escalas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 1.5rem;
}

.escala-card-item {
    background-color: var(--cor-borda1); 
    border: 1px solid var(--cor-borda2);
    border-radius: var(--border-radius); 
    padding: 1.5rem;
    transition: var(--transicao-padrao); 
    display: flex; 
    flex-direction: column; 
    
    /* AS DUAS TRAVAS QUE IMPEDEM A SOBREPOSIÇÃO: */
    height: auto; 
    box-sizing: border-box; 
}

.escala-card-item:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    border-color: var(--cor-botao1); 
}

.escala-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.escala-data {
    font-size: 1.3rem;
    font-family: var(--font-family-base);
    color: var(--cor-botao1);
    margin: 0;
}

.escala-evento {
    font-size: 1rem;
    color: var(--cor-fonte1);
    font-weight: 600;
    margin-bottom: 15px;
}

.escala-info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--cor-fundo2);
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--cor-fonte2);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Badges de Status Modernos */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-R {
    background-color: #fefce8;
    color: #b45309;
    border: 1px solid #eab308;
}

.badge-F { background-color: var(--cor-fundo2); color: var(--cor-fonte2); border: 1px solid var(--cor-borda2); }
.badge-C { background-color: #fef2f2; color: #b91c1c; border: 1px solid #ef4444; }

.badge-E {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #22c55e;
}

.escala-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px dashed var(--cor-borda1);
    padding-top: 15px;
    margin-top: auto;
}

/* Dia da Semana no Card de Escala */
.escala-dia-semana {
    display: block;
    font-size: 0.95rem;
    color: var(--cor-fonte2);
    text-transform: capitalize;
    margin-top: 4px;
    font-weight: 700;
}

/* Botão de Excluir Escala (Lixeira) */
.btn-excluir {
    background-color: transparent;
    color: #ef4444; /* Vermelho alerta */
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transicao-padrao);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-excluir:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* ==========================================================================
   MÓDULO 3.2: MONTAGEM DO TIME (ESCALAS)
   ========================================================================== */
.team-group-header {
    font-family: var(--font-family-ui);
    font-size: 1.1rem;
    color: var(--cor-botao1);
    border-bottom: 2px solid var(--cor-borda1);
    padding-bottom: 8px;
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-member-row {
    display: grid;
    grid-template-columns: 50px 1fr 200px 150px;
    gap: 15px;
    align-items: center;
    /* FUNDO INTERMEDIÁRIO (Mais claro que o fundo escuro, mais escuro que o branco) */
    background: rgba(128, 128, 128, 0.05); 
    border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    transition: var(--transicao-padrao);
}

.team-member-row:hover {
    border-color: var(--cor-botao1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.team-member-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.team-member-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-borda2);
}

.team-member-avatar-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--cor-fundo2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cor-fonte2);
    border: 2px solid var(--cor-borda2);
}

/* Switches para Whatsapp/Email */
.notification-toggles {
    display: flex;
    gap: 15px;
    align-items: center;
}

.toggle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--cor-fonte2);
    font-weight: 600;
}

/* Responsividade: Vira um card empilhado no celular */
@media (max-width: 768px) {
    .team-member-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .team-member-info {
        border-bottom: 1px dashed var(--cor-borda1);
        padding-bottom: 10px;
    }
    .notification-toggles {
        justify-content: space-between;
        background: var(--cor-fundo2);
        padding: 10px;
        border-radius: 6px;
    }
}

/* ==========================================================================
   MÓDULO 3.3: RECEPÇÃO PÚBLICA (MAGIC LINK MOBILE-FIRST) - FIXO CLARO
   ========================================================================== */
.public-invite-body { background-color: #f5f5f4; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; font-family: var(--font-family-base); }
.invite-card { background: #ffffff; width: 100%; max-width: 450px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); overflow: hidden; border: 1px solid #e7e5e4; }
.invite-header { background: #fafaf9; padding: 30px 20px; text-align: center; border-bottom: 2px solid #e7e5e4; }
.invite-header-logo { display: flex; justify-content: center; align-items: center; margin-bottom: 15px; }
.invite-header-logo img { max-height: 85px; width: auto; max-width: 100%; object-fit: contain; }
.invite-header-logo svg { color: var(--cor-botao1); width: 48px; height: 48px; }
.invite-title { color: #1c1917; font-size: 1.5rem; margin: 0; font-family: var(--font-family-ui); }
.invite-content { padding: 25px 20px; }
.invite-greeting { font-size: 1.1rem; color: #292524; margin-bottom: 20px; text-align: center; }
.invite-details-box { background: #fafaf9; border: 1px solid #e7e5e4; border-radius: 8px; padding: 15px; margin-bottom: 25px; }
.invite-detail-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: #57534e; font-size: 0.95rem; }
.invite-detail-item:last-child { margin-bottom: 0; }
.invite-detail-item svg { color: var(--cor-botao1); flex-shrink: 0; }
.invite-detail-highlight { color: #1c1917; font-weight: 700; }
.invite-actions { display: flex; gap: 15px; flex-direction: column; }
.btn-magic { padding: 15px; font-size: 1.1rem; font-weight: 600; border-radius: 8px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: var(--transicao-padrao); width: 100%; }
.btn-magic-accept { background-color: #16a34a; color: #fff; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2); }
.btn-magic-accept:hover { background-color: #15803d; transform: translateY(-2px); }
.btn-magic-maybe { background-color: transparent; color: #d97706; border: 2px solid #d97706; }
.btn-magic-maybe:hover { background-color: rgba(217, 119, 6, 0.05); }
.btn-magic-decline { background-color: transparent; color: #dc2626; border: 2px solid #dc2626; }
.btn-magic-decline:hover { background-color: rgba(220, 38, 38, 0.05); }
.invite-answered-box { text-align: center; padding: 20px; border-radius: 8px; margin-top: 10px; }
.answered-confirmed { background: #f0fdf4; border: 1px solid #22c55e; color: #15803d; }
.answered-maybe { background: #fffbeb; border: 1px solid #f59e0b; color: #b45309; text-align: center; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.answered-declined { background: #fef2f2; border: 1px solid #ef4444; color: #b91c1c; }

/* Status do Colaborador na tela de Escala */
.colab-status-badge { display: flex; align-items: center; justify-content: center; width: 40px; }

/* ==========================================================================
   MÓDULO 3.4: TRACKING E ORQUESTRAÇÃO (DASHBOARD GERENCIAL)
   ========================================================================== */
.tracking-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--cor-fundo2);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px dashed var(--cor-borda2);
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.tracking-card {
    background: var(--cor-fundo1);
    border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 250px 1fr 200px;
    gap: 20px;
    align-items: center;
    transition: var(--transicao-padrao);
}

.tracking-card:hover {
    border-color: var(--cor-botao1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Informações do Lado Esquerdo */
.track-info h3 { margin: 0 0 5px 0; color: var(--cor-botao1); font-family: var(--font-family-base); font-size: 1.2rem; }
.track-info p { margin: 0; color: var(--cor-fonte2); font-size: 0.9rem; }

/* Centro: Contadores e Barra de Progresso */
.track-stats-container { display: flex; flex-direction: column; gap: 10px; }
.track-stats-row { display: flex; gap: 15px; }

.track-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.badge-green { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-gray { background: rgba(100, 116, 139, 0.1); color: #64748b; border: 1px solid rgba(100, 116, 139, 0.2); }
.badge-red { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* Barra Visual de Preenchimento */
.track-progress-wrapper {
    width: 100%;
    height: 8px;
    background: var(--cor-fundo2);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}
.track-bar-green { background-color: #22c55e; height: 100%; transition: width 0.5s ease; }
.track-bar-gray { background-color: #94a3b8; height: 100%; transition: width 0.5s ease; }
.track-bar-red { background-color: #ef4444; height: 100%; transition: width 0.5s ease; }

/* Ações à direita */
.track-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }

/* Responsividade do Tracking */
@media (max-width: 900px) {
    .tracking-card { grid-template-columns: 1fr; gap: 15px; }
    .track-actions { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
}

/* ==========================================================================
   ATUALIZAÇÕES: STATUS "AINDA NÃO SEI" (INDECISO)
   ========================================================================== */

/* Botão do Magic Link */
.btn-magic-maybe {
    background-color: transparent;
    color: #d97706; /* Laranja/Amarelo escuro */
    border: 2px solid #d97706;
}
.btn-magic-maybe:hover { background-color: rgba(217, 119, 6, 0.05); }

/* Banner de Aviso no Magic Link */
.answered-maybe { 
    background: #fffbeb; 
    border: 1px solid #f59e0b; 
    color: #b45309; 
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Badges e Barras do Dashboard de Tracking */
.badge-yellow { background: rgba(245, 158, 11, 0.1); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.2); }
.track-bar-yellow { background-color: #f59e0b; height: 100%; transition: width 0.5s ease; }

/* ==========================================================================
   CONFIGURAÇÕES: TOGGLE SWITCH (Z-API)
   ========================================================================== */
.zapi-config-box {
    background: var(--cor-fundo2);
    border: 1px solid var(--cor-borda1);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 15px;
}

.switch-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--cor-borda2);
}

.switch-zapi {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.switch-zapi input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-zapi {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--cor-borda2);
    transition: .4s;
    border-radius: 26px;
}

.slider-zapi:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: var(--cor-fonte2);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-zapi {
    background-color: #25D366; /* Verde WhatsApp */
}

input:checked + .slider-zapi:before {
    transform: translateX(24px);
    background-color: #ffffff;
}

/* ==========================================================================
   NORMALIZAÇÃO DOS BOTÕES SVG (AÇÕES)
   ========================================================================== */
.action-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px; border: 1px solid transparent;
    background: transparent; cursor: pointer; transition: all 0.2s ease;
}
.action-icon svg { width: 18px; height: 18px; }

.action-blue { color: var(--cor-botao1); border-color: var(--cor-botao1); }
.action-blue:hover { background: var(--cor-botao1); color: #fff; }

.action-gray { color: var(--cor-botao2); border-color: var(--cor-botao2); }
.action-gray:hover { background: var(--cor-botao2); color: #fff; }

.action-yellow { color: #d97706; border-color: #d97706; }
.action-yellow:hover { background: #d97706; color: #fff; box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3); }

.action-red { color: #dc2626; border-color: #dc2626; }
.action-red:hover { background: #dc2626; color: #fff; box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3); }

/* --- BOTÃO DE AÇÃO VERDE (CONFIRMAR) --- */
.action-icon.action-green {
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    background-color: rgba(34, 197, 94, 0.05);
    transition: all 0.2s ease;
}

.action-icon.action-green:hover {
    background-color: #22c55e;
    color: #ffffff;
    border-color: #22c55e;
    transform: translateY(-2px);
}
/* ==========================================================================
   UI DE AVATARES E TAGS (LISTAGENS)
   ========================================================================== */
.table-avatar-container { display: flex; align-items: center; gap: 12px; }

.table-avatar { 
    width: 36px; height: 36px; border-radius: 50%; 
    object-fit: cover; border: 2px solid var(--cor-borda1); 
}

.table-avatar-placeholder { 
    width: 36px; height: 36px; border-radius: 50%; 
    background-color: var(--cor-fundo2); display: flex; align-items: center; 
    justify-content: center; color: var(--cor-fonte2); 
    border: 2px solid var(--cor-borda1); font-size: 0.9rem; 
}

.activity-tags-container { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.activity-tag { 
    background-color: var(--cor-fundo2); color: var(--cor-fonte1); 
    border: 1px solid var(--cor-borda2); padding: 4px 10px; 
    border-radius: 12px; font-size: 0.75rem; font-weight: 600; 
    white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ==========================================================================
   COMPONENTE GLOBAL: ERP SWITCH (Substitui o Checkbox Padrão)
   ========================================================================== */
.erp-switch-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.erp-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

/* Esconde o checkbox original feio do HTML */
.erp-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* O fundo do interruptor */
.erp-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid var(--cor-borda1);
    transition: .3s ease-in-out;
    border-radius: 30px;
}

/* A bolinha do interruptor */
.erp-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--cor-fonte2);
    transition: .3s ease-in-out;
    border-radius: 50%;
}

/* Quando Marcado (Ativo) */
.erp-switch input[type="checkbox"]:checked + .erp-slider {
    background-color: var(--cor-botao1);
    border-color: var(--cor-botao1);
}

.erp-switch input[type="checkbox"]:checked + .erp-slider:before {
    transform: translateX(22px);
    background-color: #ffffff;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.icone-banco-svg svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* No seu style.css global */
.box-icone-tipologia svg {
    width: 22px !important;
    height: 22px !important;
    display: block;
    object-fit: contain;
}

/* ==========================================
   SISTEMA DE NOTIFICAÇÕES (SINO)
========================================== */
.notification-wrapper {
    position: relative;
    margin-right: 20px;
}

/* O gatilho que recebe o clique */
.notification-trigger {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.notification-trigger:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.notification-icon {
    width: 24px;
    height: 24px;
    color: var(--cor-texto-mutado, #9ca3af);
    transition: color 0.3s;
}

/* Badge Vermelho de Quantidade */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444; /* Vermelho alerta */
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    display: none; /* Controlado via JS */
    pointer-events: none; /* IMPEDE que o clique pare no número e trave o menu */
}

/* Dropdown de Notificações - RESTAURADO AO SEU ESTILO RÚSTICO ESCURO */
.notification-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: -10px;
    width: 320px;
    background-color: var(--cor-fundo-card, #1f2937); /* COR ESCURA ORIGINAL */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.active {
    display: block !important;
    animation: fadeIn 0.2s ease-out;
}

.notif-list { padding-bottom: 10px; }

.notif-item { 
    cursor: pointer; 
    transition: 0.2s; 
    padding: 12px 15px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background-color: rgba(255,255,255,0.05); }

/* Borda azul original e fundo leve original para não lidas */
.notif-item.unread { 
    border-left: 4px solid var(--cor-botao1); 
    background-color: rgba(0, 123, 255, 0.05); 
}

.notif-title { font-size: 13px; font-weight: bold; color: #f3f4f6; margin-bottom: 4px; }
.notif-msg { font-size: 12px; color: #9ca3af; line-height: 1.4; }
.notif-time { font-size: 10px; color: #6b7280; margin-top: 5px; display: block; }

/* ==========================================
   MÓDULO DE DOCUMENTOS E CONTRATOS
   ========================================== */

/* Simulação de Folha A4 para visualização em tela */
.a4-paper {
    background: #FFFFFF;
    color: #000000;
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    margin: 20px auto;
    padding: 25mm;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    font-family: 'Times New Roman', Times, serif, Arial;
    line-height: 1.6;
    border-radius: 4px;
}

.a4-paper h1, .a4-paper h2, .a4-paper h3 {
    text-align: center;
    color: #000000;
    margin-bottom: 20px;
}

/* Container do Formulário com TinyMCE */
.editor-container {
    background: var(--cor-fundo-card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--cor-borda);
    margin-top: 15px;
}

.editor-container .tox-tinymce {
    border-radius: 6px;
    border: 1px solid var(--cor-borda) !important;
}

/* Regras de Impressão (Acionadas no Ctrl+P) */
@media print {
    body {
        background: #FFFFFF !important;
        margin: 0;
        padding: 0;
    }
    
    /* Esconde a Topbar, Sidebar, Breadcrumbs e Botões */
    .topbar, .sidebar, .breadcrumbs, .no-print, .toast-container {
        display: none !important;
    }

    .a4-paper {
        margin: 0;
        padding: 0;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   MÓDULO APP PÚBLICO (AGENDA MOBILE-FIRST)
   ========================================================================== */

/* Cabeçalho Público */
.public-header {
    text-align: center;
    padding: 30px 20px 20px 20px;
}
.public-logo {
    max-width: 150px;
    max-height: 100px;
    margin-bottom: 10px;
    object-fit: contain;
}
.public-brand {
    font-family: var(--font-family-base);
    color: var(--cor-botao1);
    font-size: 2rem;
    margin: 0 0 5px 0;
}
.public-subtitle {
    color: var(--cor-fonte3);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.search-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--cor-botao1); color: #fff;
    padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; margin-top: 15px;
}
.search-badge a { color: #fff; text-decoration: none; }

/* Swiper / Carrossel Horizontal Nativo */
.public-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding: 10px 20px 100px 20px; /* Calço inferior de 100px por causa da bottom bar */
}
.public-carousel::-webkit-scrollbar { display: none; } /* Oculta a barra nativa */

/* Card de Dia de Operação */
.public-day-card {
    scroll-snap-align: center;
    flex: 0 0 88%; /* Exibe 88% do card, dando a pista de que tem mais pro lado */
    max-width: 450px;
    background: var(--cor-fundo2);
    border: 1px solid var(--cor-borda1);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.public-day-header {
    background: var(--cor-fundo3);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--cor-borda1);
}
.public-day-header .day-number {
    display: block; font-size: 2rem; font-weight: 900; color: var(--cor-botao1);
}
.public-day-header .day-name {
    display: block; font-size: 1rem; color: var(--cor-fonte2); font-weight: 600; text-transform: uppercase;
}

/* Eventos na Agenda */
.public-events-list { padding: 15px; display: flex; flex-direction: column; gap: 15px; }

.public-event-item {
    display: flex; align-items: center; gap: 15px;
    padding-bottom: 15px; border-bottom: 1px solid var(--cor-borda1);
    cursor: pointer; transition: transform 0.2s;
}
.public-event-item:last-child { border-bottom: none; padding-bottom: 0; }
.public-event-item:active { transform: scale(0.98); }

.public-atracao-foto {
    width: 55px; height: 55px; border-radius: 50%;
    border: 2px solid var(--cor-botao1); flex-shrink: 0;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: var(--cor-fundo1); color: var(--cor-fonte3);
}
.public-atracao-foto img { width: 100%; height: 100%; object-fit: cover; }

.public-atracao-info h3 { margin: 0 0 4px 0; font-size: 1.1rem; color: var(--cor-fonte1); font-family: var(--font-family-ui); }
.public-atracao-info .event-time { font-size: 0.85rem; color: var(--cor-fonte2); display: flex; align-items: center; gap: 5px; }

.public-empty-state {
    width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 20px; color: var(--cor-fonte3); text-align: center; opacity: 0.7;
}
.public-empty-state svg { width: 60px; height: 60px; margin-bottom: 15px; color: var(--cor-botao1); }

/* NAVEGAÇÃO MOBILE (BOTTOM BAR) & DESKTOP (TOP BAR) */
.public-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; width: 100%; height: 70px;
    background: var(--cor-fundo2);
    border-top: 1px solid var(--cor-borda1);
    display: flex; justify-content: space-around; align-items: center;
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom); /* iOS Seguro */
}

.public-bottom-nav .nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 50px; height: 50px; color: var(--cor-fonte2); background: transparent; border: none; cursor: pointer; transition: 0.3s; text-decoration: none;
}
.public-bottom-nav .nav-item svg { width: 24px; height: 24px; transition: 0.3s; }
.public-bottom-nav .nav-item:hover svg, .public-bottom-nav .nav-item:active svg {
    color: var(--cor-botao1); transform: translateY(-3px);
}

.nav-arrow { display: none; }

/* MEDIA QUERY: Desktop / Tablet de Tela Larga */
@media (min-width: 769px) {
    .public-header {
        max-width: 1000px;
        margin: 40px auto 0 auto;
    }

    /* Restaura o Carrossel Horizontal para o PC (Estilo Netflix) */
    .public-carousel {
        justify-content: flex-start; /* Alinha no começo em vez de centralizar */
        flex-wrap: nowrap;           /* Impede a quebra de linha (Grid) */
        overflow-x: auto;            /* Restaura a rolagem horizontal */
        padding-top: 30px;
        max-width: 1000px;
        margin: 0 auto;
        /* Oculta a barra de rolagem feia do Windows/Mac, mantendo a função */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .public-carousel::-webkit-scrollbar { display: none; }
    
    .public-day-card {
        flex: 0 0 340px; 
        max-width: 340px;
        margin-bottom: 20px;
    }
    
    .public-bottom-nav {
        top: 50%; bottom: auto; right: 30px; left: auto; width: 65px; height: auto;
        transform: translateY(-50%); flex-direction: column;
        border: 1px solid var(--cor-borda1); border-radius: 40px; 
        padding: 25px 0; gap: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        background-color: var(--cor-fundo2);
    }
    
    .public-bottom-nav .nav-item { width: 100%; height: 40px; }
    
    /* Exibe as setas de navegação apenas no PC */
    .nav-arrow { display: flex !important; }
}

/* ==========================================================================
   ATUALIZAÇÃO: TAGS DE DATA DO CARD DA AGENDA PÚBLICA
   ========================================================================== */
.public-date-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.date-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    font-family: var(--font-family-ui);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--border-radius); /* Respeita os cantos arredondados do sistema */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

/* Tag do Ano: Destaque em Terracota/Tijolo */
.tag-year {
    background-color: var(--cor-botao1);
    color: var(--cor-fonte3);
    border: 1px solid var(--cor-botao1);
}

/* Tag do Mês: Fundo Marrom Rústico Escuro */
.tag-month {
    background-color: var(--cor-fundo1);
    color: var(--cor-fonte3);
    border: 1px solid var(--cor-fundo1);
}

/* Tag do Dia: Contraste Claro com Borda Rústica Fina */
.tag-day {
    background-color: #FFFFFF;
    color: var(--cor-fonte1);
    border: 1px solid var(--cor-borda1);
}

/* Ajuste fino do espaçamento do dia da semana abaixo das tags */
.public-day-header .day-name {
    display: block;
    font-size: 0.85rem;
    color: var(--cor-fonte2);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

/* ==========================================
   WIZARD DE CADASTRO PÚBLICO
   ========================================== */
.cadastro-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}
.cadastro-header {
    text-align: center; margin-bottom: 30px;
}
.cadastro-logo { max-height: 100px; margin-bottom: 15px; }

.card-box {
    background: #FFFFFF;
    border: 1px solid var(--cor-borda1);
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--cor-fundo2);
    padding-bottom: 10px;
}
.wizard-steps .step {
    flex: 1; text-align: center;
    font-size: 0.85rem; font-weight: bold; color: var(--cor-fonte2);
    transition: 0.3s;
}
.wizard-steps .step.active {
    color: var(--cor-botao1); border-bottom: 3px solid var(--cor-botao1);
    margin-bottom: -12px; /* Sobrepõe a borda cinza */
}

.wizard-tab { display: none; animation: fadeIn 0.4s ease; }
.wizard-tab.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   CORREÇÃO DE CONTRASTE: PORTAL DO ARTISTA (PÚBLICO)
   ========================================================================== */

/* 1. Garante a cor dos textos principais fora dos cards (se o fundo geral for escuro) */
.cadastro-container h2 {
    color: var(--cor-botao1) !important; /* Injeta o terracota/tijolo de destaque */
}

.cadastro-container .cadastro-header p {
    color: #e5d3c3 !important; /* Tom marfim/creme rústico de alta legibilidade */
}

/* 2. Configuração do Card para Estilo Pub Rústico Escuro */
.cadastro-container .card-box {
    background-color: #231810 !important; /* Marrom café profundo, rústico e fosco */
    border: 1px solid #3d2a1c !important; /* Borda sutil de fechamento */
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

/* 3. Força a legibilidade absoluta de todos os textos internos do Card */
.cadastro-container .card-box h3,
.cadastro-container .card-box h4 {
    color: var(--cor-botao1) !important;
}

.cadastro-container .card-box label {
    color: #f5eae0 !important; /* Texto claro (quase branco) para os rótulos dos campos */
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: block;
}

.cadastro-container .card-box p,
.cadastro-container .card-box small {
    color: #bfa695 !important; /* Tom bronze/areia suave para textos de ajuda e instruções */
}

/* 4. Estilização dos Campos de Entrada (Inputs/Selects) para o Tema Escuro */
.cadastro-container .form-control {
    background-color: #140e0a !important; /* Fundo quase preto para dar profundidade ao campo */
    border: 1px solid #4a3322 !important; /* Borda rústica tabaco */
    color: #ffffff !important; /* Texto que o usuário digita fica 100% branco */
    border-radius: 6px;
}

/* Efeito de foco quando o usuário clica para digitar */
.cadastro-container .form-control:focus {
    border-color: var(--cor-botao1) !important;
    background-color: #1a120d !important;
    box-shadow: 0 0 0 0.2rem rgba(211, 84, 0, 0.25) !important;
}

/* Ajuste para campos marcados como Read-Only (Dados travados do responsável na atualização) */
.cadastro-container .form-control[readonly] {
    background-color: #2d2016 !important; /* Tom cinza-amarronzado de bloqueio */
    color: #a69285 !important;
    border-color: #3d2a1c !important;
    cursor: not-allowed;
}

/* Ajuste fino para os indicadores de passos do Wizard no topo */
.cadastro-container .wizard-steps {
    border-bottom: 2px solid #3d2a1c;
}
.cadastro-container .wizard-steps .step {
    color: #8c7361;
}
.cadastro-container .wizard-steps .step.active {
    color: var(--cor-botao1);
    border-bottom: 3px solid var(--cor-botao1);
}