/* --- style-hub.css ---
 * Visual fiel ao contador-dias.css e Calculadora Cível
 * Atualizado: Callout, Modal Flex e Correções Mobile
 * Contém estilos globais para: Horas Úteis, Escalas, Férias, Prazos
 */

:root {
    --primary-color: #0071e3;
    --primary-hover: #005bb5;
    --secondary-color: #6e6e73;
    --border-color: #d2d2d7;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-color: #1d1d1f;
    --input-height: 52px;
}

/* =========================================
   1. MENU DE NAVEGAÇÃO
   ========================================= */
.hub-nav-wrapper {
    margin-bottom: 40px;
    width: 100%;
}

.hub-nav-scroll {
    display: flex;
    justify-content: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.hub-nav-item {
    background: none;
    border: none;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-bottom: -1px;
}

.hub-nav-item:hover {
    color: var(--primary-color);
    background-color: rgba(0, 113, 227, 0.05);
    border-radius: 8px 8px 0 0;
}

.hub-nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.hub-nav-item i {
    font-size: 1.1em;
}

/* =========================================
   2. CONTAINER E FORMULÁRIOS
   ========================================= */
.tool-container {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(0,0,0,0.05);
    box-sizing: border-box; /* Garante que padding não estoure */
}

/* Ajuste Mobile para Tool Container (Correção Solicitada) */
@media (max-width: 768px) {
    .tool-container {
        padding: 20px 15px; /* Reduz padding lateral */
        width: 100%;
        border-radius: 12px;
    }
}

.tool-hero {
    text-align: center;
    margin-bottom: 40px;
}
.tool-hero h1 { font-size: 2rem; font-weight: 700; color: var(--text-color); margin-bottom: 10px; }
.tool-hero p { color: var(--secondary-color); font-size: 1.1rem; }

.tool-form-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tool-input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.tool-input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    margin-left: 4px;
}

