.content-wrapper.ml-0 {
    margin-left: 0 !important;
}

.card-title {
    font-weight: 600;
}

.nav-sidebar .nav-link.active {
    font-weight: 700;
    box-shadow: inset 3px 0 0 #ffc107;
}

.main-sidebar,
.main-sidebar::before {
    transition: width .2s ease-in-out;
}

.nav-sidebar .nav-treeview {
    display: none;
}

.nav-sidebar .menu-open > .nav-treeview {
    display: block;
}

.nav-sidebar .has-treeview > .nav-link {
    cursor: pointer;
}

.nav-sidebar .has-treeview > .nav-link .right {
    transition: transform .2s ease-in-out;
}

.nav-sidebar .has-treeview.menu-open > .nav-link .right {
    transform: rotate(-90deg);
}

body.sidebar-collapse .main-sidebar,
body.sidebar-collapse .main-sidebar::before {
    width: 4.6rem;
}

body.sidebar-collapse .main-sidebar:hover,
body.sidebar-collapse .main-sidebar:hover::before {
    width: 250px;
}

body.sidebar-collapse .content-wrapper,
body.sidebar-collapse .main-header,
body.sidebar-collapse .main-footer {
    margin-left: 4.6rem !important;
}

body.sidebar-collapse .brand-text,
body.sidebar-collapse .nav-sidebar .nav-link p,
body.sidebar-collapse .nav-sidebar .nav-header {
    display: none !important;
}

body.sidebar-collapse .main-sidebar:hover .brand-text,
body.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link p,
body.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-header {
    display: inline-block !important;
}

body.sidebar-collapse .brand-link {
    justify-content: center;
}

body.sidebar-collapse .brand-image {
    margin-right: 0 !important;
}

body.sidebar-collapse .nav-sidebar .nav-link {
    justify-content: center;
}

body.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link {
    justify-content: flex-start;
}

body.sidebar-collapse .nav-sidebar .nav-icon {
    margin-right: 0 !important;
}

body.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-icon {
    margin-right: .5rem !important;
}

body.sidebar-collapse .nav-sidebar .nav-treeview {
    display: none !important;
}

.alert {
    border-left: 4px solid rgba(0, 0, 0, 0.15);
}

.content .card {
    border-radius: .5rem;
}

.btn-sm {
    border-radius: .35rem;
}

.dashboard-chart-card .card-body {
    padding: .75rem .9rem 1rem;
}

.dashboard-chart-canvas {
    height: 220px !important;
    max-height: 240px;
}

.dashboard-chart-card {
    border: 1px solid #e5ecf4;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.dashboard-chart-card > .card-header {
    background: #fbfdff;
    border-bottom: 1px solid #e7edf5;
}

.dashboard-chart-card .card-title {
    font-weight: 700;
    color: #162033;
}

