.service-demo-page {
    --service-accent: #4b73ff;
    --service-accent-dark: #173a8f;
    background: #f6f8fc;
    color: #12141a;
    min-height: 100vh;
    padding: 132px 24px 88px;
}

.service-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.service-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.service-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4b5568;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.service-demo-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(75, 115, 255, 0.22);
    background: #ffffff;
    color: var(--service-accent-dark);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-hero-card,
.service-card {
    background: #ffffff;
    border: 1px solid #e7ebf3;
    border-radius: 20px;
    box-shadow: 0 16px 45px rgba(26, 36, 64, 0.08);
}

.service-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 28px;
    align-items: stretch;
    padding: 32px;
    margin-bottom: 22px;
}

.service-kicker {
    color: var(--service-accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.service-title {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 0.98;
    margin: 0;
    letter-spacing: 0;
}

.service-subtitle {
    font-size: 18px;
    line-height: 1.55;
    color: #4b5568;
    max-width: 760px;
    margin: 18px 0 0;
}

.service-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.service-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.service-button-primary {
    background: var(--service-accent);
    color: #ffffff;
}

.service-button-secondary {
    background: #eef3ff;
    color: var(--service-accent-dark);
}

.service-score-panel {
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #e1e8f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 24px;
    text-align: center;
}

.service-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #159947;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.service-status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #17b34a;
}

.score-ring {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: conic-gradient(var(--service-accent) var(--score), #dfe6f1 0);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
}

.score-ring::before {
    content: "";
    position: absolute;
}

.score-ring-inner {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px #eef2f7;
}

.score-value {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.score-label {
    color: #7a8496;
    font-size: 12px;
    font-weight: 800;
}

.service-score-meta {
    color: #687386;
    font-size: 13px;
    line-height: 1.5;
}

.service-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.service-metric {
    background: #ffffff;
    border: 1px solid #e7ebf3;
    border-radius: 16px;
    padding: 18px;
}

.service-metric-label {
    color: #7a8496;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 9px;
}

.service-metric-value {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.service-metric-note {
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
    margin-top: 8px;
}

.service-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.service-stack {
    display: grid;
    gap: 18px;
}

.service-card {
    padding: 24px;
}

.service-section-title {
    font-size: 22px;
    line-height: 1.2;
    margin: 0 0 8px;
}

.service-section-text {
    color: #5b6473;
    line-height: 1.65;
    margin: 0 0 18px;
}

.service-table-wrap {
    overflow-x: auto;
}

.service-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.service-table th,
.service-table td {
    text-align: left;
    border-bottom: 1px solid #edf1f7;
    padding: 13px 10px;
    font-size: 14px;
}

.service-table th {
    color: #667085;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.service-table td:last-child,
.service-table th:last-child {
    text-align: right;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eff4ff;
    color: var(--service-accent-dark);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.service-bars {
    display: grid;
    gap: 14px;
}

.service-bar-row {
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr) 52px;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    color: #3f4653;
}

.service-bar-track {
    height: 12px;
    border-radius: 999px;
    background: #e8edf5;
    overflow: hidden;
}

.service-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--service-accent);
}

.service-side-card {
    position: sticky;
    top: 104px;
}

.service-side-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-side-list li {
    border: 1px solid #ecf0f7;
    border-radius: 14px;
    padding: 14px;
    background: #fbfcff;
}

.service-side-list strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.service-side-list span {
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.scenario-card {
    border: 1px solid #e7ebf3;
    border-radius: 16px;
    padding: 18px;
    background: #fbfcff;
}

.scenario-name {
    color: var(--service-accent-dark);
    font-weight: 900;
    margin-bottom: 8px;
}

.scenario-value {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 6px;
}

.scenario-note {
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.timeline-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-item {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.timeline-year {
    color: var(--service-accent);
    font-weight: 900;
}

.timeline-content {
    border-left: 3px solid #e7ebf3;
    padding-left: 14px;
    color: #4b5568;
    line-height: 1.55;
}

.plafond-card {
    border: 1px solid #e7ebf3;
    border-radius: 18px;
    padding: 20px;
    background: #fbfcff;
}

.plafond-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.plafond-amount {
    font-size: 28px;
    font-weight: 900;
}

.plafond-track {
    height: 34px;
    background: #e8edf5;
    border-radius: 12px;
    overflow: hidden;
}

.plafond-fill {
    height: 100%;
    width: var(--used);
    background: var(--service-accent);
    border-radius: inherit;
}

.service-note-box {
    border-radius: 16px;
    background: #101828;
    color: #ffffff;
    padding: 20px;
    line-height: 1.55;
}

.service-note-box strong {
    color: #ffffff;
}

.componenti-card {
    color: inherit;
    text-decoration: none;
}

.componenti-card:focus-visible {
    outline: 3px solid #4b73ff;
    outline-offset: 5px;
}

@media (max-width: 980px) {
    .service-demo-page {
        padding: 112px 16px 68px;
    }

    .service-hero-card,
    .service-layout {
        grid-template-columns: 1fr;
    }

    .service-side-card {
        position: static;
    }

    .service-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .service-topbar,
    .plafond-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-hero-card,
    .service-card {
        border-radius: 16px;
        padding: 20px;
    }

    .service-metrics,
    .scenario-grid {
        grid-template-columns: 1fr;
    }

    .service-bar-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* Platform Nexxum service replica */
.service-demo-page {
    background: #ffffff;
    color: #000b15;
    font-family: Montserrat, sans-serif;
    padding-top: 124px;
}

.platform-shell {
    max-width: 1200px;
}

.service-topbar {
    margin-bottom: 24px;
}

.service-back {
    color: #637381;
    font-size: 14px;
    font-weight: 600;
}

.service-demo-badge {
    border: 1px solid rgba(145, 158, 171, 0.32);
    background: #ffffff;
    color: #637381;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    padding: 6px 10px;
}

.platform-service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.platform-service-header > .platform-actions {
    display: none !important;
}

.platform-page-title {
    color: #000b15;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 24px;
    text-transform: uppercase;
}

.platform-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.service-title {
    color: #000b15;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    letter-spacing: 0;
}

.platform-vertical-divider {
    align-self: stretch;
    width: 1px;
    min-height: 74px;
    background: rgba(145, 158, 171, 0.24);
}

.platform-header-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.platform-chip-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 64px;
    border-radius: 16px;
    padding: 0 8px;
    background: #aaf27f;
    color: #229a16;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.platform-score-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
    padding: 6px 20px;
    border: 2px solid #54d62c;
    border-radius: 1.6px;
    color: #54d62c;
    background: #ffffff;
}

.platform-score-box strong {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

.platform-score-box span {
    color: #000000;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
}

.platform-last-update {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #000b15;
    font-size: 12px;
    line-height: 1.5;
}

.platform-last-update span {
    font-weight: 400;
}

.platform-last-update strong {
    font-weight: 700;
}

.platform-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.platform-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.714;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.platform-button-contained {
    background: #003968;
    color: #ffffff;
    box-shadow: 0 8px 16px 0 rgba(0, 57, 104, 0.24);
}

.platform-button-outlined {
    background: #ffffff;
    color: #003968;
    border: 1px solid rgba(145, 158, 171, 0.32);
}

.platform-button:hover {
    box-shadow: none;
}

.platform-icon-button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #003968;
    cursor: pointer;
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
}

.platform-icon-button:hover {
    background: rgba(0, 57, 104, 0.08);
}

.platform-icon-primary {
    background: #003968;
    color: #ffffff;
    font-size: 24px;
}

.platform-divider-line {
    height: 1px;
    background: rgba(145, 158, 171, 0.24);
    margin: 24px 0;
}

.platform-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.service-card,
.service-metric {
    position: relative;
    z-index: 0;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0px 6px 12px -2px rgba(145, 158, 171, 0.25), 0px 3px 7px -3px rgba(145, 158, 171, 0.3);
}

.service-card {
    padding: 0;
    overflow: hidden;
}

.platform-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 0;
}

.platform-card-header h2,
.service-section-title {
    color: #000b15;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5556;
    margin: 0;
}

.platform-card-header p {
    color: #637381;
    font-size: 14px;
    line-height: 1.5715;
    margin: 4px 0 0;
}

.platform-card-content,
.platform-status-card-content,
.service-card > .service-section-text,
.service-card > .service-table-wrap,
.service-card > .service-bars,
.service-card > .scenario-grid,
.service-card > .timeline-list,
.service-card > .plafond-card,
.service-card > .service-side-list,
.service-card > .service-note-box {
    margin-left: 24px;
    margin-right: 24px;
}

.platform-card-content {
    padding: 18px 0 24px;
}

.platform-card-content p {
    color: #000b15;
    font-size: 14px;
    line-height: 1.5715;
    margin: 0 0 12px;
}

.platform-card-content ul {
    color: #637381;
    font-size: 14px;
    line-height: 1.5715;
}

.platform-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.platform-card-toolbar h3 {
    color: #000b15;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}

.platform-card-content .platform-muted,
.platform-muted {
    color: #637381;
}

.platform-status-card-content {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 0 24px;
    text-align: center;
}

.platform-status-card-content p {
    color: #637381;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.platform-score-box-large {
    min-width: 116px;
    padding: 8px 24px;
}

.service-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.service-metric {
    padding: 24px;
}

.service-metric-label {
    color: #637381;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: uppercase;
}

.service-metric-value {
    color: #000b15;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

.service-metric-note {
    color: #637381;
    font-size: 14px;
    line-height: 1.5715;
}

.service-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

.service-stack {
    gap: 24px;
}

.service-section-title {
    padding: 24px 24px 0;
}

.service-section-text {
    color: #637381;
    font-size: 14px;
    line-height: 1.5715;
    margin-top: 4px;
    margin-bottom: 24px;
}

.service-table-wrap,
.service-bars,
.scenario-grid,
.timeline-list,
.plafond-card,
.service-side-list {
    margin-bottom: 24px;
}

.service-table {
    border-collapse: separate;
    border-spacing: 0 8px;
    min-width: 680px;
}

.service-table th {
    border-bottom: 0;
    background: #e6ebf0;
    color: #637381;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    padding: 14px 16px;
}

.service-table th:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    box-shadow: inset 8px 0 0 #ffffff;
    padding-left: 24px;
}

.service-table th:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: inset -8px 0 0 #ffffff;
    padding-right: 24px;
}

.service-table td {
    border-bottom: 1px solid rgba(145, 158, 171, 0.24);
    color: #000b15;
    font-size: 14px;
    line-height: 1.5715;
    padding: 14px 16px;
}

.service-table td:first-child {
    padding-left: 24px;
}

.service-table td:last-child {
    padding-right: 24px;
}

.service-table td:nth-child(3) {
    max-width: 280px;
}

.service-chip {
    background: #e6ebf0;
    color: #003968;
    font-size: 12px;
    font-weight: 700;
    height: 24px;
    padding: 0 8px;
}

.service-bar-row {
    grid-template-columns: 190px minmax(0, 1fr) 58px;
    color: #000b15;
    font-size: 14px;
    line-height: 1.5715;
}

.service-bar-track {
    height: 8px;
    background: #f4f6f8;
    border-radius: 8px;
}

.service-bar-fill {
    background: #003968;
}

.scenario-card,
.plafond-card,
.service-side-list li {
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 12px;
    background: #ffffff;
}

.scenario-name {
    color: #003968;
    font-size: 14px;
    font-weight: 700;
}

.scenario-value,
.plafond-amount {
    color: #000b15;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

.scenario-note,
.timeline-content,
.service-side-list span {
    color: #637381;
    font-size: 14px;
    line-height: 1.5715;
}

.timeline-year {
    color: #003968;
    font-weight: 700;
}

.plafond-fill {
    background: #003968;
}

.service-side-card {
    top: 116px;
}

.service-note-box {
    background: #f4f6f8;
    color: #000b15;
    border-radius: 12px;
    margin-bottom: 24px;
}

.service-note-box strong {
    color: #000b15;
}

.platform-two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(240px, 0.65fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.platform-section-divider {
    width: 1px;
    min-height: 100%;
    background: rgba(145, 158, 171, 0.24);
}

.platform-centered-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.platform-centered-action h3 {
    color: #000b15;
    font-size: 18px;
    line-height: 1.5556;
    margin: 0;
}

.platform-inner-title {
    color: #000b15;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    margin: 22px 0 10px;
}

.period-card,
.fra-upload-panel,
.bio-toolbar,
.bio-question-card,
.aid-section {
    position: relative;
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0px 6px 12px -2px rgba(145, 158, 171, 0.25), 0px 3px 7px -3px rgba(145, 158, 171, 0.3);
}

.period-card {
    padding: 24px;
    margin-bottom: 24px;
}

.period-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.period-title strong {
    color: #000b15;
    font-size: 16px;
}

.period-title span {
    color: #637381;
}

.period-header,
.period-row {
    display: grid;
    grid-template-columns: 60px repeat(12, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.period-header strong {
    color: #637381;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

.period-row > strong {
    color: #637381;
    font-size: 14px;
    font-weight: 700;
}

.period-cell {
    display: block;
    width: 36px;
    height: 36px;
    justify-self: center;
    border-radius: 4px;
    background: #003968;
}

.period-missing {
    background: #f4f6f8;
    border: 2px solid #ff4842;
}

.period-empty {
    background: #f4f6f8;
}

.period-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    color: #637381;
    font-size: 12px;
}

.period-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.period-legend .period-cell {
    width: 14px;
    height: 14px;
}

.fra-upload-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 24px;
}

.fra-upload-step {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
}

.fra-upload-step:first-child {
    background: #f9fafb;
}

.fra-upload-step span {
    color: #003968;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.fra-upload-step h3 {
    color: #000b15;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.fra-upload-step p {
    color: #637381;
    font-size: 14px;
    margin: 0;
}

.fra-dropzone {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed rgba(145, 158, 171, 0.32);
    border-radius: 16px;
    background: #f4f6f8;
    color: #003968;
    text-align: center;
}

.fra-dropzone strong {
    color: #000b15;
}

.fra-dropzone small {
    color: #637381;
}

.bio-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(145, 158, 171, 0.24);
    margin-bottom: 24px;
}

.bio-tabs button {
    border: 0;
    background: transparent;
    color: #637381;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.bio-tabs button.active {
    color: #003968;
    border-bottom: 2px solid #003968;
}

.bio-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.bio-toolbar p {
    color: #637381;
    margin: 0;
}

.bio-question-list {
    display: grid;
    gap: 24px;
}

.bio-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: linear-gradient(90deg, rgba(200, 225, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
}

.bio-question-head h3 {
    color: #000b15;
    font-size: 18px;
    line-height: 1.5556;
    margin: 0;
}

.bio-valid,
.bio-check-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #54d62c;
    color: #ffffff;
    font-weight: 700;
}

.bio-valid {
    width: 22px;
    height: 22px;
}

.bio-question-body {
    padding: 16px 24px 24px;
}

.bio-textarea {
    min-height: 72px;
    border: 1px solid rgba(145, 158, 171, 0.32);
    border-radius: 40px;
    padding: 16px 20px;
    color: #000b15;
    font-size: 14px;
    line-height: 1.5715;
}

.bio-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #637381;
    font-size: 12px;
    margin-top: 8px;
}

.bio-counter button {
    border: 0;
    background: transparent;
    color: #1890ff;
    font-family: inherit;
    font-weight: 600;
}

.bio-check-circle {
    width: 56px;
    height: 56px;
    font-size: 32px;
}

.bio-complete {
    color: #54d62c;
    font-size: 14px;
    text-transform: uppercase;
}

.aid-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.aid-chip-row span {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    color: #637381;
    font-size: 12px;
    line-height: 1.5;
    text-transform: uppercase;
}

.aid-chip-row strong {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border: 1px solid rgba(145, 158, 171, 0.32);
    border-radius: 16px;
    padding: 0 12px;
    color: #000b15;
    font-size: 13px;
    text-transform: none;
}

.platform-bullet-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.platform-mini-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.aid-section {
    padding: 24px;
    margin-bottom: 24px;
}

.aid-section h2 {
    color: #000b15;
    font-size: 18px;
    margin: 0 0 8px;
}

.aid-section h2 em {
    color: #637381;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
}

.aid-section p {
    color: #637381;
    font-size: 14px;
}

.aid-plafond-bar {
    position: relative;
    height: 36px;
    border-radius: 8px;
    background: #f4f6f8;
    overflow: hidden;
}

.aid-plafond-bar span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: 8px;
    background: #003968;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.aid-plafond-meta,
.aid-residue {
    display: flex;
    justify-content: space-between;
    color: #637381;
    font-size: 14px;
    margin-top: 10px;
}

.aid-residue {
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    background: #e6ebf0;
    padding: 12px;
}

/* === Bilancio Storico (BSA) layout === */
.bsa-title-block {
    margin: 4px 0 32px;
}

.bsa-page-title {
    color: #000b15;
    font-size: clamp(32px, 4.4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.bsa-page-subtitle {
    color: #000b15;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    max-width: 820px;
}

.bsa-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.85fr);
    gap: 56px;
    align-items: start;
    margin-bottom: 64px;
}

.bsa-cos-e p {
    color: #000b15;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 14px;
}

.bsa-block-title {
    color: #000b15;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 16px;
}

.bsa-block-text {
    color: #000b15;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 18px;
}

.bsa-tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #dbe6ff;
    color: #00306a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.bsa-tutorial-btn:hover {
    background: #c7d5f7;
}

.bsa-tutorial-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00306a;
    color: #ffffff;
    font-size: 9px;
}

.bsa-status-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 28px 24px;
    box-shadow: 0 18px 40px -18px rgba(15, 36, 80, 0.18), 0 6px 16px -8px rgba(15, 36, 80, 0.12);
}

.bsa-status-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 12px;
    align-items: center;
    padding-bottom: 22px;
}

.bsa-status-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.bsa-status-divider {
    align-self: stretch;
    width: 1px;
    background: rgba(145, 158, 171, 0.32);
}

.bsa-status-label {
    color: #637381;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bsa-status-label small {
    color: #b6bdc8;
    font-weight: 400;
    margin-left: 4px;
}

.bsa-status-note {
    color: #637381;
    font-size: 12px;
}

.bsa-chip-waiting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ffe49a;
    color: #6b4a00;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.bsa-chip-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f0a000;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.bsa-donut {
    position: relative;
    width: 130px;
    height: 130px;
}

.bsa-donut svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.bsa-donut-bg {
    fill: none;
    stroke: #ececec;
    stroke-width: 14;
}

.bsa-donut-fg {
    fill: none;
    stroke: #36B37E;
    stroke-width: 14;
    stroke-linecap: round;
}

.bsa-donut-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000b15;
    font-size: 22px;
    font-weight: 800;
}

