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

body {
    font-family: sans-serif;
    font-size: 14px;
    background: #f5f5f5;
}

#ifn3-container {
    width: 960px;
    margin-left: auto;
    margin-right: auto;
    background: white;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tabs-main {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    border-bottom: 3px solid #00572C;
}

.tab-btn {
    background: #00572C;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    border-radius: 5px 5px 0 0;
    opacity: 0.7;
}

.tab-btn:hover {
    opacity: 0.9;
}

.tab-btn.active {
    opacity: 1;
    background: #00572C;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.tabs-sub {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.sub-tab-btn {
    background: #00572C;
    color: white;
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    transition: all 0.3s;
    border-radius: 4px;
    opacity: 0.6;
}

.sub-tab-btn:hover {
    opacity: 0.8;
}

.sub-tab-btn.active {
    opacity: 1;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#table-selector-container {
    margin: 20px 0;
}

.ifn3-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    background: #FFF;
    border: 2px solid #00572C;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.ifn3-select:focus {
    outline: none;
    border-color: #003d1f;
    box-shadow: 0 0 5px rgba(0,87,44,0.3);
}

#ifn3-table-container {
    width: 100%;
    margin-top: 20px;
}

#tableContent {
    width: 100%;
}

#tableContent h3 {
    text-align: center;
    margin: 20px 0 15px;
    font-size: 22px;
}

.ifn3Table {
    border-collapse: collapse;
    margin: 15px auto;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ifn3Table td,
.ifn3Table th {
    padding: 8px;
    border: 1px solid #000;
    text-align: center;
}

.ifn3Table thead th {
    background: #77C94B;
    color: #000;
    font-weight: bold;
    padding: 10px 8px;
}

.ifn3Table tbody td {
    background: #FFFFFF;
}

.ifn3Table .ifn3Subtema {
    background: #77C94B !important;
    font-weight: normal;
    text-align: center;
}

.ifn3Table .ifn3Total {
    background: #C6D870 !important;
    font-weight: bold;
}

.nota-subsol {
    font-size: 12px;
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

.loading, .error {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
}

.loading {
    color: #00572C;
}

.error {
    color: #d32f2f;
}

.download-csv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #00572C;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    padding: 5px;
}

.download-csv-btn:hover {
    color: #003d1f;
    opacity: 0.7;
}

.download-csv-btn svg {
    width: 24px;
    height: 24px;
}

.column-content h1 {
    text-align: center;
}

@media screen and (max-width: 1024px) {
    #ifn3-container {
        padding: 15px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .sub-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}