.dashboard-chart-card--feature > .card-header {
    background:
        radial-gradient(circle at top right, rgba(13, 110, 253, 0.12), transparent 28%),
        linear-gradient(135deg, #fbfdff 0%, #f3f8ff 100%);
}

.dashboard-chart-card--feature-alt > .card-header {
    background:
        radial-gradient(circle at top right, rgba(25, 135, 84, 0.10), transparent 28%),
        linear-gradient(135deg, #fbfffd 0%, #f3fbf7 100%);
}

.nav-sidebar .nav-header {
    padding: .75rem 1rem .35rem;
    font-size: .68rem;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .55);
}

.dashboard-shell {
    display: grid;
    gap: 1rem;
}

.dashboard-hero {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.dashboard-hero .card-body {
    background:
        radial-gradient(circle at top right, rgba(13, 110, 253, 0.12), transparent 24%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-hero__title {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.1;
    font-weight: 700;
    color: #162033;
}

.dashboard-hero__subtitle {
    margin: .35rem 0 0;
    color: #607086;
    font-size: .95rem;
}

.dashboard-topbar__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.dashboard-quicklinks {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.dashboard-highlight {
    border-radius: 1rem;
    padding: 1rem 1.05rem;
    min-height: 120px;
    background: #fff;
    border: 1px solid #e4ebf3;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.dashboard-highlight__label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #607086;
}

.dashboard-highlight__value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    color: #162033;
}

.dashboard-highlight__value span {
    font-size: 1rem;
    margin-left: .15rem;
}

.dashboard-highlight__meta {
    margin-top: auto;
    color: #6b7a90;
    font-size: .86rem;
}

.dashboard-highlight--blue {
    border-top: 4px solid #0d6efd;
}

.dashboard-highlight--slate {
    border-top: 4px solid #64748b;
}

.dashboard-highlight--amber {
    border-top: 4px solid #f59e0b;
}

.dashboard-highlight--green {
    border-top: 4px solid #198754;
}

.dashboard-section {
    display: grid;
    gap: .75rem;
}

.dashboard-section__head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-section__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
}

.dashboard-section__hint {
    margin: 0;
    color: #6c757d;
    font-size: .85rem;
}

.dashboard-metric-grid {
    display: grid;
    gap: .75rem;
}

.dashboard-metric-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-metric-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-metric {
    min-height: 112px;
    padding: .9rem 1rem;
    border: 1px solid #e6ebf1;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.dashboard-metric__label {
    font-size: .8rem;
    line-height: 1.2;
    color: #5b6673;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.dashboard-metric__value {
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 700;
    color: #18212b;
}

.dashboard-metric__value span {
    font-size: .9rem;
    margin-left: .15rem;
}

.dashboard-metric__meta {
    color: #6b7a90;
    font-size: .82rem;
    line-height: 1.35;
}

.dashboard-metric__link {
    margin-top: auto;
    font-size: .82rem;
    font-weight: 600;
}

.dashboard-metric--blue {
    border-top: 3px solid #0d6efd;
}

.dashboard-metric--green {
    border-top: 3px solid #198754;
}

.dashboard-metric--amber,
.dashboard-metric--gold {
    border-top: 3px solid #ffc107;
}

.dashboard-metric--red {
    border-top: 3px solid #dc3545;
}

.ui-section-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ui-section-intro__title {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 700;
    color: #162033;
}

.ui-section-intro__subtitle {
    margin: .35rem 0 0;
    color: #607086;
    font-size: .92rem;
}

.ui-card-toolbar {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.ui-metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .65rem;
    margin-bottom: 1rem;
}

.ui-metric-pill {
    border: 1px solid #e4ebf3;
    border-radius: .85rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: .8rem .9rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.ui-metric-pill__label {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #607086;
}

.ui-metric-pill__value {
    display: block;
    margin-top: .22rem;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 800;
    color: #162033;
}

.ui-soft-card {
    border: 1px solid #e4ebf3;
    border-radius: .9rem;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.ui-soft-card > .card-header {
    background: #fbfdff;
    border-bottom: 1px solid #e7edf5;
}

.ui-soft-card .card-title {
    font-weight: 700;
}

.dashboard-metric--slate {
    border-top: 3px solid #6c757d;
}

.dashboard-metric--indigo {
    border-top: 3px solid #6610f2;
}

.dashboard-metric--teal {
    border-top: 3px solid #20c997;
}

.dashboard-metric--fuchsia {
    border-top: 3px solid #d63384;
}

.dashboard-metric--olive {
    border-top: 3px solid #3d9970;
}

.dashboard-tabs {
    border-bottom: 0;
}

.dashboard-tabs .nav-link {
    border-radius: .6rem .6rem 0 0;
    font-weight: 600;
}

.dashboard-tabs__content {
    padding-top: .75rem;
}

.dashboard-pill-tabs {
    gap: .5rem;
}

.dashboard-pill-tabs .nav-link {
    border-radius: 999px;
    padding: .55rem .9rem;
    font-weight: 600;
    border: 1px solid #dbe3ec;
    background: #fff;
    color: #425466;
}

.dashboard-pill-tabs .nav-link.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.dashboard-pill-tabs__content {
    padding-top: .25rem;
}

.dashboard-trend-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
}

.dashboard-trend {
    min-height: 118px;
    padding: .95rem 1rem;
    border: 1px solid #e4ebf3;
    border-radius: .9rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: .42rem;
}

.dashboard-trend__label {
    font-size: .78rem;
    line-height: 1.2;
    color: #5b6673;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.dashboard-trend__value {
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 800;
    color: #162033;
}

.dashboard-trend__meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: .12rem;
    font-size: .82rem;
    color: #607086;
}

.dashboard-trend--up {
    border-top: 3px solid #198754;
}

.dashboard-trend--down {
    border-top: 3px solid #dc3545;
}

.dashboard-trend--neutral {
    border-top: 3px solid #6c757d;
}

.config-admin-shell .card-header {
    padding-bottom: .85rem;
}

.config-admin-tabs .nav-link {
    border-radius: .6rem;
    font-weight: 600;
    text-align: left;
    padding: .7rem .9rem;
}

.config-admin-content {
    padding-top: .25rem;
}

.config-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: .9rem;
    flex-wrap: wrap;
}

.config-section-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
}

.config-section-hint {
    margin: .15rem 0 0;
    color: #6c757d;
    font-size: .85rem;
}

.config-admin-card {
    border-radius: .75rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.config-help-box {
    padding: .65rem .75rem;
    border: 1px solid #d9e2ec;
    border-radius: .55rem;
    background: #f8fafc;
}

.config-catalog-textarea {
    min-height: 220px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.45;
}

.form-label-sm {
    display: block;
    margin-bottom: .3rem;
    font-size: .78rem;
    font-weight: 600;
    color: #495057;
}

.table td,
.table th {
    vertical-align: middle;
}

.territorio-zone-panel {
    height: 100%;
    padding: .9rem 1rem 1rem;
    border: 1px solid #d7dee7;
    border-radius: .5rem;
    background: #f8fafc;
}

.territorio-zone-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.territorio-zone-panel__hint {
    color: #52606d;
    font-size: .85rem;
}

.territorio-mode-banner {
    padding: .75rem .9rem;
    border-radius: .5rem;
    border: 1px solid #d7dee7;
    font-size: .92rem;
}

.territorio-mode-banner--operativo {
    background: #f8fafc;
    color: #334e68;
}

.territorio-mode-banner--gestion {
    background: #eef6ff;
    color: #1f3c88;
}

.territorio-color-chip {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    margin-right: .35rem;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, .15);
}

.territorio-vertex-icon {
    background: transparent;
    border: 0;
}

.territorio-vertex-icon span {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #6610f2;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
}

.print-shell {
    max-width: 900px;
}

.print-page {
    background: #eef1f4;
    color: #1f2933;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.print-report {
    background: #fff;
    border: 1px solid #d7dee7;
    border-radius: 18px;
    box-shadow: 0 16px 50px rgba(31, 41, 51, 0.08);
    overflow: hidden;
}

.print-report__hero {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.25rem 2.25rem 1.5rem;
    background: linear-gradient(135deg, #f7f9fb 0%, #eef3f8 100%);
    border-bottom: 1px solid #d7dee7;
}

.print-report__eyebrow {
    display: inline-block;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: #dce6f2;
    color: #355070;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.print-report__title {
    font-size: 1.9rem;
    line-height: 1.15;
    font-weight: 700;
    color: #14213d;
}

.print-report__subtitle {
    max-width: 620px;
    color: #52606d;
    font-size: .98rem;
    line-height: 1.55;
}

.print-report__meta {
    min-width: 220px;
    display: grid;
    gap: .75rem;
    align-content: start;
}

.print-report__meta-card {
    padding: .8rem .95rem;
    border: 1px solid #d7dee7;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.print-report__meta-card strong {
    display: block;
    font-size: 1rem;
    color: #102a43;
}

.print-report__meta-label {
    display: block;
    margin-bottom: .2rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #627d98;
}

.print-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    padding: 1.5rem 2.25rem 0;
}

.print-fill-field {
    padding-bottom: .1rem;
}

.print-fill-field__label {
    display: block;
    margin-bottom: .35rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #52606d;
}

.print-fill-field__line {
    height: 2rem;
    border-bottom: 1.8px solid #9fb3c8;
}

.print-section {
    padding: 1.75rem 2.25rem 2.25rem;
}

.print-section__heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.print-section__title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #102a43;
}

