/* RESET E ESTRUTURA GLOBAL */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-muted: #94a3b8;
    --border-color: #f0f2f5;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #9b59b6;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

body { 
    background-color: var(--bg-color); 
    display: flex; 
    overflow: hidden; 
}

.container { 
    display: flex; 
    width: 100%; 
}

/* SIDEBAR */
.sidebar { 
    width: 250px; 
    height: 100vh; 
    background: var(--primary-color); 
    color: white; 
    padding: 20px; 
    position: fixed; 
    z-index: 1000; 
}

.sidebar h2 { 
    margin-bottom: 20px; 
    color: var(--accent-color); 
    font-size: 1.2rem; 
    text-align: center; 
}

.sidebar ul { 
    list-style: none; 
}

.sidebar ul li a { 
    color: #bdc3c7; 
    text-decoration: none; 
    padding: 12px; 
    display: block; 
    border-radius: 5px; 
    transition: background 0.3s, color 0.3s; 
}

.sidebar ul li a.active { 
    background: #34495e; 
    color: white; 
    border-left: 4px solid var(--accent-color); 
}

.sidebar hr { 
    border: 0; 
    border-top: 1px solid #455a64; 
    margin: 15px 0; 
}

/* CONTEÚDO PRINCIPAL */
.content { 
    margin-left: 250px; 
    padding: 20px 40px; 
    width: calc(100% - 250px); 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
}

.header-dashboard { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    flex-shrink: 0; 
}

h1 { 
    font-size: 1.8rem; 
    color: #000; 
    font-weight: bold; 
}

.header-controls { 
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap; 
}

.filter-group { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    background: var(--card-bg); 
    padding: 8px 12px; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

.filter-group label { 
    font-size: 0.75rem; 
    font-weight: bold; 
    color: #555; 
    text-transform: uppercase;
}

.filter-group select { 
    border: 1px solid #ddd; 
    padding: 4px; 
    border-radius: 4px; 
    font-size: 0.8rem; 
    outline: none; 
    cursor: pointer; 
}

/* ÁREA DE ROLAGEM PRINCIPAL */
.dashboard-scroll-area { 
    flex-grow: 1; 
    overflow-y: auto; 
    padding-right: 10px; 
    padding-bottom: 40px; 
}

.dashboard-scroll-area::-webkit-scrollbar { width: 8px; }
.dashboard-scroll-area::-webkit-scrollbar-thumb { background: #bbb; border-radius: 10px; }

/* GRIDS DE CARDS STATS */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    gap: 12px; 
    margin-bottom: 20px; 
}

.card-stat { 
    background: var(--card-bg); 
    padding: 15px; 
    border-radius: 10px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    text-align: center; 
}

.card-stat h3 { 
    font-size: 0.8rem; 
    color: black; 
    text-transform: uppercase; 
    margin-bottom: 5px; 
}

.card-stat p { 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: var(--primary-color); 
}

.card-stat span { font-size: 0.65rem; color: black; }

/* ESTILIZAÇÃO DOS 6 CARTÕES */
.anniversaries-container, .summary-row { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    margin-bottom: 20px; 
}

.card-large, .card-summary { 
    background: var(--card-bg); 
    padding: 20px; 
    border-radius: 10px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    height: 350px; 
    display: flex;
    flex-direction: column;
}

.card-header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid var(--border-color); 
    margin-bottom: 15px; 
    padding-bottom: 10px; 
    flex-shrink: 0;
}

.card-header-flex h3, .card-summary h3 {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: bold;
}

/* LISTAS INTERNAS COM ROLAGEM */
.anniversary-list, .summary-list { 
    list-style: none; 
    padding: 0; 
    overflow-y: auto; 
    flex-grow: 1; 
    padding-right: 5px;
}

.anniversary-list::-webkit-scrollbar, .summary-list::-webkit-scrollbar { width: 4px; }
.anniversary-list::-webkit-scrollbar-thumb, .summary-list::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }

.anniversary-item, .summary-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 0; 
    border-bottom: 1px solid #f1f5f9; 
    font-size: 0.85rem; 
}

.anniversary-item.highlight-today {
    background-color: #f0f9ff;
    border-left: 4px solid var(--accent-color);
    padding-left: 8px;
    font-weight: 600;
}

.anniversary-date, .qty { font-weight: bold; color: var(--accent-color); }

.empty-info { 
    color: var(--text-muted); 
    font-style: italic; 
    font-size: 0.85rem; 
    padding: 20px 0; 
    text-align: center; 
}

/* CORES DOS CARTÕES DE RESUMO */
.red { border-top: 5px solid var(--danger-color); } 
.green { border-top: 5px solid var(--success-color); } 
.orange { border-top: 5px solid var(--warning-color); }

.summary-item .qty { 
    background: var(--border-color); 
    padding: 2px 8px; 
    border-radius: 4px; 
    color: var(--text-primary);
}

/* TIMELINE */
.timeline-section {
    height: auto !important; 
}

.card-header-timeline { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid var(--border-color); 
    margin-bottom: 15px; 
    padding-bottom: 10px; 
}

.timeline-title { 
    font-size: 1rem; 
    color: var(--text-primary); 
    font-weight: 800; 
}

.timeline-filters { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
}

.filter-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.filter-item label { 
    font-size: 0.6rem; 
    font-weight: bold; 
    color: black; 
    text-transform: uppercase; 
}

.timeline-wrapper { 
    overflow-x: auto; 
    border: 2px solid black; 
    border-radius: 4px; 
    width: 100%;
}

#tabela-ferias-timeline { 
    border-collapse: separate; 
    border-spacing: 0; 
    width: max-content; 
    table-layout: fixed; 
}

#tabela-ferias-timeline th, 
#tabela-ferias-timeline td { 
    border: 1px solid #555;
    width: 42.45px; 
    height: 25px; 
    text-align: center; 
    font-size: 0.60rem; 
    vertical-align: middle; 
}

#tabela-ferias-timeline thead th { 
    background: var(--primary-color); 
    color: white; 
    height: 45px; 
    line-height: 1.1;
    padding: 4px 2px;
}

.col-fixa { 
    position: sticky; 
    left: 0; 
    background: #f8f9fa !important; 
    z-index: 50 !important; 
    width: 180px !important; 
    min-width: 180px !important;
    color: black !important; 
    font-weight: bold; 
    border-right: 2px solid black !important; 
    text-align: left !important;
    padding-left: 8px !important;
}

.col-vencimento { 
    position: sticky; 
    left: 180px; 
    background: #fdfdfd !important; 
    z-index: 50 !important; 
    width: 85px !important; 
    min-width: 85px !important;
    color: var(--danger-color) !important; 
    font-weight: bold; 
    border-right: 2px solid black !important; 
}

.vacation-info-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 20px;
    border-left: 5px solid var(--info-color); 
}

.vacation-info-card h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    text-transform: uppercase;
    font-weight: 800;
}

.vacation-info-card p {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    line-height: 1.5;
}

.vacation-info-card i {
    color: var(--info-color);
    margin-right: 8px;
}