.aic-dashboard-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
    border-radius: 12px;
    background: #f2f6fb;
}

.aic-dashboard-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.aic-dashboard-header {
    margin-bottom: 35px;
}

.aic-dashboard-header h1 {
    margin: 0 0 8px;
    font-family: "Montserrat", sans-serif;
    font-size: 30px;
    font-weight: 700;
}

.aic-dashboard-header p {
    margin: 0;
    font-size: 16px;
}

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

.aic-dashboard-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 30px;
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 16px;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.aic-dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.aic-dashboard-icon {
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
}

.aic-dashboard-card h2 {
    margin: 0 0 12px;
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
}

.aic-dashboard-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #667085;
}

@media (max-width: 900px) {
    .aic-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .aic-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .aic-dashboard-card {
        min-height: auto;
    }
}

/* =========================================================
 * DASHBOARD AIC - RESTYLING v0.6
 * Montserrat rimane il font del Portale
 * ========================================================= */

.aic-dashboard {
    font-family: "Montserrat", sans-serif;
    color: #0f2748;
}

.aic-dashboard-header {
    margin-bottom: 34px;
}

.aic-dashboard-header h1 {
    margin: 0 0 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0b2347;
}

.aic-dashboard-header p {
    color: #4d6482;
}

.aic-dashboard-colony-card {
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    margin-bottom: 48px;
    padding: 28px 30px 30px;
    background: linear-gradient(135deg, #f3f8ff 0%, #ffffff 100%);
    border: 1px solid #d7e6f7;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(32,83,140,.07);
}

.aic-dashboard-colony-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #2878cf;
}

.aic-dashboard-colony-card h2 {
    margin: 0 0 22px;
    font-family: "Montserrat", sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: #0b2347;
}

.aic-dashboard-colony-card .aic-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 22px 28px;
}

.aic-dashboard-colony-card .aic-profile-field span {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    color: #6d819b;
}

.aic-dashboard-colony-card .aic-profile-field strong {
    display: block;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
    color: #102a4f;
    overflow-wrap: anywhere;
}

.aic-dashboard-grid {
    gap: 20px;
}

.aic-dashboard-card {
    position: relative;
    min-height: 205px;
    padding: 25px 25px 27px;
    overflow: hidden;
    border: 1px solid #e1eaf4;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(27,70,119,.055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.aic-dashboard-card::after {
    content: "›";
    position: absolute;
    right: 22px;
    bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding-bottom: 3px;
    border-radius: 50%;
    background: #edf6ff;
    color: #1976d2;
    font-family: Arial, sans-serif;
    font-size: 30px;
    line-height: 1;
    transition: transform .2s ease, background .2s ease;
}

.aic-dashboard-card:hover {
    transform: translateY(-4px);
    border-color: #cbdff4;
    box-shadow: 0 14px 34px rgba(27,70,119,.13);
}

.aic-dashboard-card:hover::after {
    transform: translateX(3px);
    background: #dfefff;
}

.aic-dashboard-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 15px;
    background: #edf5ff;
    color: #2475c7;
}

.aic-dashboard-icon svg {
    width: 30px;
    height: 30px;
}

