:root {
    --blue: #0066cc;
    --blue2: #0755e3;
    --navy: #0c1c33;
    --text: #0c1c33;
    --muted: #4d4d4d;
    --line: #d8e4ef;
    --light-bg: #f5faff;
    --gradient-light: linear-gradient(45deg, #1d3470 0%, #0755e3 52%, #3fa9f5 100%);
    --gradient-dark: linear-gradient(45deg, #0c1c33 0%, #0755e3 100%);
    --green: #13c8a1;
    --red: #ff5b6b;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(13, 27, 47, .10);
    --radius: 24px;
    --font-heading: Geist, Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    --font-body: Inter, Geist, system-ui, -apple-system, Segoe UI, sans-serif;
    --bs-primary: #0066cc;
    --bs-primary-rgb: 0, 102, 204;
    --bs-success-rgb: 12, 175, 142;
}

html,
body {
    min-height: 100%;
}

body {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

/* Sobreescribir Bootstrap */
.container-xl {
    max-width: 1240px;
    padding-right: 22px;
    padding-left: 22px;
}

main > section > .container-xl {
    margin-top: 34px;
    padding-bottom: 60px;
}

.row.g-4 {
    --bs-gutter-x: 24px;
    --bs-gutter-y: 24px;
}

.card {
    border-color: var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow);
}

.card-body {
    padding: 34px;
}

/* Sistema unico di badge */
.badge {
    border-radius: var(--bs-border-radius-pill) !important;
    font-weight: 800;
}

.badge.bg-success-subtle,
.badge.text-bg-success {
    color: #0a3622 !important;
    background-color: #d1e7dd !important;
}

.badge.bg-warning-subtle,
.badge.text-bg-warning {
    color: #664d03 !important;
    background-color: #fff3cd !important;
}

.badge.bg-danger-subtle,
.badge.text-bg-danger {
    color: #58151c !important;
    background-color: #f8d7da !important;
}

.badge.bg-secondary-subtle,
.badge.text-bg-secondary,
.badge.text-bg-light {
    color: #2b2f32 !important;
    background-color: #e2e3e5 !important;
}

.badge.bg-primary-subtle,
.badge.text-bg-primary {
    color: #052c65 !important;
    background-color: #cfe2ff !important;
}

.badge.bg-info-subtle,
.badge.text-bg-info {
    color: #055160 !important;
    background-color: #cff4fc !important;
}

.card-hero-accent {
    position: relative;
    overflow: hidden;
}

.card-hero-accent::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 214, 176, .25), transparent 65%);
}

.card-hero-accent > .card-body {
    position: relative;
    z-index: 1;
}

.text-uppercase.fw-bold.small {
    letter-spacing: .12em;
}