.tool-select, .tool-input {
    height: var(--input-height);
    padding: 10px 15px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tool-select:focus, .tool-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.tool-btn-action {
    height: var(--input-height);
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    padding: 0 30px;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.tool-btn-action:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Ajuste específico para botão full width fora do grid */
.form-group-full-width .tool-btn-action {
    width: 100%;
}

/* =========================================
   3. RESULTADOS
   ========================================= */
.result-box-highlight {
    margin-top: 30px;
    background: #fbfbfd;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    display: none; /* JS controla o display block */
    animation: fadeIn 0.4s ease;
}

.result-main-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.result-main-text span.highlight {
    color: var(--primary-color);
}

.result-sub-text {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Lista de Detalhes (Flexbox Padrão) */
.result-details-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    border-top: 1px dashed var(--border-color);
    padding-top: 15px;
    text-align: left;
}

.result-details-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px; /* Mais espaçamento */
    border-bottom: 1px solid #eee;
    color: var(--text-color);
    transition: background-color 0.2s;
}
.result-details-list li:last-child { border-bottom: none; }

/* 1. Ajuste da Tabela de Resultados (Lista de Dias) */
/* Garante que a coluna do meio (Dia/Feriado) não estoure o grid */
.result-details-list li {
    justify-content: flex-start; /* Alinha tudo à esquerda */
    gap: 10px; /* Espaço fixo entre colunas */
    flex-wrap: nowrap; /* Impede quebra de linha indesejada */
}

.result-details-list li span:nth-child(2) {
    flex: 1; /* Ocupa o espaço disponível no meio */
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Corta texto longo com "..." para não estourar */
    min-width: 0; /* Essencial para o flexbox permitir encolhimento */
}

/* Mantém largura consistente para data e badge */
.result-details-list li span:nth-child(1) { flex-shrink: 0; }
.result-details-list li span:nth-child(3) { flex-shrink: 0; }

/* === BARRA DE EVOLUÇÃO DAS HORAS (ADICIONADO) === */
.custom-progress-container {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 15px 0;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.custom-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 0.6s ease-in-out;
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
}

/* Estilos de Status para Lista */
.status-feriado { color: #dc3545; font-weight: 600; }
.status-weekend { color: var(--secondary-color); opacity: 0.8; }
.status-util { color: var(--text-color); }

/* Linhas Especiais */
.row-destaque {
    background-color: rgba(0, 113, 227, 0.08);
    border-radius: 8px;
    border-bottom: none !important;
    margin: 5px 0;
}
.row-destaque .badge {
    background-color: var(--primary-color);
    color: #fff;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #eee;
    color: #555;
}
.badge-feriado { background: #fee2e2; color: #991b1b; } 
.badge-fds { background: #fef3c7; color: #92400e; } 
.badge-util { background: #dcfce7; color: #166534; } 

/* =========================================
   4. CARDS DE FERIADOS
   ========================================= */
.holiday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.holiday-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.holiday-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.holiday-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    background: #f0f5ff;
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
}

.holiday-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.holiday-countdown {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-top: 10px;
    margin-bottom: 5px;
}

/* =========================================
   5. DASHBOARD STATS
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
}
.stat-card.blue .stat-value { color: var(--primary-color); }
.stat-card.dark .stat-value { color: #333; }
.stat-card.yellow .stat-value { color: #f59e0b; }
.stat-card.red .stat-value { color: #ef4444; }

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    font-weight: 700;
}

/* =========================================
   6. CONFIGURAÇÕES (DETAILS / ACORDEÃO)
   ========================================= */
details.tool-config {
    background: #f9f9fb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

details.tool-config[open] {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
    cursor: default;
}

summary.tool-config-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    outline: none;
    cursor: pointer;
}

summary.tool-config-title::after {
    content: '+';
    margin-left: auto;
    font-weight: 700;
    font-size: 1.2em;
    color: var(--secondary-color);
    transition: transform 0.2s;
}

details.tool-config[open] summary.tool-config-title::after {
    content: '-';
    color: var(--primary-color);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    cursor: default;
}

.config-item {
    display: flex;
    flex-direction: column;
}

.config-item label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.config-input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    background-color: #fff; 
    font-size: 0.95rem;
}

.config-checks {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.config-check-label {
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* =========================================
   7. CALENDÁRIO LATERAL (LEGACY)
   ========================================= */

/* Container do Calendário */
.interactive-calendar-container {
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.calendar-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text-color);
}

.cal-nav-btn {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
    font-size: 1.2em;
}
.cal-nav-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.calendar-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.85em;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 5px;
}

/* DESTAQUE DE CABEÇALHO (Sábado/Domingo) */
.weekend-label {
    color: #ff6b6b;
    font-weight: 700;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    color: var(--text-color);
}

.cal-day:not(.empty):hover {
    background-color: var(--btn-light-bg);
}

/* FIM DE SEMANA */
.cal-day.weekend {
    background-color: #f9f9f9;
    color: #777;
}

/* FERIADO */
.cal-day.holiday {
    color: #dc3545;
    font-weight: bold;
    background-color: #fff5f5;
    position: relative;
}

/* SELEÇÃO */
.cal-day.selected {
    background-color: var(--primary-color);
    color: #fff !important;
    font-weight: 600;
}

.cal-day.today {
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

/* Lista de Feriados no Rodapé */
.calendar-footer-separator {
    height: 1px;
    background-color: #eee;
    margin: 15px 0 10px 0;
}

.calendar-footer-holidays {
    list-style: none;
    padding: 0 5px;
    margin: 0;
    text-align: left;
    font-size: 0.85rem;
    color: #666;
}

.calendar-footer-holidays li {
    margin-bottom: 4px;
    line-height: 1.3;
}

.calendar-footer-holidays li strong {
    color: #333;
    margin-right: 5px;
}

/* =========================================
   8. RESPONSIVIDADE
   ========================================= */
@media (max-width: 768px) {
    .hub-nav-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    .hub-nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .tool-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .tool-btn-action {
        width: 100%;
        margin-top: 10px;
    }
    .config-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* 2. Correção da Navegação de Anos (Linha Única) */
    .year-navigation {
        flex-wrap: nowrap !important; /* Força botões na mesma linha */
        gap: 8px !important;
        justify-content: space-between;
    }

    .btn-year-nav {
        flex: 1; /* Faz os botões ocuparem espaço igual */
        padding: 8px 5px !important; /* Padding reduzido */
        font-size: 0.8rem !important; /* Fonte menor para caber */
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    /* Ajuste específico para o botão "Ver Calendário" se estiver nesta nav */
    .btn-see-calendar {
        font-size: 0.8rem !important;
        padding: 8px 10px !important;
    }

    /* 3. Correção do Botão 'X' no Modal da Tabela */
    .modal-header-inner {
        position: relative;
        padding-right: 50px; /* Espaço extra na direita para o botão não cobrir texto */
    }

    .close-modal {
        top: 15px !important; /* CORREÇÃO: Fixado no topo */
        right: 15px !important;
        transform: none !important; /* Remove centralização vertical */
        z-index: 2000 !important; /* Garante que fique por cima de tudo */
        width: 32px;
        height: 32px;
        background-color: rgba(0,0,0,0.05); /* Fundo leve para contraste */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        position: absolute !important;
    }
    
    /* 4. Ocultar Coluna do Meio (Dia da Semana) no Mobile */
    .result-details-list li span:nth-child(2) {
        display: none !important;
    }

    /* Ocultar Coluna Dia da Semana na Tabela Principal */
    .calendar-table th:nth-child(3),
    .calendar-table td:nth-child(3) {
        display: none;
    }
}

@media (max-width: 900px) {
    .interactive-calendar-container {
        width: 100%;
        max-width: 400px;
        margin: 20px auto 0;
    }
    .form-group-full-width {
        margin-top: 20px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   9. TABELA DE DETALHES
   ========================================= */
#boxTabelaDetalhes {
    margin-top: 30px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* CORREÇÃO VISUAL: Estilos de Header agora controlados por .details-header-row */
/* Removemos o padding/bg do h6 direto para evitar conflito */
#boxTabelaDetalhes h6 {
    margin: 0;
    background: transparent;
    border: none;
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
}

/* NOVO: Header Flexível para Tabela */
.details-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap; /* Garante que não quebra linha */
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table th, .table td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    background-color: #fff;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* =========================================
   ESTILO DO MENU DE NAVEGAÇÃO (PROPORCIONAL)
   ========================================= */

.hub-menu-container {
    width: 100%;
    margin-bottom: 30px;
    background: transparent;
}

.hub-menu-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

.hub-menu-item {
    flex: 1;
    min-width: 120px;
    display: flex;
}

.hub-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 5px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.hub-menu-link:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #212529;
    text-decoration: none;
    transform: translateY(-1px);
}

.hub-menu-link.active {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.25);
    font-weight: 600;
}

@media (max-width: 768px) {
    .hub-menu-list {
        gap: 5px;
    }
    
    .hub-menu-item {
        min-width: 48%;
        margin-bottom: 5px;
    }
    
    .hub-menu-link {
        font-size: 13px;
        padding: 10px 2px;
    }
}

/* =========================================
   ADDON: Calculadora de Horas Úteis (SLA)
   ========================================= */

/* --- Configuração (Details/Summary) --- */
.tool-config {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.tool-config[open] {
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.tool-config-title {
    padding: 15px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    color: #495057;
    transition: background 0.2s;
}

.tool-config-title:hover {
    background-color: #e9ecef;
}

.tool-config-title::after {
    content: '+'; 
    font-weight: bold; 
    font-size: 1.2em; 
    color: #0d6efd;
}

.tool-config[open] .tool-config-title::after {
    content: '-';
}

/* --- Boxes de Sábado e Domingo --- */
.config-box-day {
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* --- Títulos Internos --- */
.config-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0d6efd;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- ADDON: Botões de Modo (Úteis vs Corridas) --- */
.mode-buttons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    background: #f5f5f7;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.btn-mode {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-mode:hover {
    color: var(--text-color);
    background: rgba(0,0,0,0.03);
}

.btn-mode.active {
    background-color: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* --- ADDON: Presets Rápidos --- */
.presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-preset {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-preset:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- ADDON: Botões Secundários e de Ação (PDF/Print) --- */
.btn-action-secondary {
    height: 42px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-action-secondary:hover {
    background-color: #f8f9fa;
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

/* Novo botão Azul para Print/PDF */
.btn-action-print {
    height: 42px;
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-action-print:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    color: #fff;
}

/* --- ADDON: Granularidade (Diário/Mensal) --- */
/* CORREÇÃO: Botões desgrudados */
.granularity-control-box {
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    justify-content: center;
    gap: 20px; /* Mais espaço no container */
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed var(--border-color);
    margin-top: 25px !important; 
}

.granularity-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-right: 15px; /* Margem extra */
    white-space: nowrap;
}

/* NOVO: Estilos reforçados para botões de granularidade */
.granularity-btn-group {
    display: flex; 
    gap: 10px; 
    flex-wrap: nowrap; /* Garante que não quebre linha */
    background: transparent;
    border: none;
    overflow-x: auto; /* Permite scroll se necessário */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.btn-granularity {
    border: 1px solid var(--border-color);
    border-radius: 8px !important; /* Bordas arredondadas em ambos */
    background: #fff;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--secondary-color);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-granularity:last-child {
    border: 1px solid var(--border-color); /* Restaura borda */
}

.btn-granularity:hover {
    border-color: #bbb;
    background-color: #f8f9fa;
}

.btn-granularity.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(0, 113, 227, 0.25);
}

/* =========================================
   ADDON: CALENDÁRIO VISUAL COMPARTILHADO (Relatório + Escalas)
   ========================================= */
#calendarioEscala, #calendarioVisual {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.relatorio-mes {
    break-inside: avoid;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.relatorio-mes-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 8px;
    text-transform: capitalize;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 4px;
}

.relatorio-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.relatorio-header-day {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #adb5bd;
    margin-bottom: 2px;
}

.relatorio-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 4px;
    background: #f8f9fa;
    color: #ced4da;
    cursor: default;
    position: relative;
}

.relatorio-day.day-disabled { background: transparent; color: transparent; }
.relatorio-day.empty { background: transparent; }

/* =========================================
   ADDON: Calculadora de Escalas (Página C - Específico)
   ========================================= */

/* --- Correção: Atalho 12x36 Desgrudado --- */
.parity-options {
    display: none; 
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 40px; /* Adicionado espaço extra abaixo */
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}
.btn-parity {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.btn-parity:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    background: #f0f8ff;
}

/* Legenda de Turnos */
.scale-legend {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.legend-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Modificadores de Dia para Escala */
.relatorio-day.scale-work {
    background-color: #fff7ed; 
    color: #c2410c; 
    border: 1px solid #ffedd5;
    font-weight: 700;
    position: relative;
}
.relatorio-day.scale-work::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background-color: #f97316;
    border-radius: 50%;
}

.relatorio-day.scale-night {
    background-color: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ede9fe;
    font-weight: 700;
    position: relative;
}
.relatorio-day.scale-night::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background-color: #8b5cf6;
    border-radius: 50%;
}

.relatorio-day.scale-mixed {
    background: linear-gradient(135deg, #fff7ed 50%, #f5f3ff 50%);
    color: #333;
    font-weight: 700;
    border: 1px solid #ddd;
    overflow: hidden;
    position: relative;
}

.dot-indicator {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    z-index: 2;
}
.dot-day {
    background-color: #f97316;
    top: 4px;
    left: 4px;
}
.dot-night {
    background-color: #8b5cf6;
    bottom: 4px;
    right: 4px;
}

.relatorio-day.scale-off {
    background-color: #f8f9fa;
    color: #adb5bd;
    opacity: 0.5;
}

.relatorio-day.day-ferias {
    background-color: #cff4fc;
    color: #055160;
    font-weight: bold;
}

.is-holiday-border {
    border: 2px solid #dc3545 !important;
}

/* Resumo Mensal (Rodapé do Calendário) */
.monthly-summary {
    margin-top: 10px;
    padding: 8px 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
    font-size: 0.8rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    color: #555;
}

.summary-val {
    font-weight: 700;
    color: #333;
}

/* =========================================
   ESTILOS ESPECÍFICOS: Resumo e Férias (Página C)
   ========================================= */

/* --- 1. Módulo de Férias e Afastamentos --- */
.vacation-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.vacation-input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 6px;
    display: block;
}

.vacation-date-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    color: #495057;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.vacation-date-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.btn-add-vacation {
    height: 42px;
    padding: 0 25px;
    background-color: #198754;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-vacation:hover {
    background-color: #157347;
}

.vacation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vacation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: transform 0.1s;
}

.vacation-item:hover {
    transform: translateX(2px);
    border-color: #ccc;
}

/* --- 2. Box de Resumo Final (Dashboard) --- */
#boxRelatorioFinal {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    animation: fadeIn 0.5s ease;
}

#boxRelatorioFinal h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Correção: Cards de Horas (Diurnas/Noturnas/Total) --- */
/* Força layout Grid para evitar que ocupem linha toda ou fiquem colados */
#boxRelatorioFinal .row.text-center {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px; /* Espaço entre cards */
    margin-bottom: 30px;
}
/* Reseta margens negativas do bootstrap se houver */
#boxRelatorioFinal .row.text-center > div {
    width: auto;
    margin: 0;
    padding: 0;
}

.report-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s;
}
.report-card:hover { transform: translateY(-3px); }