.bsa-status-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
    padding-top: 22px;
    border-top: 1px solid rgba(145, 158, 171, 0.24);
}

.bsa-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

.platform-button-outlined.bsa-btn-icon {
    background: #dbe6ff;
    color: #00306a;
    border: 0;
}

.bsa-btn-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.bsa-btn-glyph svg,
.bsa-tutorial-arrow svg,
.bsa-chip-check svg,
.bsa-chip-bang svg,
.bsa-circle-btn svg,
.cr-icon-doc svg,
.cr-dropzone-plus svg,
.aid-doc-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.bsa-circle-btn svg { width: 18px; height: 18px; }
.cr-icon-doc { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
.cr-dropzone-plus svg { width: 20px; height: 20px; }
.aid-doc-icon { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; }

.bsa-tutorial-arrow { padding: 0; }
.bsa-tutorial-arrow svg { width: 8px; height: 8px; }

.bsa-chip-check { padding: 2px; }
.bsa-chip-check svg { width: 12px; height: 12px; }
.bsa-chip-bang { padding: 2px; }
.bsa-chip-bang svg { width: 12px; height: 12px; }

.bsa-section-title {
    color: #000b15;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 28px;
}

.bsa-platform-block {
    margin-bottom: 48px;
}

.bsa-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.bsa-block-head .bsa-block-title {
    margin: 0;
}

.bsa-block-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bsa-circle-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #00306a;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 36, 80, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bsa-circle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 36, 80, 0.22);
}