.accordion {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.accordion-button {
    padding: 18px 22px;
    font-weight: 800;
}

.accordion-body {
    padding: 0 22px 22px;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: linear-gradient(180deg, var(--light-bg) 0, #ffffff 70%);
}

.site-top-simple {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(7, 21, 40, .10);
}

.site-data-bar {
    color: #ffffff;
    background: #071528;
}

.site-data-bar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 6px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.site-data-stats {
    width: 100%;
    overflow: hidden;
    color: #dbe9ff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.site-data-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.site-data-rotator {
    display: none;
}

.site-data-stats span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.site-data-stats i {
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 999px;
    background: var(--green);
}

@keyframes site-data-fade {
    0% {
        opacity: 0;
    }

    6%,
    28% {
        opacity: 1;
    }

    34%,
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-data-rotator span {
        animation: none;
    }

    .site-data-rotator span:first-child {
        opacity: 1;
    }
}

.site-top-simple-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.site-top-simple-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.site-top-simple-brand img {
    display: block;
    width: 198px;
    height: auto;
}

.site-top-simple-nav {
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.site-top-main-links,
.site-top-user-actions {
    gap: 8px;
}

.site-top-user-buttons {
    gap: 8px;
}

.site-top-user-actions {
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.site-top-simple-link,
.site-top-login-cta,
.site-top-user-name,
.site-top-subscribe-cta {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.site-top-user-name {
    color: var(--text);
    cursor: default;
}

.site-top-user-account {
    gap: 8px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.site-top-user-account i {
    color: var(--blue);
    font-size: 14px;
}

.site-top-user-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.site-top-user-name-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-top-user-credits {
    flex: 0 0 auto;
    line-height: 1.2;
}

.site-top-user-account:hover,
.site-top-user-account:focus-visible {
    color: var(--blue);
    background: #eef6ff;
    box-shadow: inset 0 0 0 1px #d7eaff;
}

.site-top-simple-link:hover,
.site-top-simple-link:focus-visible {
    color: var(--blue);
    background: #eef6ff;
}

.site-top-simple-link.is-active {
    color: var(--blue);
    background: #eef6ff;
    box-shadow: inset 0 0 0 1px #d7eaff;
}

.site-top-login-cta {
    margin-left: 6px;
    border: 1px solid #cfe1f6;
    color: #173a76;
    background: #ffffff;
}

.site-top-login-cta:hover,
.site-top-login-cta:focus-visible {
    color: #173a76;
    background: #f4f9ff;
}

.site-top-subscribe-cta {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #0caf8e);
    box-shadow: 0 14px 28px rgba(0, 102, 204, .18);
}

.site-top-subscribe-cta:hover,
.site-top-subscribe-cta:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue2), #0caf8e);
}

.site-top-simple-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7fbff;
    place-items: center;
    padding: 10px;
}

.site-top-simple-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.site-top-simple-toggle span + span {
    margin-top: 4px;
}

.come-funziona-modal .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(13, 27, 47, .22);
}

.come-funziona-modal .modal-header,
.come-funziona-modal .modal-footer {
    border-color: var(--line);
    padding: 20px 24px;
}

.come-funziona-modal .modal-body {
    padding: 24px;
}

.come-funziona-eyebrow {
    margin: 0 0 4px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.come-funziona-modal .modal-title {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
}

.come-funziona-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.come-funziona-step {
    min-height: 168px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.come-funziona-step-number {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #0caf8e);
    font-weight: 900;
}

.come-funziona-step h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 900;
}

.come-funziona-step p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.come-funziona-file {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #cfe1f6;
    border-radius: 16px;
    background: #f4f9ff;
}

.come-funziona-file-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.come-funziona-file h3,
.come-funziona-file h4 {
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 900;
}

.come-funziona-file h3 {
    margin: 0;
    font-size: 22px;
}

.come-funziona-file h4 {
    margin: 0 0 10px;
    font-size: 16px;
}

.come-funziona-file-intro {
    margin: 10px 0 18px;
    color: var(--muted);
}

.come-funziona-file-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, .8fr);
    gap: 18px;
}

.come-funziona-file-rules ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.come-funziona-file-rules li + li {
    margin-top: 7px;
}

.come-funziona-file-note {
    margin: 14px 0 0;
    padding: 11px 13px;
    border-left: 3px solid #0caf8e;
    border-radius: 0 10px 10px 0;
    background: #ffffff;
    color: var(--text);
    font-size: 13px;
}

.come-funziona-file-example {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

.come-funziona-file-example-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.come-funziona-file-example code {
    display: block;
    padding: 14px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.8;
    white-space: nowrap;
}

.prezzi-listino .prezzi-callout {
    margin: 24px 0 12px;
    padding: 16px 18px;
    border: 1px solid #cfe1f6;
    border-radius: 14px;
    background: #f4f9ff;
    color: var(--text);
}

.prezzi-listino .prezzi-callout strong {
    font-size: 14px;
    font-weight: 900;
}

.prezzi-listino .prezzi-callout span {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.4;
}

.prezzi-listino .prezzi-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: none;
}

.prezzi-item.is-included {
    border-color: rgba(19, 200, 161, .65);
    background: linear-gradient(180deg, #ffffff, #f1fffb);
}

.prezzi-listino .prezzi-price small {
    margin-top: 3px;
    font-size: 10px;
    letter-spacing: 0;
}

.prezzi-category {
    display: block;
    margin-bottom: 6px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.prezzi-item strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.prezzi-description {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.prezzi-note,
.prezzi-empty {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.prezzi-empty-box {
    border-radius: 18px;
    box-shadow: none;
}

.prezzi-empty-box .card-body {
    padding: 22px;
}

.prezzi-column-heading {
    margin-bottom: 20px;
}

.prezzi-column-heading h1,
.prezzi-column-heading h2 {
    margin: 4px 0 8px;
    color: var(--text);
    font-size: 26px;
    font-weight: 900;
}

.prezzi-column-heading p {
    max-width: 680px;
    line-height: 1.55;
}

.abbonamenti-list {
    display: grid;
    gap: 20px;
}

.abbonamenti-carousel-track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 0;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.abbonamenti-carousel-track::-webkit-scrollbar { display: none; }

.abbonamenti-carousel-track::before,
.abbonamenti-carousel-track::after {
    content: "";
    flex: 0 0 9%;
}

.abbonamenti-carousel-item {
    display: block;
    flex: 0 0 82%;
    min-width: 0;
    padding: 28px;
    box-sizing: border-box;
    scroll-snap-align: center;
}

.abbonamenti-carousel-item .abbonamento-card { height: 100%; }

@media (min-width: 768px) and (max-width: 991.98px) {
    .abbonamenti-carousel-track::before,
    .abbonamenti-carousel-track::after {
        flex-basis: calc(50% - 150px);
    }

    .abbonamenti-carousel-item {
        flex-basis: 300px;
        max-width: 300px;
    }
}

@media (min-width: 992px) {
    .abbonamenti-carousel-track::before,
    .abbonamenti-carousel-track::after { display: none; }

    .abbonamenti-carousel-item { flex-basis: 100%; }
}

.prezzi-panel {
    overflow: hidden;
    background: rgba(255, 255, 255, .94);
}

.prezzi-panel > .card-body {
    padding: 28px;
}

.prezzi-abbonamenti-panel > .prezzi-abbonamenti-body {
    padding: 0;
}

.prezzi-abbonamenti-body > .prezzi-column-heading {
    padding: 28px 28px 0;
}

.abbonamenti-carousel-controls {
    padding: 0 28px 28px;
}

.prezzi-layout .prezzi-item .card-body {
    padding: 20px;
}

@media (min-width: 992px) {
    .prezzi-layout > aside {
        position: sticky;
        top: calc(var(--site-top-height, 0px) + 24px);
    }
}

.abbonamento-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(13, 27, 47, .07);
}

.abbonamento-card > .card-body {
    display: flex;
    flex-direction: column;
    padding: 26px 20px 20px;
}

.abbonamento-card.is-principale,
.abbonamento-card.is-attivo {
    border-color: var(--green);
    box-shadow: 0 18px 40px rgba(19, 200, 161, .13);
}

.abbonamento-highlight {
    position: absolute;
    top: 18px;
    right: 18px;
    letter-spacing: .06em;
}

.abbonamento-logo {
    width: 138px;
    height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 5px 12px rgba(13, 27, 47, .05);
}

.abbonamento-periodo {
    align-self: flex-start;
    margin: 10px 0 18px;
}

.abbonamento-card h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 800;
}

.abbonamento-description {
    min-height: 52px;
    margin: 0 0 22px;
    color: var(--text);
    line-height: 1.55;
}

.abbonamento-prezzo {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 20px;
}

.abbonamento-prezzo strong {
    color: #020817;
    font-size: 29px;
    font-weight: 900;
    line-height: 1;
}

.abbonamento-prezzo span {
    color: #53698a;
    font-size: 12px;
    font-weight: 800;
}

.abbonamento-features {
    display: grid;
    gap: 9px;
    margin: 0 0 22px;
    padding: 0;
    color: #425979;
    font-size: 13px;
    list-style: none;
}

.abbonamento-features li::before {
    content: "\2713";
    margin-right: 8px;
    color: #00a777;
    font-weight: 900;
}

.abbonamento-action {
    align-self: flex-start;
    margin-top: auto;
    border: 1px solid #cbd9e7;
    border-radius: 14px;
    color: var(--navy);
    background: #f8fbff;
}

.abbonamento-action:hover {
    border-color: var(--blue);
    color: #ffffff;
    background: var(--blue);
}

.abbonamento-action.is-attivo {
    border-color: var(--green);
    color: #008d70;
    background: #f1fffb;
}

.abbonamento-action.is-attivo:hover {
    border-color: #00a77f;
    color: #ffffff;
    background: #00a77f;
}

.wrap {
    max-width: 1240px;
    margin: 34px auto;
    padding: 0 22px 60px;
}

.auth-page {
    min-height: calc(100vh - 86px);
}

.auth-page-simple {
    background: #ffffff;
}

.auth-form-logo {
    width: min(230px, 74vw);
    height: auto;
}

.auth-side-panel {
    border-radius: var(--radius);
    background: #ffffff;
    overflow: hidden;
}

.auth-side-logo {
    width: min(240px, 78vw);
    height: auto;
}

.auth-side-title {
    max-width: 650px;
    font-size: 44px;
    line-height: 1.12;
}

.auth-benefit {
    border-radius: 16px;
    background: #f8fbff;
}

.auth-card {
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
}

.auth-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(19, 200, 161, .16);
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.panel {
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.hero-left {
    padding: 34px;
    position: relative;
    overflow: hidden;
}

.hero-left::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 214, 176, .25), transparent 65%);
}

.eyebrow {
    font-weight: 800;
    color: var(--green);
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 14px;
}

h1 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 44px;
    line-height: 1.02;
    margin: 0 0 14px;
    letter-spacing: 0;
    color: var(--text);
}