.report-val {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.2;
}
.report-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Cores Semânticas */
.text-diurno { color: #f97316; }
.text-noturno { color: #8b5cf6; }
.text-total { color: #0d6efd; }
.bg-work-light { background-color: #fff7ed; border-color: #ffedd5; }
.bg-free-light { background-color: #f8f9fa; border-color: #e9ecef; }

/* Listas de Feriados */
.report-list-col {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    border: 1px solid #f0f0f0;
}
.report-list-header {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
    letter-spacing: 0.5px;
}
.text-danger-custom { color: #dc3545; }
.text-success-custom { color: #198754; }

.report-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    max-height: 200px;
    overflow-y: auto;
}
.report-list-items li {
    padding: 5px 0;
    border-bottom: 1px dashed #e9ecef;
}
.report-list-items li:last-child { border-bottom: none; }

/* --- Correção: Stats de Fim de Semana (Colunas Separadas) --- */
.weekend-stats-grid {
    display: grid;
    /* Desktop: 4 colunas (Sab T | Sab F | Dom T | Dom F) */
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.weekend-stat-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.weekend-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}
.weekend-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    margin-top: 5px;
    line-height: 1.3;
}

/* =========================================
   10. DASHBOARD DE NAVEGAÇÃO DE ANOS (PREMIUM)
   ========================================= */
.year-nav-dashboard {
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.year-nav-main-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.year-nav-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 113, 227, 0.1);
    border-color: var(--primary-color);
}

.year-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.year-main-content {
    display: flex;
    align-items: center;
    padding: 30px;
    gap: 25px;
    flex-wrap: wrap;
}

.year-icon-area {
    background: var(--primary-color);
    color: #fff;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
    flex-shrink: 0;
}

.year-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.year-text-area {
    flex: 1;
    min-width: 200px;
}

.year-text-area h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.year-action-area {
    flex-shrink: 0;
}

.btn-year-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--text-color); /* Contraste forte */
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-year-main:hover {
    background-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.25);
    color: #fff;
}

/* Timeline Inferior */
.year-nav-timeline {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.timeline-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
}

.timeline-pills {
    display: flex;
    gap: 15px;
}

.timeline-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #f1f3f5;
    color: var(--text-color);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.2s;
}

.timeline-pill:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================
   11. DARK MODE CORRECTIONS (ESTILO HUB)
   ========================================= */
body.dark-mode {
    --card-bg: #1c1c1e;
    --text-color: #f5f5f7;
    --secondary-color: #a1a1a6;
    --border-color: #38383a;
    --bg-color: #000000;
    --primary-color: #0a84ff;
}

body.dark-mode .tool-container,
body.dark-mode .holiday-card,
body.dark-mode .result-box-highlight,
body.dark-mode .tool-select, 
body.dark-mode .tool-input,
body.dark-mode .interactive-calendar-container,
body.dark-mode #boxTabelaDetalhes,
body.dark-mode .stat-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode .interactive-calendar-container {
    border-color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.dark-mode .tool-select:focus, 
body.dark-mode .tool-input:focus {
    border-color: var(--primary-color);
}

body.dark-mode .holiday-icon {
    background-color: #2c2c2e;
}
body.dark-mode .holiday-title {
    color: #fff;
}

body.dark-mode .result-main-text,
body.dark-mode .result-main-text * {
    color: #fff !important;
}
body.dark-mode .result-sub-text {
    color: #aaa;
}

body.dark-mode .result-details-list li {
    border-bottom-color: #333;
    color: #e0e0e0;
}
body.dark-mode .result-details-list li strong,
body.dark-mode .result-details-list li span:not(.badge) {
    color: #e0e0e0;
}
body.dark-mode .text-muted {
    color: #a1a1a6 !important;
}

body.dark-mode .stat-card.dark .stat-value {
    color: #fff;
}

body.dark-mode .cal-nav-btn {
    background-color: #2c2c2e;
    border-color: #48484a;
    color: #e0e0e0;
}
body.dark-mode .cal-nav-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
body.dark-mode .cal-day:not(.empty):hover {
    background-color: #3a3a3c;
}
body.dark-mode .cal-day.weekend {
    background-color: #2a2a2a;
    color: #98989d;
}
body.dark-mode .cal-day.holiday {
    background-color: #3e2020;
    color: #ff6b6b;
}
body.dark-mode .cal-day:not(.weekend):not(.holiday):not(.selected):not(.today) {
    color: #e0e0e0;
}
body.dark-mode .calendar-footer-separator {
    background-color: #444;
}
body.dark-mode .calendar-footer-holidays {
    color: #aaa;
}
body.dark-mode .calendar-footer-holidays li strong {
    color: #ddd;
}

body.dark-mode .hub-menu-link {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    color: #e0e0e0;
}
body.dark-mode .hub-menu-link:hover {
    background-color: #3a3a3c;
    color: #fff;
}
body.dark-mode .hub-menu-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

body.dark-mode details.tool-config {
    background-color: #1c1c1e;
}
body.dark-mode details.tool-config[open] {
    background-color: #2c2c2e;
}
body.dark-mode .config-input {
    background-color: #1c1c1e;
    border-color: #48484a;
    color: #fff;
}
body.dark-mode #boxTabelaDetalhes h6 {
    background-color: transparent; /* Reset para details-header-row */
    color: #fff;
}
body.dark-mode .details-header-row {
    background-color: #2c2c2e;
    border-bottom-color: #444;
}

body.dark-mode .table th {
    background-color: #2c2c2e;
    color: #aaa;
    border-bottom-color: #444;
}
body.dark-mode .table td {
    border-bottom-color: #333;
}
body.dark-mode .table tbody tr:hover {
    background-color: #2c2c2e;
}

body.dark-mode .tool-config-title { background-color: #333; color: #e0e0e0; }
body.dark-mode .tool-config-title:hover { background-color: #3f3f3f; }
body.dark-mode .config-box-day { background-color: rgba(255, 255, 255, 0.05); border-color: #555; }
body.dark-mode .config-section-title { color: #6ea8fe; border-bottom-color: #555; }

body.dark-mode .status-feriado { color: #ff6b6b; }
body.dark-mode .status-weekend { color: #a1a1a6; }
body.dark-mode .status-util { color: #e0e0e0; }
body.dark-mode .row-destaque { background-color: rgba(10, 132, 255, 0.2); }
body.dark-mode .row-destaque .badge { background-color: var(--primary-color); color: #fff; }
body.dark-mode .badge { background-color: #333; color: #ddd; }

/* Dark Mode: Novos Elementos de Ano */
body.dark-mode .year-nav-main-card {
    background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
    border-color: #444;
}
body.dark-mode .year-text-area h3 { color: #fff; }
body.dark-mode .btn-year-main { background-color: #fff; color: #000; }
body.dark-mode .btn-year-main:hover { background-color: var(--primary-color); color: #fff; }
body.dark-mode .year-nav-timeline { background: #1c1c1e; border-color: #444; }
body.dark-mode .timeline-pill { background: #333; color: #ccc; }
body.dark-mode .timeline-pill:hover { background: var(--primary-color); color: #fff; }

/* FIX COR DE FUNDO DOS MESES PASSADOS */
body.dark-mode .calendar-table .row-passed { background-color: transparent; }

/* Dark Mode: Buttons */
body.dark-mode .btn-action-secondary {
    background-color: #2c2c2e;
    border-color: #444;
    color: #fff;
}
body.dark-mode .btn-action-secondary:hover {
    background-color: #333;
}

body.dark-mode .btn-action-print {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
body.dark-mode .btn-action-print:hover {
    background-color: var(--primary-hover);
}

body.dark-mode .granularity-control-box {
    background-color: #1c1c1e;
    border-color: #333;
}
body.dark-mode .granularity-btn-group {
    border-color: #333;
    background-color: transparent;
}
body.dark-mode .btn-granularity {
    background-color: #2c2c2e;
    color: #aaa;
    border-color: #444;
}
body.dark-mode .btn-granularity.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Botão de Imprimir (Ajuste Visual) --- */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-print {
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-print:hover {
    background-color: #f8f9fa;
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

body.dark-mode .btn-print {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}
body.dark-mode .btn-print:hover {
    background-color: #2c2c2e;
    border-color: #666;
}

/* --- Navegação de Anos (Abas) --- */
.year-selector {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.year-link {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f1f3f5;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.year-link:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.year-link.active {
    background: var(--primary-color);
    color: #fff;
}

body.dark-mode .year-link {
    background: #2c2c2e;
    color: #aaa;
}
body.dark-mode .year-link.active {
    background: var(--primary-color);
    color: #fff;
}

/* --- NOVA NAVEGAÇÃO NA TABELA + BOTÕES ATUALIZADOS --- */
.year-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-year-nav {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color); 
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn-year-nav:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.btn-see-calendar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background: #fff;
    color: var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-see-calendar:hover {
    background: #f0f7ff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 113, 227, 0.15);
}

body.dark-mode .btn-year-nav {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
body.dark-mode .btn-year-nav:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}
body.dark-mode .btn-see-calendar {
    background: var(--card-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
}
body.dark-mode .btn-see-calendar:hover {
    background: rgba(10, 132, 255, 0.1);
}

/* --- Tabela Interativa (Clickable Row) --- */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}
.clickable-row:hover {
    background-color: #f0f7ff !important;
}
body.dark-mode .clickable-row:hover {
    background-color: #2c2c2e !important;
}

/* --- ESTILOS DO MODAL DE DETALHES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    
    /* ALTERAÇÃO: Estrutura Flex para Rodapé Fixo */
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Altura máxima da viewport */
    padding: 0; /* Remove padding global, gerenciado internamente */
    overflow: hidden; /* Evita scroll no container principal */
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

/* Área de Cabeçalho do Modal (Título + Botão Fechar) */
.modal-header-inner {
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    flex-shrink: 0; /* Não encolhe */
    position: relative;
}

/* Corpo com Scroll */
.modal-body-inner {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1; /* Ocupa espaço restante */
    -webkit-overflow-scrolling: touch;
}

/* Rodapé Fixo */
.modal-footer-bar {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
    text-align: center;
    flex-shrink: 0; /* Não encolhe */
}

/* Botão Fechar (X) - Ajuste de Z-Index e Posição Mobile */
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    
    /* Melhorias Mobile */
    z-index: 100;
    background: rgba(0,0,0,0.05); /* Fundo sutil para melhor clique */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--primary-color);
    background: rgba(0,0,0,0.1);
}

/* Botão de Fechar no Rodapé (Estilo) */
.btn-close-modal-action {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    padding: 10px 0;
    border-radius: 30px;
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

.btn-close-modal-action:hover {
    background-color: var(--text-color);
    color: var(--card-bg);
    border-color: var(--text-color);
}

.modal-result-box {
    text-align: center;
    padding: 10px;
}
.modal-result-box .result-main-text,
.modal-result-box .result-sub-text,
.modal-result-box .result-details-list {
    display: block; 
}

/* Dark Mode Updates para o Modal */
body.dark-mode .modal-content {
    background-color: #1c1c1e;
    border-color: #333;
}
body.dark-mode .modal-header-inner {
    background-color: var(--card-bg);
    border-bottom-color: var(--border-color);
}
body.dark-mode .modal-footer-bar {
    background-color: #2c2c2e; /* Contraste leve */
    border-top-color: var(--border-color);
}
body.dark-mode .close-modal {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
body.dark-mode .btn-close-modal-action {
    color: #fff;
    border-color: #666;
}
body.dark-mode .btn-close-modal-action:hover {
    background-color: #fff;
    color: #000;
}

/* --- CALLOUT BOX (Substitui .note-box) --- */
.callout {
    padding: 15px 20px;
    border-left: 4px solid var(--primary-color);
    background: #f8f9fa;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    color: var(--text-color);
    font-size: 0.9rem;
}
.callout strong {
    color: var(--primary-color);
}
body.dark-mode .callout {
    background-color: #2c2c2e;
    border-left-color: var(--primary-color);
    color: #e0e0e0;
}

/* Responsividade Extra para Dashboard de Anos */
@media (max-width: 768px) {
    .vacation-input-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .btn-add-vacation {
        margin-top: 5px;
    }
    .weekend-stats-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
    #boxRelatorioFinal .row.text-center {
        grid-template-columns: 1fr;
    }
    
    /* Dashboard Anos */
    .year-main-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .year-text-area {
        min-width: auto;
    }
    .btn-year-main {
        width: 100%;
        justify-content: center;
    }
    .year-nav-timeline {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   12. ESTILOS ESPECÍFICOS: Quantos Dias Faltam (Novo)
   ========================================= */

/* Hero e Cabeçalho */
.event-hero {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}
.event-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}
.event-icon-wrapper {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

/* Countdown em Destaque */
.countdown-highlight-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 3rem;
}
.featured-countdown {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem 3rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--border-color);
    min-width: 300px;
    max-width: 100%;
}
.countdown-label-top {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
}
.countdown-days.big-number {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin: 10px 0;
}
.countdown-days .unit-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-left: 5px;
    vertical-align: middle;
}
.countdown-target-date {
    font-size: 1.1rem;
    color: #555;
    background: #f0f0f5;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

/* Micro Cards (Stats) */
.micro-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 700px;
}
.micro-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.micro-card-icon { font-size: 1.5rem; margin-bottom: 5px; display: block; }
.micro-card-value { font-size: 1.25rem; font-weight: 700; color: var(--text-color); display: block; }
.micro-card-label { font-size: 0.8rem; color: var(--secondary-color); margin-top: 2px; display: block; }

@media (max-width: 600px) {
    .micro-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-countdown { width: 100%; padding: 1.5rem; }
    .countdown-days.big-number { font-size: 3.5rem; }
}

/* Conteúdo Editorial */
.rich-content-section {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
}
.rich-content-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--text-color);
}
.rich-content-section p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.curiosities-box {
    background: #fff8e1; /* Amarelo clarinho */
    border-left: 5px solid #ffc107;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    color: #333;
}
.curiosities-box h3 { margin-top: 0; color: #d39e00; font-size: 1.2rem; }
.curiosities-box ul { padding-left: 20px; margin-bottom: 0; }
.curiosities-box li { margin-bottom: 8px; }

/* Tabela de Próximas Datas */
.future-dates-section {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}
.future-dates-section table { width: 100%; border-collapse: collapse; }
.future-dates-section th { background: #343a40; color: #fff; padding: 12px; }
.future-dates-section td { padding: 12px; border-bottom: 1px solid #eee; }

/* Lista de Eventos (Grid) */
.countdown-boxes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}
.countdown-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.countdown-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}
.countdown-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.countdown-icon { font-size: 1.4rem; }
.countdown-days {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Botão Pill */
.btn-pill-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,113,227,0.3);
    transition: all 0.3s ease;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}
.btn-pill-action:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,113,227,0.4);
}
.btn-ver-todos-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 15px;
}

/* FAQs Interativas */
.faq-interactive-section {
    max-width: 800px;
    margin: 0 auto;
}
.faq-container-interactive {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-item-interactive {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}
.faq-item-interactive.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.faq-question-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-toggle-icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
    transform: rotate(45deg);
    transition: transform 0.3s;
}
.faq-item-interactive.active .faq-toggle-icon {
    transform: rotate(-135deg);
    border-color: var(--primary-color);
}
.faq-answer-interactive {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-color);
}
.faq-item-interactive.active .faq-answer-interactive {
    max-height: 1000px;
    transition: max-height 0.3s ease-in;
}
.faq-answer-interactive-content {
    padding: 15px 20px;
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Dark Mode para Novos Elementos */
body.dark-mode .event-hero h1, 
body.dark-mode .countdown-box h3,
body.dark-mode .rich-content-section, 
body.dark-mode .rich-content-section h3,
body.dark-mode .micro-card-value,
body.dark-mode .faq-question-btn {
    color: #f5f5f7;
}
body.dark-mode .countdown-target-date {
    background: #333;
    color: #ddd;
}
body.dark-mode .curiosities-box {
    background: #332b00;
    color: #ddd;
    border-left-color: #ffc107;
}
body.dark-mode .curiosities-box h3 { color: #ffc107; }
body.dark-mode .future-dates-section th { background: #222; }
body.dark-mode .future-dates-section td { border-bottom-color: #333; color: #ddd; }
body.dark-mode .faq-answer-interactive { background: #111; }
body.dark-mode .faq-answer-interactive-content { color: #ccc; }

/* =========================================
   IMPRESSÃO (Correção para Quinto Dia Útil e Geral)
   ========================================= */
@media print {
    /* 1. Reset Global */
    @page {
        margin: 1.0cm; /* Margem reduzida para caber em uma página */
        size: auto;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        /* Oculta tudo visualmente, mas mantém layout para não quebrar */
        visibility: hidden !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* FORÇAR RESET DE CORES DARK MODE NA IMPRESSÃO */
    body.dark-mode, body.dark-mode * {
        background-color: #fff !important;
        color: #000 !important;
        border-color: #000 !important;
    }

    /* 2. Ocultar Elementos Específicos */
    header, footer, .hub-nav-wrapper, .tool-hero, .tool-container, 
    .cookie-banner, .modal, .action-bar, .nav-controls, .year-navigation,
    .faq-interactive-section, .article-content, #menu-navegacao,
    .btn-print, button, .hide-in-print, .year-nav-dashboard,
    /* NOVOS ELEMENTOS OCULTOS */
    .event-hero, .featured-countdown, .micro-cards-grid, .countdown-boxes-container, .btn-ver-todos-wrapper {
        display: none !important;
    }

    /* 3. Exibir Apenas a Tabela Anual e Área de Impressão */
    #tabela-anual, #printAreaContent {
        visibility: visible !important;
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }

    /* Visibilidade dos filhos */
    #tabela-anual *, #printAreaContent * {
        visibility: visible !important;
    }

    /* 4. Estilização da Tabela para Impressão */
    .calendar-table {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 2px solid #000 !important;
        font-size: 9pt !important; /* Fonte reduzida */
    }

    .calendar-table th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
        font-weight: bold !important;
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        padding: 5px !important;
    }

    .calendar-table td {
        border: 1px solid #000 !important;
        padding: 5px !important;
        color: #000 !important;
        background-color: #fff !important;
    }

    /* Estilo da Tabela de Detalhes na Impressão (Calculadora Horas) */
    .print-table-details {
        width: 100% !important;
        border-collapse: collapse;
        font-size: 9pt;
        margin-top: 10px;
        table-layout: fixed; /* Evita estouro lateral */
        word-wrap: break-word;
    }
    .print-table-details th, 
    .print-table-details td {
        border: 1px solid #999;
        padding: 6px;
        text-align: left;
    }
    .print-table-details th {
        background-color: #eee !important;
        font-weight: bold;
        -webkit-print-color-adjust: exact;
    }

    /* Estilo do Relatório de Impressão */
    .print-header {
        text-align: center;
        border-bottom: 2px solid #000;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    .print-header h2 { margin: 0; font-size: 18pt; text-transform: uppercase; }
    .print-date { font-size: 10pt; color: #555; }

    .print-section { margin-bottom: 25px; }
    .print-section h3 {
        font-size: 12pt;
        border-bottom: 1px solid #ccc;
        margin-bottom: 10px;
        padding-bottom: 5px;
        color: #000;
    }

    .print-table-info { width: 100%; font-size: 11pt; }
    .print-table-info td { padding: 4px 0; }

    .result-highlight-box {
        border: 1px solid #000;
        padding: 15px;
        background-color: #f9f9f9 !important;
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact;
        text-align: center;
    }
    .final-date { font-size: 16pt; font-weight: bold; margin-bottom: 5px; }
    .final-duration { font-size: 12pt; color: #333; }

    .print-footer {
        margin-top: 40px;
        text-align: center;
        font-size: 9pt;
        border-top: 1px solid #ccc;
        padding-top: 10px;
        color: #555;
    }

    /* Ocultar elementos de ação dentro da tabela, se houver */
    #tabela-anual .action-row,
    #tabela-anual button {
        display: none !important;
    }

    /* 5. Cabeçalho e Rodapé via CSS (Tabela Anual) */
    #tabela-anual::before {
        content: "ContadorDePrazo.com.br";
        display: block;
        text-align: center;
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 10px;
        padding-bottom: 5px;
        border-bottom: 2px solid #000;
    }

    #tabela-anual::after {
        content: "Acesse: www.contadordeprazo.com.br";
        display: block;
        text-align: center;
        font-size: 9pt;
        color: #555;
        margin-top: 15px;
        padding-top: 5px;
        border-top: 1px solid #ccc;
    }

    /* 6. Nota Técnica Compactada */
    .callout {
        border: 1px solid #000 !important;
        border-left: 1px solid #000 !important;
        background: none !important;
        color: #000 !important;
        font-size: 8pt !important; /* Fonte reduzida */
        padding: 5px 10px !important;
        margin-top: 10px !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
        page-break-inside: avoid;
    }
    
    /* Evitar quebra de página dentro de linhas */
    tr { page-break-inside: avoid; }
}