:root {
    /* Paleta Principal (Tons de Ardósia/Grafite) */
    --primary-color: #334155;
    /* slate-700 */
    --primary-light: #475569;
    /* slate-600 */

    /* Paleta de Destaque (Verde Profissional) */
    --accent-color: #16a34a;
    /* green-600 */
    --accent-light: #22c55e;
    /* green-500 */

    /* Tons Neutros */
    --secondary-color: #64748b;
    /* slate-500 (para texto/ícones) */
    --bg-light: #f1f5f9;
    /* slate-100 (fundo geral) */
    --bg-card: #ffffff;
    /* branco (fundo dos cards) */
    --text-primary: #1e293b;
    /* slate-800 (texto principal) */
    --text-secondary: #475569;
    /* slate-600 (texto secundário) */
    --border-light: #e2e8f0;
    /* slate-200 (bordas) */

    /* Sombras */
    --shadow-soft: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-light);
    color: var(--text-primary);
}

/* Logo Header Styles */
.logo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-container {
    width: 72px;
}

.logo-container img {
    margin-bottom: 10px;
    object-fit: contain;
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    /* Atualizado */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

/* Classe para esconder elementos */
.hidden {
    display: none;
}

/* Card Styles */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-medium);
}

/* Button Styles */
.btn-primary {
    background: var(--gradient-primary);
    /* Atualizado */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* (NOVO) Botão de Destaque (Verde) */
.btn-accent {
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* (ATUALIZADO) Botão Secundário (Branco) */
.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    border-color: var(--primary-light);
}


/* (REMOVIDO) Estilo .nav-container removido */

/* (ATUALIZADO) Navigation Tabs Styles - Visual "Segmented Control / Pills" */
.nav-tabs {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.5rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
    /* mb-6 */
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    /* Ajuste de padding para o visual pill */
    font-weight: 500;
    font-size: 0.875rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: none;
    /* Removida borda inferior */
    border-radius: 8px;
    /* Arredondamento dos botões */
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--bg-light);
    /* Fundo suave no hover */
}

.tab-btn.active-tab {
    color: #ffffff;
    /* Texto branco para contrastar */
    background: var(--gradient-primary);
    /* (NOVO) Destaque forte com gradiente */
    border-bottom-color: transparent;
    font-weight: 600;
    box-shadow: var(--shadow-medium);
    /* Sombra para dar profundidade */
}

/* (ATUALIZADO) Dropdown Styles - Reintroduzidos e ajustados */
.dropdown {
    position: relative;
    display: block;
    /* Para se comportar bem no flex container */
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 240px;
    /* Largura mínima ajustada */
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 0.25rem;
    /* Pequeno espaço do gatilho */
}