.lead {
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 720px;
    margin: 0 0 26px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    --bs-btn-font-size: 14px;
    --bs-btn-font-weight: 800;
    --bs-btn-border-radius: 16px;
    --bs-btn-padding-x: 18px;
    --bs-btn-padding-y: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(0, 92, 174, .20);
}

.btn-lg {
    --bs-btn-font-size: 14px;
    --bs-btn-padding-x: 18px;
    --bs-btn-padding-y: 14px;
    --bs-btn-border-radius: 16px;
}

.btn-sm {
    --bs-btn-font-size: 12px;
    --bs-btn-padding-x: 10px;
    --bs-btn-padding-y: 7px;
    --bs-btn-border-radius: 999px;
}

.btn-primary {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: transparent;
    background: linear-gradient(135deg, var(--green), var(--blue));
    box-shadow: 0 14px 30px rgba(0, 120, 215, .25);
    border: 0;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: linear-gradient(135deg, var(--green), var(--blue));
    box-shadow: 0 18px 36px rgba(0, 120, 215, .30);
}

.btn-outline-primary {
    --bs-btn-color: var(--blue);
    --bs-btn-bg: #eef6ff;
    --bs-btn-border-color: #d7eaff;
    --bs-btn-hover-color: var(--blue);
    --bs-btn-hover-bg: #eef6ff;
    --bs-btn-hover-border-color: #d7eaff;
    --bs-btn-active-color: var(--blue);
    --bs-btn-active-bg: #e5f1ff;
    --bs-btn-active-border-color: #c9e2fb;
    background: #eef6ff;
    border: 1px solid #d7eaff;
    box-shadow: none;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    background: #eef6ff;
    border-color: #d7eaff;
    color: var(--blue);
    box-shadow: 0 12px 24px rgba(13, 27, 47, .08);
}

