/* ==========================================
   RESET GENERALE E BASE
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Titillium Web', sans-serif;
    background-color: #ffffff;
    color: #333333;
    padding-bottom: 60px;
}

/* HEADER SUPERIORE BLU MINISTERIALE */
.blue-header {
    background-color: #1d7fd8;
    color: #ffffff;
    padding: 16px 40px;
    display: flex;
    align-items: center;
}

.blue-header img {
    height: 45px;
    width: auto;
    margin-right: 18px;
    display: block;
}

.blue-header h1 {
    font-size: 23px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* CONTENITORE AMPIO ANTICAPO */
.page-container {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    padding: 25px 0;
}

/* TITOLI */
.page-title {
    color: #0b3b6e;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.results-main-title {
    color: #00254d;
    font-size: 28px;
    font-weight: 400;
    margin-top: 10px;
    margin-bottom: 25px;
}

/* ==========================================
   BOX INFORMATIVI (VERDI)
   ========================================== */
.green-info-box {
    background-color: #e5efde;
    border: 1px solid #c8d8c0;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.green-info-table {
    border-collapse: collapse;
    font-size: 14px;
    color: #445040;
}

.green-info-table td {
    padding: 3px 10px;
    vertical-align: top;
}

.green-info-table .label {
    text-align: right;
    font-weight: 700;
    color: #222222;
}

.green-results-box {
    background-color: #eaf1e5;
    border: 1px solid #d0dec6;
    padding: 20px;
    margin-bottom: 35px;
    border-radius: 4px;
}

.green-results-table {
    border-collapse: collapse;
    font-size: 16px;
}

.green-results-table td {
    padding: 4px 10px;
}

.green-results-table .label-green {
    font-weight: 700;
    color: #468847;
    text-align: right;
    width: 180px;
}

.green-results-table .value-green {
    color: #468847;
    font-weight: 400;
}

/* ==========================================
   TABELLA DEI RISULTATI (ELENCO PRINCIPALE)
   ========================================== */
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 15px;
}

.results-table th {
    font-weight: 700;
    color: #333333;
    padding: 12px 10px;
    border-bottom: 2px solid #dddddd;
    text-align: left;
    background-color: #ffffff;
}

.sort-icon {
    color: #b0b0b0;
    font-size: 13px;
    margin-left: 5px;
    display: inline-block;
}

.results-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eeeeee;
    color: #333333;
    background-color: #ffffff;
}

.commission-link {
    color: #337ab7;
    text-decoration: underline;
    font-weight: 600;
}

.commission-link:hover {
    color: #23527c;
}

/* ==========================================
   TABELLA DETTAGLI (COMMISSARI)
   ========================================== */
.table-section {
    border: 1px solid #4a8bc2;
    margin-bottom: 30px;
    background-color: #ffffff;
}

.section-header-blue {
    background-color: #4a8bc2;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: #444444;
}

.data-table th {
    font-weight: 700;
    padding: 14px 20px;
    border-bottom: 1px solid #dcdcdc;
    text-align: left;
    color: #333333;
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #eeeeee;
    vertical-align: top;
    text-transform: uppercase;
}

.mixed-case { text-transform: none !important; }
.text-center { text-align: center; }
.th-center { text-align: center !important; }

.divider-row td {
    font-size: 12px;
    color: #111111;
    padding: 25px 20px 8px 20px !important;
    border-bottom: none !important;
}

.sub-header-row td {
    font-size: 11px;
    color: #555555;
    padding: 6px 20px 10px 20px !important;
    border-bottom: 1px solid #dcdcdc !important;
}

/* ==========================================
   PAGINAZIONE, LEGENDA E BOTTONI
   ========================================== */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666666;
    margin-bottom: 30px;
    padding-top: 5px;
}

.pagination-buttons {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.page-item {
    padding: 6px 12px;
    background-color: #ffffff;
    color: #337ab7;
    text-decoration: none;
    border-right: 1px solid #ddd;
}

.page-item:last-child { border-right: none; }
.page-item.active { background-color: #337ab7; color: #ffffff; border-color: #337ab7; }
.page-item.disabled { color: #777777; background-color: #ffffff; cursor: not-allowed; }

.legend-box {
    background-color: #f5f5f5;
    border: 1px solid #dddddd;
    padding: 18px 22px;
    margin-bottom: 30px;
    font-size: 12px;
    line-height: 1.7;
    color: #555555;
}

.legend-title { font-weight: 700; color: #222222; margin-bottom: 6px; }

.button-group { display: flex; gap: 10px; }
.btn {
    font-family: 'Titillium Web', sans-serif;
    font-size: 13px;
    padding: 7px 18px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-indietro { background-color: #ffffff; color: #333333; border-color: #cccccc; }
.btn-stampa { background-color: #337ab7; color: #ffffff; border-color: #2e6da4; }

/* ==========================================
   FOOTER MINISTERIALE SCURO
   ========================================== */
.ministero-footer {
    background-color: #222d32;
    color: #ffffff;
    text-align: center;
    padding: 25px 10px;
    font-size: 13px;
    line-height: 1.8;
    margin-top: 60px;
    width: 100%;
}
.footer-link { color: #5bc0de; text-decoration: underline; }
.footer-link:hover { color: #31b0d5; }
.footer-subtext { font-size: 11px; margin-top: 5px; }

/* REGOLE DI STAMPA */
@media print {
    .no-print { display: none !important; }
    .page-container { max-width: 100% !important; width: 100% !important; padding: 0 !important; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}