.program-selector .form-label {
    font-weight: 500;
}

.program-selector .form-select {
    min-height: 2.4rem;
}

.regional-report-band {
    border: 1px solid #dee2e6;
    background: #fff;
    padding: 1rem;
    margin-top: 1rem;
}

.regional-report-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.report-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
}

.report-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: .75rem;
}

.report-actions .program-selector {
    min-width: min(32rem, 100%);
}

.regional-kpi {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    min-height: 112px;
}

.regional-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.regional-kpi-label {
    color: #6c757d;
    font-size: .85rem;
}

.regional-table th,
.regional-table td {
    vertical-align: middle;
}

.regional-program-summary-header {
    border-radius: 6px;
}

.pr-code {
    color: #0d6efd;
    font-size: .9rem;
    font-weight: 800;
}

.pr-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #0d6efd;
    margin-bottom: 1rem;
    padding: 1rem;
}

.report-section-title {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
    padding-bottom: .65rem;
}

.report-section-filter {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0;
    padding: .75rem 1rem .9rem;
}

.report-section-filter legend {
    color: #495057;
    float: none;
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .45rem;
    padding: 0 .35rem;
    width: auto;
}

.report-section-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.25rem;
}

.report-section-checks label {
    margin-left: .25rem;
}

.report-origin-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: flex-end;
    color: #495057;
    font-size: .85rem;
}

.report-origin-dot {
    display: inline-block;
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    margin-right: .35rem;
}

.report-origin-dot-national {
    background: #0d6efd;
}

.report-origin-dot-regional {
    background: #ffc107;
}

.ql-section {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 6px;
    height: 100%;
    padding: 1rem;
}

.ql-item {
    background: #f8f9fa;
    border-left: 3px solid #0d6efd;
    border-radius: 4px;
    margin-bottom: .55rem;
    padding: .65rem .75rem;
}

.ql-item:last-child {
    margin-bottom: 0;
}

.ql-item.ql-origine-regionale {
    background: #fff8e1;
    border-left-color: #ffc107;
}

.ql-item.ql-origine-nazionale {
    border-left-color: #0d6efd;
}

.ql-item-transversal {
    border-left-color: #6f42c1;
}

.ql-item-transversal.ql-origine-regionale {
    border-left-color: #ffc107;
}

.ql-code {
    color: #0d6efd;
    font-family: var(--bs-font-monospace);
    font-size: .85rem;
    font-weight: 700;
}

.ql-description {
    margin-top: .25rem;
}

.ql-empty {
    color: #6b7280;
    font-style: italic;
    padding: .5rem 0;
}

.report-indicator-block {
    display: grid;
    gap: .75rem;
}

.report-objective-group {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0d6efd;
    border-radius: 6px;
    padding: 1rem;
}

.report-objective-group.ql-origine-regionale {
    background: #fffdf2;
    border-left-color: #ffc107;
}

.report-objective-group-transversal {
    border-left-color: #6f42c1;
}

.report-objective-title {
    align-items: flex-start;
    border-bottom: 1px dashed #dee2e6;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
    margin-bottom: .6rem;
    padding-bottom: .5rem;
}

.report-objective-type {
    color: #495057;
    display: block;
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.report-indicator-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 3px solid #0d6efd;
    border-radius: 6px;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .04);
    margin-top: .75rem;
    padding: .85rem 1rem;
}

.report-indicator-card.ql-origine-regionale {
    background: #fff8e1;
    border-left-color: #ffc107;
}

.report-indicator-card-transversal {
    border-left-color: #6f42c1;
}

.indicator-codice {
    color: #0d6efd;
    font-family: var(--bs-font-monospace);
    font-weight: 700;
}

.report-annualita-head {
    background: #f1f3f5;
    border-radius: 4px;
    color: #495057;
    font-size: .78rem;
    font-weight: 700;
    padding: .35rem .15rem;
}

.report-annualita-row {
    border-top: 1px dashed #dee2e6;
    padding: .38rem .15rem;
}

.indicator-warning {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
}

.report-inline-meta {
    color: #495057;
    font-size: .85rem;
    font-weight: 600;
}

.report-value-text {
    display: inline-block;
    font-family: var(--bs-font-monospace);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.report-value-ok {
    color: #0f5132;
}

.report-value-ko {
    color: #842029;
}

.report-value-muted {
    color: #664d03;
}

.report-action-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: .75rem;
    padding: 1rem;
}

.log-field-pill {
    display: inline-block;
    padding: .1rem .5rem;
    font-size: .75rem;
    border-radius: .75rem;
    background: #e9ecef;
    color: #495057;
    font-family: var(--bs-font-monospace);
}

.log-field-pill.descrizione_regionale,
.log-field-pill.contesto_locale {
    background: #cfe2ff;
    color: #0a58ca;
}

.log-field-pill.id_obiettivo_tracciante,
.log-field-pill.motivazione_tracciante {
    background: #d1f5e3;
    color: #0f6e4b;
}

.log-field-pill.stato {
    background: #fff3cd;
    color: #7a5a00;
}

.log-valore {
    max-width: 320px;
    font-size: .85rem;
    word-break: break-word;
    white-space: pre-wrap;
}

.log-valore-old {
    color: #842029;
}

.log-valore-new {
    color: #0f6e4b;
}

.log-arrow {
    color: #6b7280;
    font-size: 1rem;
}

.log-empty {
    color: #6b7280;
    font-style: italic;
    padding: .5rem;
}

.status-pill,
.closure-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    padding: .28rem .6rem;
    white-space: normal;
    min-width: 5.5rem;
}

.status-pill-ok,
.closure-pill-success {
    background: #d1e7dd;
    color: #0f5132;
}

.status-pill-warn,
.closure-pill-warning {
    background: #fff3cd;
    color: #664d03;
}

.status-pill-ko,
.closure-pill-danger {
    background: #f8d7da;
    color: #842029;
}

.closure-pill-secondary {
    background: #e2e3e5;
    color: #41464b;
}

.closure-pill-lg {
    font-size: .95rem;
    padding: .42rem .75rem;
}

.closure-stack {
    display: grid;
    gap: .15rem;
    min-width: 8.5rem;
    border-radius: .5rem;
    border: 1px solid #dee2e6;
    padding: .45rem .6rem;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.25;
}

.closure-stack-ok {
    background: #d1e7dd;
    border-color: #a3cfbb;
    color: #0f5132;
}

.closure-stack-ko {
    background: #f8d7da;
    border-color: #f1aeb5;
    color: #842029;
}

.closure-table td {
    vertical-align: top;
}

.opendata-note {
    color: #6c757d;
    font-size: .875rem;
}

@media (max-width: 767.98px) {
    .regional-report-heading {
        display: block;
    }

    .report-nav {
        justify-content: flex-start;
        margin-top: .75rem;
    }

    .report-actions {
        align-items: stretch;
        flex-direction: column;
        margin-top: .75rem;
    }
}