.hero-right {
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.upload-box {
    border: 2px dashed #b7d7f4;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff, #f1f8ff);
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.upload-box.is-dragging {
    border-color: var(--green);
    background: linear-gradient(180deg, #ffffff, #effffb);
    box-shadow: 0 18px 35px rgba(19, 200, 161, .18);
}

.upload-box.has-file {
    border-style: solid;
}

.upload-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
}

.upload-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.upload-sub {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    text-align: left;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    margin-top: 16px;
}

.upload-file > div {
    min-width: 0;
    flex: 1 1 190px;
}

.upload-file strong,
.upload-file span:not(.badge) {
    overflow-wrap: anywhere;
}

.upload-file .badge {
    flex: 0 0 auto;
    margin-left: auto;
    max-width: 100%;
    white-space: nowrap;
}

.upload-file[hidden] {
    display: none;
}

.upload-file.is-locked {
    background: #f7fbff;
    border-color: #cfe1f6;
}

.upload-file.is-locked strong::before {
    content: "File processato: ";
    color: var(--muted);
    font-weight: 700;
}

.steps {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin: 26px 0;
}

.step {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 12px;
    min-height: 106px;
    box-shadow: 0 8px 22px rgba(13, 27, 47, .06);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #eaf6ff;
    color: var(--blue);
    font-weight: 900;
    display: grid;
    place-items: center;
    font-size: 13px;
    margin-bottom: 10px;
}

.step.active {
    border-color: rgba(19, 200, 161, .45);
    box-shadow: 0 14px 30px rgba(19, 200, 161, .14);
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--green), var(--blue));
    color: #ffffff;
}

.step h3 {
    font-size: 13px;
    line-height: 1.25;
    margin: 0 0 6px;
    color: #14243c;
}

.step p {
    font-size: 11px;
    line-height: 1.35;
    margin: 0;
    color: var(--muted);
}

.grid-preview {
    display: grid;
    grid-template-columns: 280px 1fr 330px;
    gap: 24px;
    align-items: start;
}

.generation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.generation-card {
    padding: 22px;
}

.generation-state {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fbff;
}

.generation-state .step-number {
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green), var(--blue));
    color: #ffffff;
}

.generation-state strong {
    display: block;
    color: var(--text);
    font-size: 15px;
}

.generation-state span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.review-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.review-row span {
    color: var(--muted);
    font-weight: 700;
}

.review-row strong {
    color: var(--text);
    text-align: right;
    overflow-wrap: anywhere;
}

.generation-fields {
    margin-top: 10px;
}

.grid-preview[hidden] {
    display: none;
}

.sidebar,
.summary,
.main-card,
.history {
    padding: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title h1 {
    flex: 0 0 100%;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.1;
    margin: 0 0 -6px;
    color: var(--green);
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin: 0;
    color: var(--text);
    letter-spacing: 0;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.stat:last-child {
    border-bottom: 0;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

.stat-value {
    font-size: 23px;
    font-weight: 900;
    color: var(--text);
}

.stat-value.green {
    color: #0caf8e;
}

.stat-value.red {
    color: var(--red);
}

.progress {
    --bs-progress-height: 10px;
    --bs-progress-bg: #edf3fa;
    --bs-progress-bar-bg: var(--green);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--green), var(--blue));
    border-radius: 999px;
}

.matching-progress {
    margin: 14px 0 8px;
}

.matching-result-group {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.matching-primary-stat {
    padding-bottom: 9px;
    border-bottom: 0;
}

.matching-details {
    display: grid;
    gap: 7px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 2px solid #dce8f5;
}

.matching-details > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.matching-details strong {
    color: var(--text);
    font-size: 12px;
}

.matching-not-found {
    border-bottom: 0;
}

.sidebar .table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.sidebar .table th {
    color: #8090a6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 0 10px;
}

.sidebar .table td {
    background: #f7fbff;
    border-top: 1px solid #edf3fa;
    border-bottom: 1px solid #edf3fa;
    padding: 11px 10px;
    font-size: 12px;
}

.sidebar .table td:first-child {
    border-left: 1px solid #edf3fa;
    border-radius: 12px 0 0 12px;
    font-weight: 800;
}

.sidebar .table td:last-child {
    border-right: 1px solid #edf3fa;
    border-radius: 0 12px 12px 0;
    color: #0caf8e;
    font-weight: 900;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: #10213a;
    --bs-nav-pills-border-radius: 12px;
    --bs-nav-link-color: #607086;
    --bs-nav-link-hover-color: var(--blue);
}

.fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 1200px) {
    .process-page .fields {
        grid-template-columns: 1fr;
    }

    .process-page .field {
        min-height: 120px;
    }
}

.field {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 14px;
    align-items: flex-start;
    transition: .2s;
    cursor: pointer;
    position: relative;
}

.field:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(13, 27, 47, .08);
}