.bsa-circle-btn-dark {
    background: #00306a;
    color: #ffffff;
}

.bsa-circle-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff4d4d;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
}

.bsa-platform-block .service-table-wrap {
    margin: 0;
}

.bsa-platform-block .service-table {
    border-spacing: 0;
    width: 100%;
    min-width: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 36, 80, 0.08);
}

.bsa-platform-block .service-table th {
    background: #eef3fb;
    color: #6b7488;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 18px;
    box-shadow: none;
    border-radius: 0;
}

.bsa-platform-block .service-table th:first-child {
    border-radius: 0;
    padding-left: 24px;
    box-shadow: none;
}

.bsa-platform-block .service-table th:last-child {
    border-radius: 0;
    padding-right: 24px;
    box-shadow: none;
}

.bsa-platform-block .service-table td {
    border-bottom: 1px solid #eef0f4;
    padding: 16px 18px;
    color: #000b15;
}

.bsa-platform-block .service-table td:first-child {
    padding-left: 24px;
    color: #00306a;
    font-weight: 700;
}

.bsa-platform-block .service-table tbody tr:last-child td {
    border-bottom: 0;
}

.bsa-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
    align-items: start;
    margin-top: 16px;
}

.bsa-bottom-text p {
    color: #000b15;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 14px;
}

.bsa-bottom-text .bsa-block-title {
    margin-top: 8px;
}

.bsa-bottom-text .bsa-block-title + p {
    margin-top: 0;
}

.bsa-pdf-preview {
    position: relative;
}

.bsa-pdf-page {
    background: #ffffff;
    border-radius: 4px;
    padding: 26px 30px 22px;
    box-shadow: 0 24px 50px -20px rgba(15, 36, 80, 0.25), 0 4px 14px rgba(15, 36, 80, 0.08);
    font-family: 'Inter', 'Montserrat', sans-serif;
}

.bsa-pdf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bsa-pdf-kicker {
    color: #6b7488;
    font-size: 9.5px;
    letter-spacing: 0.05em;
}

.bsa-pdf-kicker strong {
    color: #000b15;
}

.bsa-pdf-logo {
    height: 18px;
    width: auto;
}

.bsa-pdf-title {
    color: #000b15;
    font-size: 26px;
    font-weight: 800;
    margin: 6px 0 10px;
}

.bsa-pdf-desc {
    color: #6b7488;
    font-size: 10.5px;
    line-height: 1.55;
    margin: 0 0 16px;
}

.bsa-pdf-h5 {
    color: #000b15;
    font-size: 11px;
    font-weight: 800;
    margin: 0 0 2px;
    letter-spacing: 0.02em;
}

.bsa-pdf-small {
    display: block;
    color: #6b7488;
    font-size: 9.5px;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.bsa-pdf-chart {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    align-items: end;
    gap: 6px;
    height: 170px;
    padding: 14px 6px 0;
    border-bottom: 1px solid #e6e8ee;
}

.bsa-pdf-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
}

.bsa-pdf-bar-val {
    color: #000b15;
    font-size: 8.5px;
    font-weight: 700;
}

.bsa-pdf-bar {
    width: 100%;
    border-radius: 2px 2px 0 0;
    min-height: 4px;
}

.bsa-pdf-xaxis {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    padding: 8px 6px 14px;
}

.bsa-pdf-xaxis span {
    text-align: center;
    color: #000b15;
    font-size: 10px;
    font-weight: 800;
}

.bsa-pdf-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 6px 0 14px;
}

.bsa-pdf-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bsa-pdf-row strong {
    color: #000b15;
    font-size: 10px;
    font-weight: 800;
}

.bsa-pdf-row-track {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: #eef0f4;
}

.bsa-pdf-row-sect,
.bsa-pdf-row-imp {
    position: absolute;
    top: -3px;
    transform: translateX(-50%);
    height: 14px;
    padding: 0 8px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 8px;
    font-weight: 800;
    line-height: 14px;
    letter-spacing: 0.04em;
}

.bsa-pdf-row-sect {
    background: #f0c850;
}

.bsa-pdf-row-imp {
    background: #6ec46e;
}

.bsa-pdf-foot {
    color: #000b15;
    font-size: 10px;
    line-height: 1.55;
    margin: 14px 0 0;
}

.bsa-pdf-footbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid #eef0f4;
    color: #6b7488;
    font-size: 9px;
    letter-spacing: 0.05em;
}

.bsa-pdf-period {
    color: #00306a;
    font-weight: 700;
}

/* Bilancio Prospettico – status chip & extras */
.bsa-chip-ready {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #b9f0c8;
    color: #0b6835;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bsa-chip-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #20a155;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.bsa-status-note strong {
    color: #000b15;
    font-weight: 800;
}

.bsa-btn-disabled,
.bsa-btn-disabled:hover {
    background: #d6dae0;
    color: #95a0ad;
    box-shadow: none;
    cursor: not-allowed;
}

.bsa-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #00306a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 48, 106, 0.22);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.bsa-create-btn:hover {
    background: #002553;
    box-shadow: 0 6px 14px rgba(0, 48, 106, 0.3);
}

/* Forward Looking PDF preview */
.bsa-pdf-page-fwd .bsa-pdf-chart,
.bsa-pdf-page-fwd .bsa-pdf-xaxis {
    display: none;
}

.bsa-fwd-scenario {
    margin-top: 14px;
}

.bsa-fwd-scenario-label {
    color: #000b15;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.bsa-fwd-card {
    border: 1px solid #e6e8ee;
    border-radius: 6px;
    padding: 12px 14px 14px;
    background: #ffffff;
}