.print-section__hint {
    color: #7b8794;
    font-size: .82rem;
}

.print-question-card {
    padding: 1.2rem 1.25rem 1.1rem;
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    background: #fff;
    margin-bottom: 1rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

.print-question-card--report {
    padding-bottom: 1.25rem;
}

.print-question-card__header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: .9rem;
}

.print-question-card__number {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0f4c5c;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
}

.print-question-card__body {
    flex: 1 1 auto;
}

.print-question-card__title {
    margin: 0 0 .18rem;
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 700;
    color: #102a43;
}

.print-question-card__type {
    font-size: .82rem;
    color: #627d98;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.print-option-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 3rem;
}

.print-option-list__item {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 1.75rem;
    padding: .2rem 0;
}

.print-option-list__marker,
.print-option-list__checkbox {
    display: inline-block;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    border: 1.6px solid #486581;
    background: #fff;
}

.print-option-list__marker {
    border-radius: 999px;
}

.print-binary-options {
    display: flex;
    gap: 1.2rem .9rem;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 3rem;
}

.print-answer-lines {
    padding-left: 3rem;
}

.print-answer-lines--compact .print-answer-lines__line {
    min-height: 2rem;
}

.print-answer-lines__line {
    height: 2rem;
    border-bottom: 1.2px solid #bcccdc;
    margin-bottom: .7rem;
}