.field.selected {
    border-color: rgba(19, 200, 161, .65);
    background: linear-gradient(180deg, #ffffff, #f1fffb);
}

.field.selected.is-direct {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(19, 200, 161, .14);
}

.check {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid #c6d5e6;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.field.selected .check {
    background: linear-gradient(135deg, var(--green), var(--blue));
    border: 0;
}

.field strong {
    display: block;
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--text);
}

.field small {
    display: block;
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.field-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.field-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-help-link {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--blue);
    background: var(--light-bg);
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease;
}

.field-help-link:hover,
.field-help-link:focus-visible {
    color: var(--blue);
    background: var(--line);
    transform: translateY(-1px);
}

.package-guide { padding: 0; }
.package-guide-heading { max-width: 720px; margin-bottom: 0; }
.package-guide-heading p { margin-bottom: 0; color: var(--muted); }
.package-guide-selector-heading { margin-bottom: 20px; }
.package-guide-selector-heading p { margin-bottom: 0; color: var(--muted); }
.package-guide-list { display: grid; gap: 10px; }
.package-guide-tab { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid transparent; border-radius: 14px; color: var(--text); text-decoration: none; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.package-guide-tab:hover { color: var(--text); background: var(--light-bg); transform: translateX(2px); }
.package-guide-tab.is-active { border-color: var(--green); color: var(--text); background: linear-gradient(180deg, var(--card), var(--light-bg)); box-shadow: var(--shadow); }
.package-guide-tab-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--light-bg); }
.package-guide-tab.is-active .package-guide-tab-icon { color: var(--green); background: var(--card); }
.package-guide-tab strong, .package-guide-tab small { display: block; }
.package-guide-tab strong { font-size: 15px; font-weight: 900; }
.package-guide-tab small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.package-guide-tab.is-active small { color: var(--muted); }
.package-guide-tab > i { font-size: 12px; opacity: .65; }
.package-guide-divider { height: 1px; margin: 20px 0 28px; background: var(--line); }
.package-guide-kicker { margin: 0 0 5px; color: var(--blue); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.package-guide-detail h2 { margin: 0 0 14px; color: var(--text); font-family: var(--font-heading); font-size: 26px; font-weight: 900; }
.package-guide-lead { max-width: 760px; margin: 0 0 34px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.package-guide-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.package-guide-info-grid section { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--light-bg); }
.package-guide-info-grid section > i { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--card); }
.package-guide-info-grid h3 { margin: 0 0 6px; color: var(--text); font-size: 15px; font-weight: 900; }
.package-guide-info-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
@media (max-width: 767.98px) {
    .package-guide-info-grid { grid-template-columns: 1fr; }
}

.field-price em {
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    color: var(--blue);
    background: #eaf6ff;
    border-radius: 999px;
    padding: 5px 8px;
    white-space: nowrap;
}

.field-price .field-price-unit {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.estimate-card {
    background: var(--gradient-dark);
    color: #ffffff;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.estimate-card::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 180px;
    height: 180px;
    background: rgba(31, 214, 176, .28);
    border-radius: 50%;
}

.estimate-card small {
    display: block;
    color: #cfe4ff;
    font-weight: 700;
    margin-bottom: 7px;
}

.estimate-card .amount {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 0;
}

.estimate-card .note {
    color: #dbe9ff;
    font-size: 12px;
    margin-top: 7px;
    line-height: 1.4;
}

.estimate-disclosure {
    border-bottom: 1px solid var(--line);
}

.estimate-disclosure summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.estimate-disclosure summary::-webkit-details-marker {
    display: none;
}

.estimate-disclosure summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(-45deg);
    transition: transform .2s ease;
    flex: 0 0 auto;
}

.estimate-disclosure[open] summary::before {
    transform: rotate(45deg);
}

.estimate-disclosure summary span {
    flex: 1 1 auto;
}

.estimate-disclosure summary strong {
    color: var(--text);
}

.estimate-detail-list {
    display: grid;
    gap: 7px;
    padding: 2px 0 10px;
}

.estimate-detail-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.estimate-detail-item.has-remove {
    grid-template-columns: minmax(0, 1fr) 24px;
    grid-template-areas:
        "name remove"
        "price remove";
}

.estimate-detail-item.has-remove > span {
    grid-area: name;
}

.estimate-detail-item.has-remove > strong {
    grid-area: price;
    justify-self: end;
}

.estimate-detail-item.has-remove > .estimate-remove {
    grid-area: remove;
}

.estimate-detail-item strong {
    flex: 0 0 auto;
    color: var(--blue);
    font-size: 12px;
    white-space: nowrap;
}

