:root {
    --primary-color: #2596be;
    --bg-color: #f4faff;
    --text-color: #2c3e50;
    --white: #ffffff;
    --accent-color: #e1f1f7;
    --range-green: #2ecc71;
    --range-yellow: #f39c12;
    --range-red: #e74c3c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

header {
    background: linear-gradient(135deg, var(--primary-color), #5eb1d1);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 50px 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

header h1 { font-size: 3.5rem; margin-bottom: 15px; }
.subtitle { font-size: 1.4rem; font-weight: 300; opacity: 0.9; }

.controls-full-width { margin-top: -40px; display: flex; flex-direction: column; gap: 20px; }

.dropdown-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 25px;
}

.dropdown-wrapper label {
    font-size: 1.4rem; 
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

select {
    flex-grow: 1;
    padding: 15px;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.countdown-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    border-left: 10px solid var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
}

.days-urgent { color: var(--range-green); }
.days-soon { color: var(--range-yellow); }
.days-far { color: var(--range-red); }

/* DESTAQUE DO PRÓXIMO FERIADO */
.next-holiday-row {
    background-color: #f0faff !important;
    outline: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
}

.table-section { margin-top: 40px; }
#table-title { margin-bottom: 25px; color: var(--primary-color); font-size: 2.2rem; }

/* CORREÇÃO DO SCROLL MOBILE */
.table-responsive {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 0;
    min-width: 800px; /* Garante espaço para todas as colunas */
}

th { 
    background-color: var(--accent-color); 
    padding: 20px 15px; 
    text-align: left; 
    font-size: 0.9rem; 
    text-transform: uppercase;
    white-space: nowrap;
}

td { 
    padding: 20px 15px; 
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

/* Coluna do nome do feriado pode quebrar linha */
td:nth-child(4) { white-space: normal; min-width: 200px; }

.type-tag { padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: bold; }
.tag-nacional { background: #d1ecf1; color: #0c5460; }
.tag-estadual { background: #fff3cd; color: #856404; }

footer { text-align: center; padding: 60px; opacity: 0.6; }

@media (max-width: 768px) {
    header h1 { font-size: 2.2rem; }
    .subtitle { font-size: 1.1rem; }
    .dropdown-wrapper { flex-direction: column; align-items: stretch; gap: 10px; }
    .dropdown-wrapper label { text-align: center; font-size: 1.2rem; }
    .countdown-card { font-size: 1.2rem; padding: 20px; }
}