.dropdown.active .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* (ATUALIZADO) Estilo para item ativo do dropdown */
.dropdown-item.active-tab {
    background: rgba(51, 65, 85, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

/* Filter Controls */
.filter-group {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    /* Atualizado */
}

.list-item {
    display: block !important;
}

/* Fim da Correção de CSS */

/* (NOVO) Estilos para as abas do menu Indicações */
.indicacoes-tab-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.indicacoes-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb !important;
    background: rgba(37, 99, 235, 0.05);
}

.indicacoes-tab-content {
    display: block;
}

.indicacoes-tab-content.hidden {
    display: none !important;
}

/* (NOVO) Cabeçalho Personalizado para Impressão */
.print-header {
    display: none;
}

/* (CORRIGIDO) Estilos de Impressão - Com Cabeçalho Personalizado */
@media print {

    /* (NOVO) Mostra o cabeçalho personalizado apenas na impressão */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 15px;
        border-bottom: 2px solid #333;
        page-break-after: avoid;
    }

    .print-header h1 {
        font-size: 18px !important;
        font-weight: bold !important;
        margin: 0 0 8px 0 !important;
        color: #000 !important;
    }

    .print-header .subtitle {
        font-size: 14px !important;
        margin: 5px 0 !important;
        color: #333 !important;
    }

    .print-header .date-info {
        font-size: 12px !important;
        color: #666 !important;
        margin-top: 10px !important;
    }

    /* Esconde elementos que NUNCA devem ser impressos */
    #selection-screen,
    #report-screen header,
    nav.nav-tabs,
    #list-controls,
    #comissao-controls,
    #organizadora-controls,
    #diretivas-controls,
    #constitutivo-controls,
    #dashboard-content,
    /* Esconde divs de controles por posição - primeira div após h2 */
    h2+div.flex,
    /* Esconde divs de controles por classe específica */
    div[class*="flex-col lg:flex-row justify-between"],
    div[class*="bg-slate-50 border border-slate-200"],
    /* Força esconder elementos específicos que ainda aparecem */
    *[id*="search"],
    *[id*="filter"],
    *[id*="export"],
    *[id*="print"],
    *[class*="btn-"],
    .text-xs.text-slate-500,
    input[placeholder],
    label[class*="flex items-center"] {
        display: none !important;
        visibility: hidden !important;
    }

    /* Garante que o container do relatório seja visível */
    #report-screen {
        display: block !important;
    }

    /* (NOVO) Melhora a formatação geral da página de impressão */
    body {
        font-size: 12pt !important;
        line-height: 1.4 !important;
        color: #000 !important;
        background: white !important;
    }

    /* A classe .hidden (display: none) nas abas inativas será respeitada, imprimindo APENAS a aba ativa. */

    /* Garante que a tabela use o espaço todo */
    #list-content,
    #comissao-content,
    #organizadora-content,
    /* (NOVO) */
    #diretivas-content,
    /* (NOVO) */
    #constitutivo-content

    /* (NOVO) */
        {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
    }

    /* (NOVO) Garante que apenas o conteúdo visível seja impresso */
    .hidden {
        display: none !important;
    }

    .bg-white {
        /* Remove fundos brancos desnecessários */
        background-color: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    #report-table,
    #comissao-table,
    #organizadora-table,
    /* (NOVO) */
    #diretivas-table,
    /* (NOVO) */
    #constitutivo-table

    /* (NOVO) */
        {
        font-size: 10pt;
        border-collapse: collapse;
        width: 100%;
        /* Garante que a tabela use toda a largura */
    }

    /* (NOVO) Estilos específicos para impressão do relatório organizadora */
    #relatorio-organizadora-content {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    .representacao-group {
        page-break-inside: avoid !important;
        page-break-after: always !important;
        /* (NOVO) Força quebra de página após cada grupo */
        margin-bottom: 20px !important;
        border: 1px solid #ddd !important;
    }

    .representacao-group h3 {
        font-size: 14px !important;
        font-weight: bold !important;
        margin-bottom: 10px !important;
        color: #000 !important;
    }

    .list-item {
        border: 1px solid #ddd !important;
        margin-bottom: 5px !important;
        padding: 8px !important;
        background: #f9f9f9 !important;
        break-inside: avoid !important;
    }

    .list-item .font-medium {
        font-weight: bold !important;
        font-size: 11px !important;
        color: #000 !important;
    }

    .list-item .text-sm {
        font-size: 10px !important;
        color: #333 !important;
    }

    .text-green-600 {
        color: #000 !important;
        font-weight: bold !important;
    }

    .text-slate-500 {
        color: #666 !important;
    }

    #report-table th,
    #report-table td,
    #comissao-table th,
    #comissao-table td,
    #organizadora-table th,
    #organizadora-table td,
    #diretivas-table th,
    #diretivas-table td,
    #constitutivo-table th,
    #constitutivo-table td

    /* (NOVO) */
        {
        border: 1px solid #ccc !important;
        padding: 4px;
    }

    #report-table thead,
    #comissao-table thead,
    #organizadora-table thead,
    #diretivas-table thead,
    #constitutivo-table thead

    /* (NOVO) */
        {
        display: table-header-group;
        /* Repete cabeçalho em páginas */
    }

    /* Oculta a coluna Presença (5ª coluna) na impressão */
    #report-table th:nth-child(5),
    #report-table td:nth-child(5),
    #comissao-table th:nth-child(5),
    #comissao-table td:nth-child(5),
    #organizadora-table th:nth-child(5),
    #organizadora-table td:nth-child(5),
    #diretivas-table th:nth-child(5),
    #diretivas-table td:nth-child(5),
    #constitutivo-table th:nth-child(5),
    #constitutivo-table td:nth-child(5) {
        display: none !important;
    }
}

/* (ATUALIZADO) Aplicando o tema aos elementos específicos do Tailwind */
.focus\:ring-blue-500:focus {
    --tw-ring-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.text-blue-600 {
    color: var(--primary-color) !important;
}

.text-green-600 {
    color: var(--accent-color) !important;
}

/* (ATUALIZADO) Melhorando os elementos de entrada com cores empresariais */
input[type="text"]:focus,
input[type="search"]:focus,
select:focus {
    --tw-ring-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Checkboxes do Tailwind (se usadas) */
.form-checkbox,
.form-radio {
    color: var(--primary-color) !important;
}

/* Responsividade para as abas (INTOCADO) */
@media (max-width: 768px) {
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-width: auto;
    }

    .nav-tabs {
        gap: 0.25rem !important;
    }

    .tab-btn:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .tab-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* (NOVO) Estilos para a Tela de Apresentação (Telão) */
#telao-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    /* bg-gray-900 */
    z-index: 9990;
    overflow-y: auto;
    padding: 4rem;
}

#telao-screen.hidden {
    display: none;
}

#telao-close-btn {
    position: fixed;
    /* Fixo em relação à viewport */
    top: 1.5rem;
    right: 2rem;
    background: #ffffff;
    color: #111827;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: var(--shadow-medium);
    transition: all 0.2s ease;
}

#telao-close-btn:hover {
    background: #f1f5f9;
    /* bg-slate-100 */
}

#telao-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilos "Clean" para o conteúdo do telão */
.telao-group h3 {
    font-size: 2.25rem;
    /* text-4xl */
    font-weight: 700;
    color: #000;
    margin-bottom: 0.5rem;
}

.telao-group .text-2xl {
    font-size: 1.5rem;
    /* text-2xl */
}

.telao-group .text-slate-300 {
    color: #d1d5db;
    /* slate-300 */
}

.telao-group .text-green-400 {
    color: #4ade80;
    /* green-400 */
}

.telao-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.telao-table thead th {
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 500;
    color: #000000;
    /* slate-400 */
    text-transform: uppercase;
    padding: 1rem;
    border-bottom: 2px solid #374151;
    /* border-slate-700 */
}

.telao-table tbody td {
    font-size: 1.125rem;
    /* text-lg */
    color: #000;
    /* slate-100 */
    padding: 1rem;
    border-bottom: 1px solid #374151;
    /* border-slate-700 */
}

.telao-table tbody .text-green-400 {
    color: #4ade80;
    /* green-400 */
}

.telao-table tbody .text-slate-500 {
    color: #6b7280;
    /* slate-500 */
}

.margin-bottom {
    margin-bottom: 0px !important;
}