.estimate-remove {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.estimate-remove:hover,
.estimate-remove:focus-visible {
    background: #ffecef;
    color: var(--red);
}

.history {
    margin-top: 24px;
}

.analysis-lists {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.analysis-lists h3 {
    font-size: 14px;
    margin: 0 0 10px;
    color: var(--text);
}

.analysis-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.analysis-list li {
    background: #f7fbff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.analysis-list.found li {
    color: #0caf8e;
    background: #f1fffb;
    border-color: rgba(19, 200, 161, .35);
}

.analysis-list.missing li {
    color: var(--red);
    background: #fff7f8;
    border-color: rgba(255, 91, 107, .28);
}

.history-list {
    display: grid;
    gap: 10px;
}

.history-item {
    background: #f8fbff;
    border: 1px solid var(--line);
    padding: 14px;
    border-radius: 16px;
}

.history-content {
    min-width: 0;
}

.history-item strong {
    display: block;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.history-item span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.45;
}

.history-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
}

.history-button i {
    flex: 0 0 auto;
    font-size: 12px;
}

.history-button span {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.history-action-form {
    display: inline-flex;
    margin: 0;
}

.history-table-wrap {
    overflow: visible;
}

.history-table-wrap .dataTables_wrapper > .row:first-child,
.history-table-wrap .dt-container > .row:first-child,
.history-table-wrap .dt-container > .dt-layout-row:first-child {
    align-items: end;
    margin-bottom: 22px;
}

.history-table-wrap .dataTables_wrapper > .row:last-child,
.history-table-wrap .dt-container > .row:last-child,
.history-table-wrap .dt-container > .dt-layout-row:last-child {
    align-items: center;
    margin-top: 22px;
}

.history-table-wrap .dataTables_length label,
.history-table-wrap .dataTables_filter label,
.history-table-wrap .dt-length label,
.history-table-wrap .dt-search label {
    color: var(--navy);
    font-weight: 700;
}

.history-table-wrap .dataTables_length select,
.history-table-wrap .dataTables_filter input,
.history-table-wrap .dt-length select,
.history-table-wrap .dt-search input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(12, 28, 51, .04);
}

.history-table-wrap .dataTables_length select,
.history-table-wrap .dt-length select {
    min-width: 76px;
    margin: 0 8px;
}

.history-table-wrap .dataTables_filter input,
.history-table-wrap .dt-search input {
    min-width: 240px;
    margin-left: 10px;
    padding: 8px 12px;
}

.history-table-wrap .dataTables_length select:focus,
.history-table-wrap .dataTables_filter input:focus,
.history-table-wrap .dt-length select:focus,
.history-table-wrap .dt-search input:focus {
    border-color: var(--blue);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, .14);
}

.history-table-wrap table.dataTable {
    margin: 0 !important;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.history-table-wrap table.dataTable thead th {
    padding: 15px 12px;
    color: var(--navy);
    background: var(--light-bg);
    border-bottom: 1px solid var(--line);
    font-weight: 800;
    vertical-align: middle;
}

.history-table-wrap table.dataTable tbody td {
    padding: 16px 12px;
    border-color: var(--line);
    color: var(--text);
    vertical-align: middle;
}

.history-table-wrap table.dataTable.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: #f5faff;
}

.history-table-wrap .history-file {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.history-table-wrap .history-action {
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.history-table-wrap .dataTables_paginate .pagination,
.history-table-wrap .dt-paging .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}

.history-table-wrap .dataTables_paginate .page-link,
.history-table-wrap .dt-paging .page-link {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 10px !important;
    color: var(--blue);
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(12, 28, 51, .04);
}

.history-table-wrap .dataTables_paginate .page-link:hover,
.history-table-wrap .dataTables_paginate .page-link:focus,
.history-table-wrap .dt-paging .page-link:hover,
.history-table-wrap .dt-paging .page-link:focus {
    color: #ffffff;
    background: linear-gradient(135deg, var(--green), var(--blue));
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, .12);
}

.history-table-wrap .dataTables_paginate .page-item.active .page-link,
.history-table-wrap .dt-paging .page-item.active .page-link {
    color: #ffffff;
    background: linear-gradient(135deg, var(--green), var(--blue));
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(7, 85, 227, .22);
}

.history-table-wrap .dataTables_paginate .page-item.disabled .page-link,
.history-table-wrap .dt-paging .page-item.disabled .page-link {
    color: #8fc8ef;
    background: #f3f6f9;
    border-color: var(--line);
    box-shadow: none;
}

.history-table-wrap .dataTables_info,
.history-table-wrap .dt-info {
    padding-top: 0 !important;
    color: var(--muted);
}

.history-table-wrap table.dataTable thead > tr > th.dt-orderable-asc .dt-column-header,
.history-table-wrap table.dataTable thead > tr > th.dt-orderable-desc .dt-column-header {
    justify-content: flex-start;
    gap: 7px;
}

.history-table-wrap table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order,
.history-table-wrap table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order {
    position: static !important;
    order: -1;
    width: 1em !important;
    height: 1em !important;
    flex: 0 0 1em;
    align-self: center;
}