.aic-dashboard-card:nth-child(6n + 1) .aic-dashboard-icon { background:#eaf4ff; color:#2678ca; }
.aic-dashboard-card:nth-child(6n + 2) .aic-dashboard-icon { background:#fff2df; color:#ed8b16; }
.aic-dashboard-card:nth-child(6n + 3) .aic-dashboard-icon { background:#f0eaff; color:#7455dc; }
.aic-dashboard-card:nth-child(6n + 4) .aic-dashboard-icon { background:#e8faf6; color:#13a58d; }
.aic-dashboard-card:nth-child(6n + 5) .aic-dashboard-icon { background:#eaf8ee; color:#26a65b; }
.aic-dashboard-card:nth-child(6n + 6) .aic-dashboard-icon { background:#ffebeb; color:#d83b3b; }

.aic-dashboard-card h2 {
    max-width: calc(100% - 42px);
    margin: 0 0 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0b2347;
}

.aic-dashboard-card p {
    max-width: calc(100% - 42px);
    margin: 0;
    padding-bottom: 36px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #687d98;
}

@media (max-width: 1000px) {
    .aic-dashboard-colony-card .aic-profile-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 650px) {
    .aic-dashboard-header h1 { font-size: 27px; }

    .aic-dashboard-colony-card {
        margin-bottom: 34px;
        padding: 23px 22px 25px;
    }

    .aic-dashboard-colony-card .aic-profile-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .aic-dashboard-card {
        min-height: 180px;
        padding: 23px;
    }

    .aic-dashboard-icon {
        width: 54px;
        height: 54px;
        margin-bottom: 19px;
    }

    .aic-dashboard-card h2 { font-size: 17px; }
}


/* =========================================================
 * PAGINA SERVIZIO / JOTFORM INCORPORATO - v0.7
 * ========================================================= */

.aic-service {
    width: 100%;
}

.aic-service-topbar {
    margin-bottom: 22px;
}

.aic-service-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #2878cf;
    text-decoration: none !important;
}

.aic-service-back:hover {
    color: #145da8;
    text-decoration: underline !important;
}

.aic-service-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.aic-service-header .aic-dashboard-icon {
    flex: 0 0 auto;
    margin: 0;
}

.aic-service-heading {
    min-width: 0;
}

.aic-service-heading h1 {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0b2347;
}

.aic-service-heading p {
    margin: 7px 0 0;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #687d98;
}

.aic-service-frame-wrap {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1eaf4;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(32,83,140,.07);
}

.aic-service-frame {
    display: block;
    width: 100%;
    min-height: 1050px;
    border: 0;
    background: #ffffff;
}

@media (max-width: 650px) {
    .aic-service-topbar {
        margin-bottom: 18px;
    }

    .aic-service-header {
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 20px;
    }

    .aic-service-header .aic-dashboard-icon {
        width: 50px;
        height: 50px;
    }

    .aic-service-heading h1 {
        font-size: 22px;
    }

    .aic-service-frame-wrap {
        border-radius: 14px;
    }

    .aic-service-frame {
        min-height: 1100px;
    }
}


/* =========================================================
   PROFILO AIC - v0.8
   ========================================================= */

.aic-profile-v2,
.aic-profile-v2 * {
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

.aic-profile-v2 {
    max-width: 1180px;
    margin: 0 auto;
}

.aic-profile-page-heading {
    margin: 0 0 26px;
}

.aic-profile-page-heading h1 {
    margin: 0 0 7px;
    color: #0b2347;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.aic-profile-page-heading p {
    margin: 0;
    color: #60758f;
    font-size: 15px;
    line-height: 1.6;
}

.aic-profile-panel {
    margin: 0 0 22px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e2ebf4;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(27,70,119,.065);
}

.aic-profile-panel-head {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 82px;
    padding: 15px 17px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: linear-gradient(90deg, #eef8ff 0%, #f6fbff 100%);
}

.aic-profile-section-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dff2ff;
    color: #1688db;
}

.aic-profile-section-icon svg {
    width: 29px;
    height: 29px;
}

.aic-profile-panel-head h2 {
    margin: 0 0 3px;
    color: #0b2347;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 750;
}

.aic-profile-panel-head p {
    margin: 0;
    color: #687d98;
    font-size: 13px;
    line-height: 1.45;
}

.aic-profile-panel-title {
    min-width: 0;
}

.aic-profile-info-note {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 330px;
    margin-left: auto;
    padding: 9px 12px;
    border: 1px solid #b9ddf7;
    border-radius: 10px;
    background: #f2f9ff;
    color: #2771ad;
    font-size: 11px;
    line-height: 1.45;
}

.aic-profile-info-symbol {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1688db;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.aic-profile-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 24px;
    padding: 0 18px 18px;
}

.aic-profile-readonly-field span {
    display: block;
    margin: 0 0 7px;
    color: #0b2347;
    font-size: 13px;
    font-weight: 700;
}

.aic-profile-readonly-field strong {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    overflow-wrap: anywhere;
    border: 1px solid #dfe7ef;
    border-radius: 9px;
    background: #f7f9fb;
    color: #233955;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
}

.aic-profile-account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 28px;
    align-items: start;
    padding: 0 18px 18px;
}

.aic-password-form-v2 {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.aic-password-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 15px;
    align-items: center;
}

.aic-password-row label {
    color: #0b2347;
    font-size: 13px;
    font-weight: 700;
}

.aic-password-input-wrap {
    position: relative;
}

.aic-password-input-wrap input {
    width: 100%;
    min-height: 44px;
    padding: 9px 45px 9px 13px;
    border: 1px solid #d6e1eb;
    border-radius: 9px;
    background: #fff;
    color: #233955;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.aic-password-input-wrap input:focus {
    border-color: #6eb6e9;
    box-shadow: 0 0 0 3px rgba(36,133,201,.10);
}

.aic-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7288a1;
    font-size: 17px;
    cursor: pointer;
}

.aic-profile-password-button {
    align-self: flex-start;
    min-height: 44px;
    margin-top: 5px;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    background: #1688db;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(22,136,219,.18);
}

.aic-profile-password-button:hover {
    background: #1178c4;
}

.aic-password-requirements {
    padding: 17px 18px;
    border-radius: 12px;
    background: #eef8ff;
    color: #48637e;
}

.aic-password-requirements > strong {
    display: block;
    margin-bottom: 10px;
    color: #185a8d;
    font-size: 13px;
}

.aic-password-requirements ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.aic-password-requirements li {
    position: relative;
    margin: 7px 0;
    padding-left: 22px;
    font-size: 12px;
    line-height: 1.4;
}

.aic-password-requirements li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1.5px solid #1688db;
    border-radius: 50%;
    color: #1688db;
    font-size: 9px;
    font-weight: 800;
}

.aic-profile-message {
    margin: 0 18px 18px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}

.aic-profile-message-success {
    border: 1px solid #bde7c9;
    background: #effaf2;
    color: #28733d;
}

.aic-profile-message-error {
    border: 1px solid #f0c3c3;
    background: #fff3f3;
    color: #a83232;
}

@media (max-width: 900px) {
    .aic-profile-account-layout {
        grid-template-columns: 1fr;
    }

    .aic-password-requirements {
        max-width: none;
    }

    .aic-profile-panel-head-colony {
        flex-wrap: wrap;
    }

    .aic-profile-info-note {
        flex-basis: 100%;
        max-width: none;
        margin-left: 67px;
    }
}

@media (max-width: 700px) {
    .aic-profile-page-heading h1 {
        font-size: 28px;
    }

    .aic-profile-readonly-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .aic-profile-account-layout {
        padding-left: 6px;
        padding-right: 6px;
    }

    .aic-password-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .aic-profile-panel-head {
        align-items: flex-start;
        padding: 14px;
    }

    .aic-profile-section-icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .aic-profile-section-icon svg {
        width: 25px;
        height: 25px;
    }

    .aic-profile-info-note {
        margin-left: 0;
    }
}

/* =========================================================
   SFONDO PORTALE AIC - v0.9
   Solo intervento grafico sullo sfondo
   ========================================================= */

body {
    background:
        radial-gradient(ellipse at 82% 8%, rgba(255,184,77,.30) 0%, rgba(255,184,77,.12) 18%, rgba(255,184,77,0) 40%),
        radial-gradient(ellipse at 100% 34%, rgba(41,126,211,.30) 0%, rgba(41,126,211,.15) 27%, rgba(41,126,211,0) 53%),
        radial-gradient(ellipse at 0% 82%, rgba(56,145,226,.26) 0%, rgba(56,145,226,.11) 28%, rgba(56,145,226,0) 52%),
        linear-gradient(135deg, #f7fbff 0%, #eef6ff 38%, #fff9f1 70%, #f3f8ff 100%) !important;
    background-attachment: fixed !important;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

body::before {
    width: 105vw;
    height: 44vw;
    min-height: 430px;
    top: 80px;
    right: -38vw;
    transform: rotate(-10deg);
    background: linear-gradient(135deg, rgba(113,184,240,.17) 0%, rgba(38,119,199,.24) 55%, rgba(22,93,169,.14) 100%);
}

body::after {
    width: 82vw;
    height: 32vw;
    min-height: 330px;
    left: -34vw;
    bottom: -9vw;
    transform: rotate(12deg);
    background: linear-gradient(135deg, rgba(255,177,62,.16) 0%, rgba(96,167,228,.19) 38%, rgba(35,113,192,.22) 100%);
}

#page,
.site,
.site-content,
.content-area,
.site-main {
    background-color: transparent !important;
}

.aic-dashboard,
.aic-profile-v2,
.aic-service {
    position: relative;
    z-index: 1;
}

.aic-dashboard-card,
.aic-dashboard-colony-card,
.aic-profile-panel,
.aic-service-frame-wrap {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

@media (max-width: 900px) {
    body {
        background-attachment: scroll !important;
    }

    body::before {
        width: 135vw;
        height: 70vw;
        right: -65vw;
    }

    body::after {
        width: 120vw;
        height: 58vw;
        left: -62vw;
    }
}

@media (max-width: 600px) {
    body::before,
    body::after {
        opacity: .72;
    }
}