.print-results-table {
    margin-left: 3rem;
    width: calc(100% - 3rem);
    border: 1px solid #d9e2ec;
}

.print-results-table thead th {
    background: #eef4f8;
    color: #243b53;
    border-bottom-width: 1px;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.print-results-table td,
.print-results-table th {
    padding: .55rem .7rem;
}

.print-open-summary {
    padding-left: 3rem;
}

.print-open-summary__label {
    margin-bottom: .5rem;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #627d98;
}

.print-open-summary__list {
    margin: 0;
    padding-left: 1.2rem;
}

.print-open-summary__list li {
    margin-bottom: .35rem;
    line-height: 1.5;
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body.print-page {
        background: #fff;
        color: #000;
    }

    .print-shell.container {
        max-width: none;
        width: auto;
        padding: 0 !important;
    }

    .print-report {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .print-report__hero {
        padding: 0 0 1rem;
        background: #fff;
        border-bottom: 1px solid #b8c4d0;
    }

    .print-info-grid {
        padding: 1rem 0 0;
    }

    .print-section {
        padding: 1.25rem 0 0;
    }

    .print-question-card,
    .print-results-table {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-question-card {
        padding: .95rem 0 1rem;
        border: 0;
        border-top: 1px solid #d9e2ec;
        border-radius: 0;
        margin-bottom: 0;
    }

    .print-question-card:first-of-type {
        border-top: 0;
    }

    .print-report__meta-card {
        background: #fff;
    }
}

@media (max-width: 1199px) {
    .dashboard-overview-grid,
    .dashboard-metric-grid--4,
    .dashboard-trend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .dashboard-overview-grid,
    .dashboard-metric-grid--4,
    .dashboard-metric-grid--3,
    .dashboard-trend-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-canvas {
        height: 200px !important;
        max-height: 220px;
    }

    .dashboard-metric {
        min-height: 96px;
    }

    .config-admin-tabs .nav-link {
        text-align: center;
    }
}

@media (max-width: 991.98px) {
    body.sidebar-collapse .content-wrapper,
    body.sidebar-collapse .main-header,
    body.sidebar-collapse .main-footer {
        margin-left: 0 !important;
    }
}