.history-table-wrap table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order::before,
.history-table-wrap table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order::before {
    position: static !important;
    display: inline-block !important;
    width: 1em !important;
    height: 1em !important;
    border: 0 !important;
    color: #8fc8ef;
    content: "\f0dc" !important;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    line-height: 1;
    opacity: 1 !important;
}

.history-table-wrap table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order::after,
.history-table-wrap table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order::after {
    display: none !important;
    content: none !important;
    border: 0 !important;
}

.history-table-wrap table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order::before,
.history-table-wrap table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order::before {
    color: transparent;
    background: linear-gradient(135deg, var(--green), var(--blue));
    background-clip: text;
    -webkit-background-clip: text;
}

.history-table-wrap table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order::before {
    content: "\f0de" !important;
}

.history-table-wrap table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order::before {
    content: "\f0dd" !important;
}

.history-table-wrap table.dataTable thead > tr > th.dt-orderable-none .dt-column-order {
    display: none !important;
}

.history-table-wrap table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
    width: auto;
    height: auto;
    margin-top: -.5em;
    border: 0;
    border-radius: 0;
    color: #8fc8ef;
    background: transparent;
    box-shadow: none;
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    line-height: 1;
    text-shadow: none;
}

.history-table-wrap table.dataTable.dtr-inline.collapsed > tbody > tr.dtr-expanded > td.dtr-control::before {
    color: transparent;
    background: transparent;
    background-image: linear-gradient(135deg, var(--green), var(--blue));
    background-clip: text;
    -webkit-background-clip: text;
    content: "\f078" !important;
}

.history-table-wrap table.dataTable > tbody > tr.child > td.child {
    padding-top: 6px;
    border-top: 0;
}

.history-table-wrap table.dataTable > tbody > tr.child ul.dtr-details {
    display: block;
    width: 100%;
    margin: 2px 0;
}

.history-table-wrap table.dataTable > tbody > tr.child ul.dtr-details > li {
    display: grid;
    grid-template-columns: minmax(110px, 160px) 1fr;
    gap: 18px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
}

.history-table-wrap table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
    border-bottom: 0;
}

.history-table-wrap .dtr-title {
    color: var(--navy);
    font-weight: 800;
}