.bsa-fwd-chips {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.bsa-fwd-chip {
    text-align: center;
    border-radius: 999px;
    padding: 4px 4px;
    color: #ffffff;
    font-size: 7.5px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

.bsa-fwd-chip-red { background: #e85a47; }
.bsa-fwd-chip-orange { background: #f0a05c; }
.bsa-fwd-chip-yellow { background: #f1d24f; color: #6b4a00; }
.bsa-fwd-chip-lime { background: #b8df6f; }
.bsa-fwd-chip-green { background: #6ec46e; }

.bsa-fwd-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bsa-fwd-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    gap: 10px;
}

.bsa-fwd-row strong {
    color: #000b15;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.bsa-fwd-track {
    position: relative;
    height: 6px;
    border-radius: 4px;
    background: #eef0f4;
}

.bsa-fwd-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #ffffff;
}

.bsa-fwd-dot-red { background: #e85a47; }
.bsa-fwd-dot-orange { background: #f0a05c; }
.bsa-fwd-dot-yellow { background: #f1d24f; }
.bsa-fwd-dot-lime { background: #b8df6f; }
.bsa-fwd-dot-green { background: #6ec46e; }

/* Centrale Rischi – status chip SCADUTO */
.bsa-chip-expired {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ffb3b3;
    color: #b30000;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bsa-chip-bang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d63030;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

/* CR Timeline */
.cr-timeline {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 4px 14px rgba(15, 36, 80, 0.08);
}

.cr-timeline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 22px;
}

.cr-timeline-titles {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.cr-timeline-titles .bsa-block-title { margin: 0; }

.cr-disponibile {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #dbe6ff;
    color: #00306a;
    font-size: 12px;
    font-weight: 700;
}

.cr-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    color: #000b15;
    font-size: 12px;
    font-weight: 600;
}

.cr-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cr-legend-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
}

.cr-legend-mensile { background: #6f87a8; }
.cr-legend-navy { background: #00306a; }
.cr-legend-plus { background: #00306a; }
.cr-legend-assente { background: #ff4d4d; }

.cr-timeline-grid {
    position: relative;
}

.cr-bars {
    display: grid;
    grid-template-columns: repeat(48, 1fr);
    gap: 3px;
    align-items: end;
    padding: 12px 0 6px;
}

.cr-bar {
    position: relative;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cr-bar-empty { background: #d6dae0; opacity: 0.6; }
.cr-bar-navy { background: #00306a; }
.cr-bar-plus { background: #00306a; }
.cr-bar-mensile { background: #6f87a8; }
.cr-bar-assente { background: #ff4d4d; }

.cr-bar-label {
    color: #ffffff;
    font-size: 8px;
    font-weight: 700;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 0.04em;
}

.cr-bar-plus .cr-bar-label,
.cr-bar-mensile .cr-bar-label {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 9px;
}

.cr-period-overlay {
    position: absolute;
    top: 4px;
    left: calc(3 / 48 * 100%);
    width: calc(12 / 48 * 100%);
    height: 72px;
    background: rgba(112, 188, 134, 0.32);
    border-radius: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    pointer-events: none;
}

.cr-period-overlay span {
    background: #6ec46e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.cr-months {
    display: grid;
    grid-template-columns: repeat(48, 1fr);
    gap: 3px;
    margin-top: 6px;
    color: #6b7488;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.cr-years {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 6px;
    color: #000b15;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

/* Storico table specifics */
.cr-storico-table td:nth-child(4),
.cr-storico-table td:nth-child(5),
.cr-storico-table td:nth-child(6) {
    text-align: center;
}

.cr-icon-doc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #00306a;
    font-size: 18px;
}

.cr-pending-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff0d4;
    color: #946400;
    font-size: 12px;
    font-weight: 700;
}

.cr-mini-donut {
    display: inline-block;
    width: 36px;
    height: 36px;
}

.cr-mini-donut svg {
    width: 100%;
    height: 100%;
}

/* CR how-to section */
.cr-howto {
    margin-bottom: 40px;
}

.cr-needs {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cr-needs li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #000b15;
    font-size: 15px;
}

.cr-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #00306a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.cr-need-icon {
    font-size: 18px;
}

.cr-spid-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 6px;
    background: #06c;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: lowercase;
}

.cr-howto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.cr-howto-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 6px 18px rgba(15, 36, 80, 0.08);
}

.cr-howto-title {
    color: #000b15;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cr-howto-sub {
    color: #6b7488;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 20px;
}

.cr-steps {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cr-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #000b15;
    font-size: 14px;
    line-height: 1.5;
}

.cr-steps li strong { color: #000b15; }

.cr-step-text { padding-top: 4px; }

.cr-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    border: 2px dashed #00306a;
    border-radius: 14px;
    background: #f1f5fc;
    color: #000b15;
    text-align: center;
}

.cr-dropzone strong { font-size: 14px; font-weight: 700; }
.cr-dropzone small { font-size: 12px; color: #6b7488; }

.cr-dropzone-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #00306a;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cr-bullet-list {
    margin: 8px 0 14px 18px;
    padding: 0;
    color: #000b15;
    font-size: 15px;
    line-height: 1.65;
}

.cr-bullet-list li { margin-bottom: 6px; }

/* CR PDF preview */
.bsa-pdf-page-cr .bsa-pdf-chart { display: none; }

.cr-pdf-sub {
    color: #6b7488;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 2px 0 12px;
}

.cr-pdf-tabs,
.cr-pdf-trends {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 10px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #6b7488;
}

.cr-pdf-tabs .active,
.cr-pdf-trends .active {
    color: #000b15;
    border-bottom: 2px solid #000b15;
    padding-bottom: 2px;
}

.cr-trend-blue { color: #00306a; }

.cr-pdf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0;
    padding: 8px 10px;
    background: #f4f6f9;
    border-radius: 6px;
    color: #000b15;
    font-size: 8.5px;
    font-weight: 700;
}

.cr-pdf-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.cr-pdf-legend small { font-weight: 400; color: #6b7488; }

.cr-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cr-dot-grey { background: #d6dae0; }
.cr-dot-green { background: #4caf50; }
.cr-dot-yellow { background: #f5b400; }
.cr-dot-red { background: #e53935; }
.cr-dot-tri {
    width: 0;
    height: 0;
    border-radius: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 9px solid #e53935;
}

.cr-pdf-dotrow {
    display: grid;
    grid-template-columns: repeat(36, 1fr);
    gap: 2px;
    margin: 6px 0;
}

.cr-dot-sm {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 0 auto;
}

.cr-pdf-chart {
    display: grid;
    grid-template-columns: repeat(36, minmax(0, 1fr));
    align-items: end;
    gap: 2px;
    height: 150px;
    padding-top: 16px;
    border-bottom: 1px solid #e6e8ee;
    overflow: hidden;
}

.cr-pdf-barcol {
    display: flex;
    align-items: flex-end;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.cr-pdf-bar {
    position: relative;
    width: 100%;
    min-width: 0;
    border-radius: 2px 2px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
}

.cr-pdf-bar-pct {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    color: #111827;
    font-size: 6.5px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}

.cr-pdf-bar-blue { background: #2a5694; }

.cr-pdf-chart-blue {
    height: 100px;
    margin-top: 8px;
}

.cr-pdf-xaxis {
    display: grid;
    grid-template-columns: repeat(36, 1fr);
    gap: 2px;
    margin-top: 4px;
    color: #000b15;
    font-size: 7px;
    font-weight: 700;
    text-align: center;
}

.cr-pdf-years {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 4px;
    color: #000b15;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.cr-pdf-h5 {
    color: #000b15;
    font-size: 11px;
    font-weight: 800;
    margin: 14px 0 4px;
    letter-spacing: 0.02em;
}

.cr-trend-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #000b15;
    font-size: 8px;
}

.cr-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 7.5px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.cr-pill-red { background: #ffd9d9; color: #b30000; }
.cr-pill-green { background: #c8f0c8; color: #1a6b1a; }

.cr-pdf-foot-note {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f4f6f9;
    border-radius: 999px;
    color: #6b7488;
    font-size: 8.5px;
    text-align: left;
}

/* === Aiuti di Stato === */
.aid-status-card {
    align-self: start;
    padding: 26px 28px;
}

.aid-status-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding-bottom: 22px;
}

.aid-chip-elab {
    background: #b9f0c8;
    color: #0b6835;
}

.aid-status-note {
    color: #6b7488;
    font-size: 13px;
}

.aid-status-note strong {
    color: #000b15;
    font-size: 14px;
}

.aid-status-actions {
    justify-content: center;
}

.aid-bullet-list {
    margin: 8px 0 0 18px;
    padding: 0;
    color: #000b15;
    font-size: 15px;
    line-height: 1.7;
}

.aid-bullet-list li { margin-bottom: 4px; }

.aid-pill-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.aid-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.aid-pill-label {
    color: #6b7488;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.aid-pill-label small {
    color: #b6bdc8;
    font-weight: 400;
}

.aid-pill-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #dbe6ff;
    color: #00306a;
    font-size: 14px;
    font-weight: 800;
}

/* Progress bars FCG / De minimis */
.aid-bar-block {
    position: relative;
    margin-bottom: 36px;
}

.aid-bar-title {
    color: #000b15;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 6px;
}

.aid-bar-title small {
    color: #6b7488;
    font-size: 14px;
    font-weight: 600;
    margin-left: 6px;
}

.aid-detail-link {
    display: inline-block;
    color: #00306a;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
    margin-bottom: 12px;
}

.aid-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.aid-progress-bar {
    position: relative;
    flex: 1;
    height: 36px;
    border-radius: 999px;
    background: #d6dae0;
    overflow: visible;
}

.aid-progress-bar > span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #00306a;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 0 16px;
    white-space: nowrap;
}

.aid-progress-total {
    color: #000b15;
    font-size: 14px;
    font-weight: 700;
    min-width: 90px;
    text-align: right;
}

.aid-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000b15;
    font-size: 13px;
    margin-top: 4px;
    padding-right: 102px;
}

.aid-progress-meta strong { font-weight: 800; }

.aid-progress-pct {
    color: #00306a;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    margin-top: 4px;
    padding-right: 102px;
}

.aid-progress-pct-inline {
    color: #00306a;
    font-size: 13px;
    font-weight: 700;
}

.aid-leftover-chip {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #d9f1d4;
    color: #285c25;
    font-size: 14px;
    font-weight: 600;
}

.aid-leftover-chip strong {
    color: #285c25;
    font-weight: 800;
    margin-left: 4px;
}

/* Storico aiuti — horizontal bars */
.aid-history-block {
    margin-bottom: 48px;
}

.aid-history-block .bsa-block-title small {
    color: #6b7488;
    font-size: 16px;
    font-weight: 500;
    margin-left: 6px;
}

.aid-history-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.aid-history-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 14px;
    align-items: center;
}

.aid-history-year {
    color: #000b15;
    font-size: 16px;
    font-weight: 800;
    text-align: right;
}

.aid-history-bar {
    height: 32px;
    border-radius: 999px;
    background: #00306a;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 18px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

/* Storico Aiuti di Stato ottenuti table */
.aid-table-block .service-table {
    min-width: 1100px;
}

.aid-table-actions {
    display: flex;
    gap: 10px;
}

.aid-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: #dbe6ff;
    color: #00306a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.aid-doc-btn:hover { background: #c7d5f7; }

/* Regolamento section */
.aid-section {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0;
    margin: 16px 0 32px;
}

.aid-section h3 { margin-bottom: 8px; }

/* Promo cards: incentivi.gov.it + MIMIT */
.aid-cta-title {
    margin-top: 32px;
    font-size: 20px;
}

.aid-promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 16px 0 12px;
}

.aid-promo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    border-radius: 22px;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aid-promo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 36, 80, 0.22);
}

.aid-promo-purple { background: #3b13c5; }
.aid-promo-blue { background: #1a5cb0; }

.aid-promo-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 24px;
    font-weight: 800;
}

.aid-promo-tag {
    position: relative;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.aid-promo-tag::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 6px;
    background: #ff4b6e;
    border-radius: 3px;
}

.aid-promo-crest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 28px;
}

.aid-promo-mimit strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.aid-promo-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    text-align: center;
    margin-bottom: 32px;
}

.aid-promo-links a {
    color: #1a5cb0;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
}

/* === Biografia d'Impresa === */
.bio-intro-text {
    color: #000b15;
    font-size: 15px;
    margin: 0 0 24px;
}

.bio-questions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 48px;
}

.bio-q-card {
    border-radius: 14px;
    overflow: hidden;
    background: #eef3fb;
    box-shadow: 0 2px 6px rgba(15, 36, 80, 0.06);
}

.bio-q-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: #dbe6ff;
}

.bio-q-head h4 {
    color: #000b15;
    font-size: 14px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bio-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.bio-status-ok { background: #20a155; }
.bio-status-ko { background: #e53935; }

.bio-q-body {
    padding: 16px 22px 20px;
}

.bio-q-text {
    color: #6b7488;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 14px;
}

.bio-q-input {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 36, 80, 0.08);
}

.bio-q-input-placeholder {
    color: #aab1bd;
    font-size: 13px;
    font-style: italic;
}

.bio-q-hint {
    color: #8a93a3;
    font-size: 12px;
    margin: 8px 0 0;
    padding-left: 4px;
}

.bio-final {
    margin-bottom: 32px;
}

.bio-final p {
    color: #000b15;
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 24px;
}

.bio-final .bsa-block-title {
    margin-top: 12px;
}

@media (max-width: 980px) {
    .platform-service-header,
    .platform-header-left {
        align-items: flex-start;
        flex-direction: column;
    }

    .platform-vertical-divider {
        width: 100%;
        min-height: 1px;
    }

    .platform-header-status {
        align-items: flex-start;
    }

    .platform-actions {
        align-items: flex-start;
        flex-direction: row;
    }

    .platform-intro-grid,
    .service-layout {
        grid-template-columns: 1fr;
    }

    .service-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .platform-two-columns,
    .fra-upload-panel {
        grid-template-columns: 1fr;
    }

    .platform-section-divider {
        width: 100%;
        height: 1px;
        min-height: 1px;
    }

    .period-header,
    .period-row {
        grid-template-columns: 44px repeat(12, minmax(18px, 1fr));
        gap: 5px;
    }

    .period-cell {
        width: 22px;
        height: 22px;
    }

    .bsa-intro-grid,
    .bsa-bottom-grid,
    .cr-howto-grid,
    .aid-promo-grid,
    .aid-promo-links {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .bsa-status-card {
        max-width: 480px;
    }

    .aid-table-block {
        overflow-x: auto;
    }

    .cr-timeline {
        overflow-x: auto;
    }

    .cr-bars,
    .cr-months,
    .cr-years {
        min-width: 720px;
    }
}

@media (max-width: 640px) {
    .service-demo-page {
        padding-top: 108px;
    }

    .service-title {
        font-size: 26px;
    }

    .service-metrics {
        grid-template-columns: 1fr;
    }

    .platform-actions {
        flex-direction: column;
    }

    .service-bar-row {
        grid-template-columns: 1fr;
    }

    .bio-toolbar,
    .platform-card-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .period-card {
        overflow-x: auto;
    }

    .period-header,
    .period-row {
        min-width: 560px;
    }

    .bsa-page-title {
        font-size: 32px;
    }

    .bsa-page-subtitle {
        font-size: 17px;
    }

    .bsa-status-grid {
        grid-template-columns: 1fr;
    }

    .bsa-status-divider {
        width: 100%;
        height: 1px;
        min-height: 1px;
    }

    .bsa-block-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .bsa-platform-block .service-table-wrap {
        overflow-x: auto;
    }
}

/* ============================================================ */
/* === Centrale Rischi (Fra) — platform-faithful components ==== */
/* ============================================================ */

/* Page header: title H3 + divider + status chip + score */
.fra-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0;
}

.fra-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex-wrap: wrap;
}

.fra-page-title {
    color: #212B36;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.fra-header-divider {
    width: 1px;
    height: 40px;
    background: rgba(145, 158, 171, 0.24);
    flex-shrink: 0;
}

.fra-header-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.fra-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fra-divider {
    border: 0;
    border-top: 1px solid rgba(145, 158, 171, 0.24);
    margin: 16px 0 24px;
}

/* Chips (MUI Chip filled) */
.fra-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.fra-chip-success { background: #C8FACD; color: #1B5E20; }
.fra-chip-warning { background: #FFE7BA; color: #7A4F01; }
.fra-chip-error   { background: #FFE7D9; color: #B72136; }

/* Score (circular progress with number) */
.fra-score {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.fra-score svg { width: 100%; height: 100%; display: block; }

.fra-score-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212B36;
    font-size: 16px;
    font-weight: 700;
}

/* Buttons (MUI Button outlined / icon button) */
.fra-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
}

.fra-btn-outlined {
    background: #ffffff;
    color: #003768;
    border-color: rgba(0, 55, 104, 0.5);
}

.fra-btn-outlined:hover {
    background: rgba(0, 55, 104, 0.08);
    border-color: #003768;
}

.fra-btn-outlined svg {
    width: 14px;
    height: 14px;
}

.fra-btn-icon-only {
    width: 36px;
    padding: 0;
    color: #003768;
    border-radius: 50%;
}

.fra-btn-icon-only svg { width: 20px; height: 20px; }

.fra-btn-icon-only:hover { background: rgba(0, 55, 104, 0.08); }

/* Periodi Analizzati card */
.fra-periods-card {
    background: #ffffff;
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.fra-periods-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #212B36;
    font-size: 16px;
    font-weight: 700;
}

.fra-info-icon {
    display: inline-flex;
    align-items: center;
    color: #637381;
    cursor: help;
}

.fra-info-icon svg { width: 18px; height: 18px; }

.fra-periods-row {
    display: grid;
    grid-template-columns: 60px repeat(12, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.fra-periods-head span {
    color: #637381;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
}

.fra-periods-year {
    color: #637381;
    font-size: 14px;
    font-weight: 700;
}

.fra-cell-wrap {
    display: flex;
    justify-content: center;
}

.fra-cell {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    transition: all 0.2s;
    background: #DFE3E8;
}

.fra-cell-full { background: #003768; }
.fra-cell-monthly { background: #003768; }
.fra-cell-absentee {
    background: #DFE3E8;
    border: 2px solid #FF5630;
}
.fra-cell-blank { background: #E4ECFE; }

.fra-periods-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 12px;
}

.fra-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fra-legend-dot {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.fra-legend-item span {
    color: #637381;
    font-size: 12px;
}

/* Upload section (2-col with vertical divider) */
.fra-upload {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 32px;
}

.fra-upload-step {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 32px;
}

.fra-upload-step:first-child {
    background: #F9FAFB;
}

.fra-upload-vdiv {
    width: 1px;
    background: rgba(145, 158, 171, 0.24);
    align-self: stretch;
}

.fra-upload-overline {
    color: #003768;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.fra-upload-title {
    color: #212B36;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.fra-upload-text {
    color: #637381;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.fra-upload-btn {
    align-self: flex-start;
}

.fra-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px;
    border: 2px dashed rgba(0, 55, 104, 0.32);
    border-radius: 12px;
    background: rgba(0, 55, 104, 0.04);
    color: #212B36;
    text-align: center;
}

.fra-dropzone-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #E4ECFE;
    color: #003768;
    margin-bottom: 4px;
}

.fra-dropzone-icon svg { width: 22px; height: 22px; }

.fra-dropzone strong { font-size: 14px; font-weight: 700; }
.fra-dropzone small { font-size: 12px; color: #637381; }

/* History (description + Storico table) */
.fra-history {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.fra-history-intro h3,
.fra-history-table h3 {
    color: #212B36;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
}

.fra-history-lead {
    color: #212B36;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
}

.fra-history-text {
    color: #212B36;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

/* Storico table */
.fra-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 12px;
    background: #ffffff;
}

.fra-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 14px;
}

.fra-table thead {
    background: #F4F6F8;
}

.fra-table th {
    text-align: left;
    padding: 14px 16px;
    color: #637381;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(145, 158, 171, 0.24);
}

.fra-table td {
    padding: 14px 16px;
    color: #212B36;
    border-bottom: 1px solid rgba(145, 158, 171, 0.16);
    vertical-align: middle;
}

.fra-table tbody tr:last-child td { border-bottom: 0; }

.fra-table tbody tr:hover { background: rgba(145, 158, 171, 0.08); }

.fra-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #003768;
    text-decoration: none;
}

.fra-icon-link:hover { background: rgba(0, 55, 104, 0.08); }
.fra-icon-link svg { width: 18px; height: 18px; }

/* Tutorial section */
.fra-tutorial {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 40px;
}

.fra-tut-title {
    color: #212B36;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

/* Needs: 3-card grid */
.fra-tut-needs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fra-tut-need {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 16px;
}

.fra-tut-need-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #E4ECFE;
    color: #003768;
    flex-shrink: 0;
}

.fra-tut-need-icon svg { width: 26px; height: 26px; }

.fra-tut-need-body {
    display: flex;
    flex-direction: column;
}

.fra-tut-need-label {
    color: #637381;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.5;
}

.fra-tut-need-title {
    color: #212B36;
    font-size: 14px;
    font-weight: 700;
}

/* Steps: 2 dashed boxes + center arrow */
.fra-tut-steps {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
}

.fra-tut-step-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: #ffffff;
    border: 2px dashed rgba(0, 55, 104, 0.24);
    border-radius: 16px;
}

.fra-tut-step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #003768;
}

.fra-tut-step-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.fra-tut-step-glyph svg { width: 24px; height: 24px; }

.fra-tut-step-head strong {
    color: #003768;
    font-size: 16px;
    font-weight: 700;
}

.fra-tut-step-sub {
    color: #637381;
    font-size: 12px;
    margin: 0;
}

.fra-tut-step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fra-tut-step-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.fra-tut-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #003768;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.fra-tut-step-text {
    color: #637381;
    font-size: 14px;
    line-height: 1.55;
    padding-top: 4px;
}

.fra-tut-step-text a {
    color: #003768;
    text-decoration: underline;
    font-weight: 600;
}

.fra-tut-step-foot {
    color: #637381;
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

.fra-tut-step-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #003768;
}

.fra-tut-step-arrow svg { width: 32px; height: 32px; }

/* Info: 4 benefits */
.fra-tut-info {
    background: #ffffff;
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 16px;
    padding: 40px;
}

.fra-tut-info-title {
    color: #212B36;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 32px;
}

.fra-tut-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.fra-tut-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fra-tut-info-num {
    color: #E4ECFE;
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.fra-tut-info-name {
    color: #212B36;
    font-size: 14px;
    font-weight: 700;
}

.fra-tut-info-desc {
    color: #637381;
    font-size: 12px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 980px) {
    .fra-page-header,
    .fra-header-left {
        flex-direction: column;
        align-items: flex-start;
    }
    .fra-header-divider { display: none; }
    .fra-header-actions { width: 100%; }
    .fra-upload,
    .fra-tut-steps {
        grid-template-columns: 1fr;
    }
    .fra-upload-vdiv,
    .fra-tut-step-arrow { display: none; }
    .fra-tut-needs,
    .fra-tut-info-grid { grid-template-columns: 1fr 1fr; }
    .fra-periods-row {
        grid-template-columns: 44px repeat(12, minmax(18px, 1fr));
        gap: 5px;
    }
    .fra-cell { width: 22px; height: 22px; }
}

@media (max-width: 640px) {
    .fra-tut-needs,
    .fra-tut-info-grid { grid-template-columns: 1fr; }
    .fra-periods-card { overflow-x: auto; }
    .fra-periods-row { min-width: 560px; }
}

/* ============================================================ */
/* === Generic service card (used by Bsa, BsaForecast, Msi) ==== */
/* ============================================================ */
.svc-card {
    background: #ffffff;
    border: 1px solid rgba(145, 158, 171, 0.24);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0px 0px 2px 0 rgba(145, 158, 171, 0.20), 0px 12px 24px -4px rgba(145, 158, 171, 0.12);
    margin-bottom: 24px;
}

.svc-card-header {
    padding: 24px 24px 0;
}

.svc-card-header h3 {
    color: #212B36;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
}

.svc-card-subheader {
    color: #637381;
    font-size: 14px;
    line-height: 1.55;
    margin: 4px 0 0;
}

.svc-card-content {
    padding: 24px;
}

.svc-card-content p {
    color: #212B36;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.svc-card-content-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.svc-card-h6 {
    color: #212B36;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.55;
    margin: 0;
}

.svc-card-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.svc-last-update {
    color: #637381;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.svc-last-update strong {
    color: #212B36;
    font-weight: 700;
}

/* svc-* extras for BsaForecast layout */
.svc-card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-right: 24px;
}

.svc-card-header-row > div { flex: 1; min-width: 0; }

.svc-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, 0.7fr);
    gap: 24px;
    align-items: stretch;
}

.svc-2col-vdiv {
    width: 1px;
    background: rgba(145, 158, 171, 0.24);
    align-self: stretch;
}

.svc-2col-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.svc-2col-action h6 {
    margin: 0;
}

.svc-action-note {
    color: #637381;
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
}

.svc-sust {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.svc-sust-good { background: #C8FACD; color: #1B5E20; }
.svc-sust-warn { background: #FFE7BA; color: #7A4F01; }
.svc-sust-bad  { background: #FFE7D9; color: #B72136; }

@media (max-width: 980px) {
    .svc-2col { grid-template-columns: 1fr; }
    .svc-2col-vdiv { width: 100%; height: 1px; }
}

/* Msi (Biografia d'Impresa) — tab bar + intro card */
.fra-btn-contained {
    background: #003768;
    color: #ffffff;
    box-shadow: 0 8px 16px 0 rgba(0, 55, 104, 0.24);
    border-color: #003768;
}
.fra-btn-contained:hover {
    background: #002553;
    box-shadow: 0 6px 14px rgba(0, 55, 104, 0.32);
}
.fra-btn-contained svg { width: 16px; height: 16px; }

.msi-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #ffffff;
    border-bottom: 1px solid rgba(145, 158, 171, 0.24);
    margin: 0 -24px 24px;
    padding: 4px 24px 0;
}

.msi-tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 14px 16px;
    color: #637381;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.msi-tab::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s ease;
}

.msi-tab:hover { color: #212B36; }

.msi-tab-active {
    color: #003768;
    font-weight: 700;
}

.msi-tab-active::after { background: #003768; }

.msi-content {
    margin-top: 0;
}

.msi-card-h5 {
    color: #212B36;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
}

.msi-intro-list {
    margin: 8px 0 0 20px;
    padding: 0;
    color: #212B36;
    font-size: 14px;
    line-height: 1.7;
}

.msi-intro-list li { margin-bottom: 6px; }

/* ============================================================ */
/* === Aiuti di Stato — platform-faithful (v2) ================= */
/* ============================================================ */

.aid-h3 {
    color: #212B36;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 24px;
    text-transform: uppercase;
}

.aid-h4 {
    color: #212B36;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    text-transform: uppercase;
}

.aid-h6 {
    color: #212B36;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.aid-top-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: stretch;
}

.aid-cos-card { display: flex; flex-direction: column; }
.aid-cos-card .svc-card-content { display: flex; flex-direction: column; gap: 12px; height: 100%; }

.aid-cos-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.aid-tutorial-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    color: #637381;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    padding: 4px 0;
}

.aid-tutorial-btn svg { width: 14px; height: 14px; }
.aid-tutorial-btn:hover { color: #003768; }

.aid-subtitle {
    color: #212B36;
    font-size: 16px;
    font-weight: 600;
    margin: 4px 0 0;
}

.aid-body {
    color: #637381;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.aid-body-mb { margin-bottom: 4px; }

.aid-bullets {
    margin: 0 0 0 18px;
    padding: 0;
    color: #637381;
    font-size: 14px;
    line-height: 1.7;
}

.aid-bullets li { margin-bottom: 2px; }

/* Status card v2 */
.aid-status-card-v2 { display: flex; flex-direction: column; }

.aid-status-content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 24px;
    height: 100%;
}

.aid-status-overline {
    color: #637381;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.aid-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #36B37E;
    margin: 8px 0 0;
}

.aid-status-icon svg { width: 40px; height: 40px; }

.aid-status-label {
    color: #36B37E;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aid-status-score {
    color: #36B37E;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    margin-top: 4px;
}

.aid-status-score small {
    color: #637381;
    font-size: 13px;
    font-weight: 500;
    margin-left: 4px;
}

.aid-status-date {
    color: #637381;
    font-size: 12px;
    margin-top: 4px;
}

.aid-status-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* Chips metadata row */
.aid-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 16px 0 24px;
}

.aid-chip-cell { display: flex; flex-direction: column; gap: 6px; }

.aid-chip-label {
    color: #637381;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.aid-chip-outlined {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(145, 158, 171, 0.32);
    border-radius: 999px;
    color: #212B36;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
}

.aid-chip-outlined.aid-chip-good { color: #1B5E20; border-color: rgba(54, 179, 126, 0.5); }
.aid-chip-outlined.aid-chip-warn { color: #7A4F01; border-color: rgba(255, 171, 0, 0.5); }
.aid-chip-outlined.aid-chip-neutral { color: #212B36; }

/* Generic section spacing */
.aid-section {
    margin: 24px 0;
}

.aid-section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.aid-section-note {
    color: #637381;
    font-size: 14px;
    font-style: italic;
}

.aid-section-meta {
    color: #637381;
    font-size: 12px;
    margin: 4px 0 12px;
}

/* Plafond bar */
.aid-plafond { display: flex; flex-direction: column; gap: 12px; }

.aid-plafond-track {
    position: relative;
    width: 100%;
    height: 36px;
    background: #DFE3E8;
    border-radius: 8px;
    overflow: hidden;
}

.aid-plafond-fill {
    height: 100%;
    background: #003768;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 8px;
    transition: width 0.6s ease;
}

.aid-plafond-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #637381;
    font-size: 14px;
}

.aid-plafond-meta strong { color: #003768; font-weight: 700; margin-right: 8px; }
.aid-plafond-meta small { color: #637381; font-size: 12px; margin-left: 4px; }

.aid-plafond-resid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #86efac;
    color: #166534;
    font-size: 15px;
}

.aid-plafond-resid strong { color: #166534; font-weight: 700; font-size: 16px; }

/* Storico bars block (override the old layout) */
.aid-history-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

.aid-history-row {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 12px;
}

.aid-history-year {
    color: #212B36;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
}

.aid-history-bar {
    height: 34px;
    background: #003768;
    border-radius: 0 20px 20px 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    min-width: 100px;
}

/* Table head with action buttons */
.aid-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.aid-table-buttons { display: flex; gap: 8px; }

/* Promo cards (external links) */
.aid-links-intro {
    color: #212B36;
    font-size: 16px;
    margin: 0 0 16px;
}

.aid-promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.aid-promo-col { display: flex; flex-direction: column; gap: 8px; }

.aid-promo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 32px;
    border-radius: 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    transition: opacity 0.2s ease;
}

.aid-promo-card:hover { opacity: 0.9; }

.aid-promo-purple { background: #6C3EC1; }
.aid-promo-blue { background: #1A3C7A; }

.aid-promo-link {
    color: #1A3C7A;
    font-size: 14px;
    text-align: center;
    text-decoration: underline;
}

@media (max-width: 980px) {
    .aid-top-grid { grid-template-columns: 1fr; }
    .aid-promo-grid { grid-template-columns: 1fr; }
}

/* ============================================================ */
/* === Biografia d'Impresa — platform-faithful question cards == */
/* ============================================================ */

.bio-tabbar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(145, 158, 171, 0.24);
    margin: 24px 0 18px;
}

.bio-tabbtn {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 12px 18px;
    color: #637381;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bio-tabbtn:hover { color: #212B36; }

.bio-tabbtn::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -1px;
    height: 2px;
    background: transparent;
}

.bio-tabbtn-active { color: #003768; font-weight: 700; }
.bio-tabbtn-active::after { background: #003768; }

.bio-tabicon { font-size: 16px; }

.bio-helper {
    color: #637381;
    font-size: 15px;
    margin: 0 0 18px;
}

.bio-q-card {
    background: #ffffff;
    border: 1px solid rgba(145, 158, 171, 0.20);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 36, 80, 0.04), 0 6px 14px rgba(15, 36, 80, 0.06);
    margin-bottom: 16px;
}

.bio-q-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(90deg, rgba(200, 225, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
}

.bio-q-label {
    color: #212B36;
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bio-q-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.bio-q-status-ok { background: #36B37E; }
.bio-q-status-ko { background: #FF5630; }

.bio-q-status svg { width: 14px; height: 14px; }

.bio-q-body {
    padding: 16px 24px 22px;
}

.bio-q-desc {
    color: #637381;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 8px;
}

.bio-q-examples {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    padding: 6px 0;
    color: #00B8D9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}

.bio-q-examples:hover { color: #007FA3; }

.bio-q-bulb { font-size: 14px; }

.bio-q-input {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(145, 158, 171, 0.32);
}

.bio-q-placeholder {
    color: #B1B7C2;
    font-size: 14px;
    font-style: italic;
}

.bio-q-count {
    color: #919EAB;
    font-size: 12px;
    margin: 8px 0 0;
    padding-left: 4px;
}

/* Aiuti / Biografia status icon — pending variant */
.aid-status-icon-pending {
    color: #919EAB;
}

.aid-status-label-pending {
    color: #919EAB;
}

/* ============================================================ */
/* === CEBI Score 4 fac-simile (Bilancio Storico bottom) ====== */
/* ============================================================ */
.bsa-cebi-page {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 36px 24px;
    box-shadow: 0 24px 60px -20px rgba(15, 36, 80, 0.25), 0 6px 18px rgba(15, 36, 80, 0.08);
    font-family: 'Inter', 'Montserrat', sans-serif;
    color: #1A1A1A;
}

.bsa-cebi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.bsa-cebi-kicker {
    color: #6B7280;
    font-size: 11px;
    letter-spacing: 0.04em;
}
.bsa-cebi-kicker strong { color: #111827; font-weight: 800; }

.bsa-cebi-logo {
    height: 18px;
    width: auto;
}

.bsa-cebi-title {
    color: #111827;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    margin: 4px 0 12px;
    letter-spacing: -0.5px;
}

.bsa-cebi-desc {
    color: #4B5563;
    font-size: 12px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.bsa-cebi-h5 {
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    margin: 0 0 4px;
    letter-spacing: 0.02em;
}

.bsa-cebi-sub {
    color: #6B7280;
    font-size: 11px;
    letter-spacing: 0.04em;
    margin: 0 0 24px;
}

.bsa-cebi-chart {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    align-items: end;
    gap: 14px;
    height: 300px;
    padding: 32px 4px 8px;
    background: #ffffff;
    border-radius: 0;
}

.bsa-cebi-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: 6px;
}

.bsa-cebi-bar-val {
    color: #111827;
    font-size: 12px;
    font-weight: 800;
}

.bsa-cebi-bar {
    width: 100%;
    border-radius: 0;
    min-height: 4px;
}

.bsa-cebi-axis {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 14px;
    padding: 10px 4px 18px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
}

.bsa-cebi-page .bsa-cebi-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 4px 4px;
    background: #ffffff;
    border-radius: 0;
    margin-top: 0;
}

.bsa-cebi-bar-col {
    position: relative;
}

.bsa-cebi-bar-col::after {
    content: attr(data-label);
}

/* Simpler: insert labels under each col via JS already? No. Use grid label row */
.bsa-cebi-axis {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    padding: 8px 4px 16px;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

/* Position pills (IMPRESA / SETTORE) */
.bsa-cebi-prow {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bsa-cebi-pdate {
    color: #111827;
    font-size: 12px;
    font-weight: 800;
}

.bsa-cebi-ptrack {
    position: relative;
    height: 8px;
    background: #ECEFF3;
    border-radius: 999px;
}

.bsa-cebi-pill {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 18px;
    line-height: 18px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.bsa-cebi-pill-imp { background: #6BB964; }
.bsa-cebi-pill-set { background: #F0C657; color: #5A4400; }

.bsa-cebi-foot {
    color: #111827;
    font-size: 12px;
    line-height: 1.6;
    margin: 22px 0 0;
}

.bsa-cebi-foot strong { color: #111827; font-weight: 800; }

.bsa-cebi-footbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
    color: #6B7280;
    font-size: 11px;
    letter-spacing: 0.06em;
}

.bsa-cebi-period {
    color: #003768;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: #DBE6FF;
}

/* Biografia d'Impresa — STATO card "Completo" variant */
.bio-status-content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 24px 24px;
    text-align: center;
}

.bio-chip-completo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    background: #d9f1d4;
    color: #1f8b4c;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bio-chip-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #20a155;
    color: #ffffff;
}

.bio-chip-check svg { width: 14px; height: 14px; }

.bio-status-date {
    color: #637381;
    font-size: 13px;
    line-height: 1.5;
}

.bio-status-date strong {
    color: #212B36;
    font-weight: 800;
}

.bio-status-divider {
    width: 100%;
    height: 1px;
    background: rgba(145, 158, 171, 0.24);
    margin: 6px 0 2px;
}

.bio-status-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 999px;
    background: #dbe6ff;
    color: #00306a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: background 0.2s ease;
}

.bio-status-download:hover { background: #c7d5f7; }

.bio-status-download svg { width: 16px; height: 16px; }

/* Centrale Rischi — fac-simile screenshot del report reale */
.cr-pdf-preview-img {
    display: flex;
    justify-content: center;
}

.cr-pdf-preview-img img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 24px 60px -20px rgba(15, 36, 80, 0.25), 0 6px 18px rgba(15, 36, 80, 0.08);
    background: #ffffff;
    display: block;
}

/* ============================================================ */
/* === Analisi del Rischio — fac-simile (Bilancio Storico) ==== */
/* ============================================================ */
.ar-page {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 32px 32px;
    box-shadow: 0 24px 60px -20px rgba(15, 36, 80, 0.18), 0 6px 18px rgba(15, 36, 80, 0.08);
    font-family: 'Inter', 'Montserrat', sans-serif;
    color: #1A1A1A;
}

.ar-title {
    color: #4B5563;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 14px;
}

.ar-desc {
    color: #6B7280;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
    max-width: 80%;
    margin: 0 auto 18px;
}

.ar-card {
    background: #ECECEC;
    border-radius: 8px;
    padding: 28px 26px 24px;
}

.ar-card-sub {
    color: #4B5563;
    font-size: 13px;
    text-align: center;
    margin: 0 0 6px;
}

.ar-sector {
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.02em;
    margin: 0 0 28px;
    line-height: 1.25;
}

.ar-chart {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    align-items: end;
    gap: 14px;
    height: 240px;
    padding: 24px 6px 0;
}

.ar-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: 4px;
}

.ar-bar-val {
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
}

.ar-bar {
    width: 100%;
    border-radius: 0;
    min-height: 4px;
}

.ar-bar-axis {
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.ar-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 28px 0 14px;
}

.ar-prow {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) 60px;
    align-items: center;
    gap: 14px;
}

.ar-pdate {
    color: #1A1A1A;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
}

.ar-ptrack {
    position: relative;
    height: 6px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.ar-pmark {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px #ECECEC;
}

.ar-pmark-imp {
    width: 6px;
    height: 14px;
    border-radius: 3px;
    background: #6ec172;
}

.ar-pmark-set {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b0b0b0;
}

.ar-ppd {
    color: #1A1A1A;
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.ar-legend {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin: 6px 0 14px;
    color: #4B5563;
    font-size: 11px;
}

.ar-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ar-legend-mark {
    position: static;
    transform: none;
    box-shadow: none;
}

.ar-foot {
    color: #1A1A1A;
    font-size: 11px;
    line-height: 1.55;
    margin: 0;
}

.ar-foot strong { font-weight: 800; }

/* ============================================================ */
/* === Bilancio Prospettico — Indicatori CEBI / Grafici ======= */
/* ============================================================ */
.bp-page {
    background: #ffffff;
    border-radius: 14px;
    padding: 26px 28px 28px;
    box-shadow: 0 24px 60px -20px rgba(15, 36, 80, 0.18), 0 6px 18px rgba(15, 36, 80, 0.08);
    font-family: 'Inter', 'Montserrat', sans-serif;
    color: #1A1A1A;
}

.bp-page-title {
    color: #1A2640;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #1A2640;
}

.bp-page-title strong {
    font-weight: 800;
    color: #1A2640;
}

.bp-sep {
    color: #6B7280;
    font-weight: 400;
    margin: 0 4px;
}

.bp-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}

.bp-chart-card {
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    padding: 12px 14px 10px;
    background: #ffffff;
}

.bp-chart-title {
    color: #1A1A1A;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 6px;
}

.bp-chart-svg {
    width: 100%;
}

.bp-chart-svg svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 640px) {
    .bp-charts-grid { grid-template-columns: 1fr; }
}

/* ============================================================ */
/* === Centrale Rischi — Situazione andamentale (rebuilt) ===== */
/* ============================================================ */
.cr-page {
    background: #ffffff;
    border-radius: 14px;
    padding: 26px 28px 22px;
    box-shadow: 0 24px 60px -20px rgba(15, 36, 80, 0.18), 0 6px 18px rgba(15, 36, 80, 0.08);
    font-family: 'Inter', 'Montserrat', sans-serif;
    color: #1A1A1A;
}

.cr-page-title {
    color: #1A2640;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #1A2640;
}

.cr-page-title strong { font-weight: 800; }
.cr-sep { color: #6B7280; margin: 0 4px; font-weight: 400; }

.cr-page-foot {
    text-align: right;
    color: #9CA3AF;
    font-size: 9px;
    margin-top: 10px;
}

.cr-chart-card {
    margin-top: 14px;
}

.cr-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #F3FAFA;
    padding: 6px 12px;
    border-radius: 3px;
    margin-bottom: 6px;
}

.cr-chart-title {
    color: #1A1A1A;
    font-size: 11px;
    font-weight: 700;
}

.cr-chart-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #1A1A1A;
    font-size: 8px;
    flex-wrap: wrap;
}

.cr-leg-sconf {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cr-leg-sconf i {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #DC6757;
}

.cr-leg-line {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cr-leg-acc {
    display: inline-block;
    width: 14px;
    height: 1.5px;
    background: #1A1A1A;
}

.cr-leg-uti {
    display: inline-block;
    width: 14px;
    height: 1.5px;
    background: #2DA046;
}

.cr-leg-utili {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cr-leg-utili small {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-right: 6px;
}

.cr-face {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.cr-face-g { background: #2DA046; }
.cr-face-y { background: #E9B340; }
.cr-face-r { background: #DC6757; }

.cr-chart-svg {
    width: 100%;
    margin-bottom: 4px;
}

.cr-chart-svg svg {
    width: 100%;
    height: auto;
    display: block;
}