.history-table-wrap .dtr-data {
    min-width: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .history-table-wrap .dataTables_filter,
    .history-table-wrap .dataTables_length,
    .history-table-wrap .dt-search,
    .history-table-wrap .dt-length {
        text-align: left !important;
    }

    .history-table-wrap .dataTables_filter input,
    .history-table-wrap .dt-search input {
        width: 100%;
        min-width: 0;
        margin: 8px 0 0;
    }

    .history-table-wrap .dataTables_wrapper > .row:first-child,
    .history-table-wrap .dataTables_wrapper > .row:last-child,
    .history-table-wrap .dt-container > .row:first-child,
    .history-table-wrap .dt-container > .row:last-child,
    .history-table-wrap .dt-container > .dt-layout-row:first-child,
    .history-table-wrap .dt-container > .dt-layout-row:last-child {
        row-gap: 16px;
    }

    .history-table-wrap .dataTables_paginate .pagination,
    .history-table-wrap .dt-paging .pagination {
        justify-content: flex-start !important;
    }

    .history-table-wrap table.dataTable > tbody > tr.child ul.dtr-details > li {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media (min-width: 992px) {
    .history-action {
        justify-content: flex-end;
    }
}

.cta-include {
    margin: 24px 0;
}

.mobile-bar {
    display: none;
}

.site-footer {
    margin-top: 56px;
    padding: 46px 0 22px;
    color: #eef6ff;
    background: #071528;
}

.site-footer-brand {
    display: inline-flex;
    align-items: center;
    max-width: 230px;
    margin-bottom: 18px;
}

.site-footer-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.site-footer-text {
    max-width: 470px;
    margin: 0;
    color: #d6e4f5;
    font-size: 14px;
    line-height: 1.7;
}

.site-footer-title {
    margin: 0 0 14px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.site-footer-links {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-links a {
    color: #d6e4f5;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
    color: #ffffff;
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    color: #b9cbe0;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1050px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .grid-preview {
        grid-template-columns: 1fr;
    }

    .generation-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 767.98px) {
    .site-data-bar-inner {
        padding: 6px 16px;
    }

    .site-data-stats {
        padding-bottom: 0;
    }

    .site-data-list {
        display: none;
    }

    .site-data-rotator {
        position: relative;
        display: grid;
        place-items: center;
        min-height: 16px;
    }

    .site-data-rotator span {
        position: absolute;
        inset: 0;
        justify-content: center;
        opacity: 0;
        padding: 5px 9px;
        border: 0;
        border-radius: 0;
        background: #071528;
        animation: site-data-fade 18s ease-in-out infinite both;
        animation-delay: -.9s;
    }

    .site-data-rotator span:nth-child(2) {
        animation-delay: -6.9s;
    }

    .site-data-rotator span:nth-child(3) {
        animation-delay: -12.9s;
    }

    .site-top-simple-toggle {
        display: grid;
    }

    .site-top-simple-inner {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .site-top-simple-nav {
        flex: 1 0 100%;
        width: 100%;
        padding-top: 10px;
    }

    .site-top-simple-nav.show,
    .site-top-simple-nav.collapsing {
        display: flex;
    }

    .site-top-main-links,
    .site-top-user-actions {
        width: 100%;
    }

    .site-top-user-actions {
        padding-bottom: 12px;
        padding-left: 0;
        border-bottom: 1px solid var(--line);
        border-left: 0;
    }

    .site-top-simple-link,
    .site-top-login-cta,
    .site-top-user-name,
    .site-top-subscribe-cta {
        width: 100%;
        margin-left: 0;
        border: 1px solid var(--line);
        background: #ffffff;
    }

    .site-top-user-name {
        justify-content: center;
        gap: 8px;
        min-width: 0;
        border: 1px solid var(--line);
        padding-left: 13px;
        padding-right: 13px;
        color: var(--text);
        background: #ffffff;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-top-user-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .site-top-user-summary > .text-muted {
        display: none !important;
    }

    .site-top-subscribe-cta {
        border-color: transparent;
        background: linear-gradient(135deg, var(--blue), #0caf8e);
    }

    .come-funziona-modal .modal-dialog {
        margin: 12px;
    }

    .come-funziona-modal .modal-header,
    .come-funziona-modal .modal-footer,
    .come-funziona-modal .modal-body {
        padding: 18px;
    }

    .come-funziona-steps {
        grid-template-columns: 1fr;
    }

    .come-funziona-step {
        min-height: 0;
    }

    .come-funziona-file {
        padding: 18px;
    }

    .come-funziona-file-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .site-data-stats {
        font-size: 11px;
    }

    .site-top-simple-brand img {
        width: 160px;
    }

    .wrap {
        padding: 0 14px;
        margin: 18px auto 80px;
    }

    .container-xl {
        padding-right: 14px;
        padding-left: 14px;
    }

    main > section > .container-xl {
        margin-top: 18px;
        padding-bottom: 80px;
    }

    .hero-left,
    .hero-right,
    .sidebar,
    .summary,
    .main-card,
    .generation-card,
    .history {
        padding: 18px;
        border-radius: 20px;
    }

    h1 {
        font-size: 31px;
    }

    .lead {
        font-size: 15px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .fields {
        grid-template-columns: 1fr;
    }

    .analysis-lists {
        grid-template-columns: 1fr;
    }

    .auth-page {
        min-height: auto;
    }

    .auth-side-panel {
        min-height: auto;
    }

    .auth-side-logo {
        width: 180px;
    }

    .auth-side-title {
        font-size: 32px;
    }

    .field {
        grid-template-columns: 24px 1fr;
    }

    .field-price {
        grid-column: 2;
        align-items: flex-start;
        width: fit-content;
    }

    .actions .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid var(--line);
        padding: 10px 14px;
        z-index: 20;
        box-shadow: 0 -10px 30px rgba(13, 27, 47, .10);
    }

    .estimate-card .amount {
        font-size: 32px;
    }

    .site-footer {
        margin-top: 34px;
        padding: 34px 0 20px;
    }

    .site-footer-brand {
        max-width: 190px;
    }

    .site-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* Processo arricchimento: Bootstrap skeleton + custom visual layer */
.process-page > .container-xl {
    margin-top: 34px;
    padding-bottom: 60px;
}

.process-page .hero-left,
.process-page .hero-right,
.process-page .step,
.process-page .generation-card,
.process-page .sidebar,
.process-page .summary,
.process-page .main-card {
    padding: 0;
}

.process-page .hero-left > .card-body {
    padding: 34px;
    position: relative;
    z-index: 1;
}

.process-page .hero-right > .card-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 992px) {
    .process-hero-copy-col {
        flex: 0 0 auto;
        width: 55%;
    }

    .process-hero-upload-col {
        flex: 0 0 auto;
        width: 45%;
    }
}

.process-page .step > .card-body {
    padding: 14px 12px;
}

.process-page .step.card {
    border-color: var(--line) !important;
}

.process-page .step.active {
    border-color: rgba(19, 200, 161, .45) !important;
    box-shadow: 0 14px 30px rgba(19, 200, 161, .14);
}

.process-page .generation-card > .card-body,
.process-page .sidebar > .card-body,
.process-page .summary > .card-body,
.process-page .main-card > .card-body {
    padding: 22px;
}

@media (min-width: 992px) {
    .process-steps > * {
        flex: 0 0 auto;
        width: 14.285714%;
    }
}

@media (max-width: 680px) {
    .process-page > .container-xl {
        margin-top: 18px;
        padding-bottom: 80px;
    }

    .process-page .hero-left > .card-body,
    .process-page .hero-right > .card-body,
    .process-page .generation-card > .card-body,
    .process-page .sidebar > .card-body,
    .process-page .summary > .card-body,
    .process-page .main-card > .card-body {
        padding: 18px;
    }
}
