.ibreg-account-screen { background-color: #081627; }
.ibreg-account-screen .ib-account .ib-account-hero,
.ibreg-account-screen #ins-context-nav,
.ibreg-account-screen .ib-account .ib-account-questions:not(#assistenza):not(.ibreg-privacy) { display: none; }
.ibreg-account-screen .ib-account .ib-account-wrap {
    max-width: 900px !important;
    padding-top: clamp(20px, 3vw, 38px) !important;
}
.ibreg-account-screen .ib-account .ib-account-wrap:has(.ibreg-profile-facchino) {
    max-width: 1120px !important;
}
.ib-account .ibreg-account-screen-content {
    width: min(100%, 710px);
    margin-inline: auto;
}
.ib-account .ibreg-account-screen-content.ibreg-mode-accedi { width: min(100%, 490px); }
.ib-account .ibreg-card [hidden], .ib-account .ibreg-profile [hidden] { display: none; }
.ib-account .ibreg-card {
    background: var(--ib-panel);
    border: 1px solid var(--ib-line);
    border-radius: 14px;
    min-width: 0;
    padding: clamp(16px, 3.2vw, 31px);
    margin: 0;
    scroll-margin-top: 112px;
}
.ib-account :is(.ibreg-card, .ibreg-privacy):target { border-color: var(--ib-gold); }
.ib-account .ibreg-recovery { scroll-margin-top: 112px; }
.ib-account .ibreg-card h2 {
    color: #fff;
    margin: 0 0 12px;
    font: 700 clamp(1.25rem, 2.6vw, 1.7rem)/1.18 Poppins, system-ui, sans-serif;
    text-transform: none;
}
.ib-account .ibreg-card p { color: var(--ib-soft); line-height: 1.62; margin: 0 0 14px; }
.ib-account :is(.ibreg-card, .ibreg-profile) form { display: grid; gap: 14px; margin: 16px 0 0; }
.ib-account .ibreg-card form p { margin: 0; color: inherit; }
.ib-account :is(.ibreg-card, .ibreg-profile) label { color: var(--ib-white); font-size: .95rem; font-weight: 650; }
.ib-account :is(.ibreg-card, .ibreg-profile) small { color: var(--ib-soft); font-weight: 450; }
.ib-account :is(.ibreg-card, .ibreg-profile) :is(input:not([type=checkbox]):not([type=hidden]), select, textarea) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 11px;
    border: 1px solid #647891;
    border-radius: 6px;
    background: #081a2d;
    color: var(--ib-white);
    font: 400 1rem/1.35 system-ui, sans-serif;
    color-scheme: dark;
    box-sizing: border-box;
}
.ib-account .ibreg-card p > :is(input:not([type=checkbox]):not([type=hidden]), select) { margin-top: 5px; }
.ib-account :is(.ibreg-card, .ibreg-profile) input[type=checkbox] { accent-color: #c22341; }
.ib-account .ibreg-card label:has(input[type=checkbox]), .ib-account .ibreg-check {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 500;
}
.ib-account .ibreg-button {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    min-height: 46px;
    padding: 10px 15px;
    border: 1px solid #c1374b;
    border-radius: 7px;
    background: var(--ib-red);
    color: #fff;
    font: 700 .96rem/1.3 system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
}
.ib-account .ibreg-button:hover { border-color: var(--ib-gold); background: #8a1025; }
.ib-account :is(.ibreg-card, .ibreg-profile) :is(button, input, select, textarea):focus-visible {
    outline: 2px solid #ffff99;
    outline-offset: 3px;
}
.ib-account .ibreg-message {
    grid-column: 1 / -1;
    border-left: 3px solid var(--ib-gold);
    background: #152943;
    padding: 10px 14px;
    margin: 0;
    color: #fff;
}
.ib-account .ib-account-card.ibreg-profile {
    --ibreg-profile-surface: #122438;
    --ibreg-profile-line: #31485e;
    --ibreg-profile-muted: #bdccdc;
    --ibreg-profile-accent: #efcf93;
    display: grid;
    gap: clamp(12px, 1.7vw, 18px);
    padding: clamp(15px, 2vw, 23px) !important;
    background: #0d1d30;
    border-color: var(--ibreg-profile-line);
    border-radius: 16px;
}
.ib-account #profilo.ibreg-profile:target { border-color: var(--ibreg-profile-line); }
.ib-account .ibreg-profile-header {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "identity actions"
        "share actions";
    align-items: center;
    gap: 8px clamp(13px, 2.2vw, 21px);
    padding: clamp(13px, 2.2vw, 20px);
    background: linear-gradient(125deg, #162b42, #12253a 62%, #192f46);
    border: 1px solid var(--ibreg-profile-line);
    border-radius: 15px;
}
.ib-account .ibreg-profile-header-with-photo {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "photo identity actions"
        "photo share actions";
}
.ib-account .ibreg-profile-header:not(:has(> .ibreg-share-shortcuts)) { row-gap: 0; }
.ib-account .ibreg-profile-header:has(> .ibreg-share-shortcuts) .ibreg-profile-heading { align-self: end; }
.ib-account .ibreg-profile-header > .ibreg-share-shortcuts {
    grid-area: share;
    align-self: start;
    min-width: 0;
    margin: 0;
}
.ib-account .ibreg-profile-header .ibreg-profile-watermark {
    position: absolute;
    z-index: -1;
    inset-inline-end: clamp(160px, 20%, 235px);
    top: 50%;
    display: block;
    width: clamp(100px, 15vw, 154px);
    max-height: calc(100% - 14px);
    height: auto;
    margin: 0;
    opacity: .08;
    object-fit: contain;
    filter: grayscale(1);
    transform: translateY(-50%);
    pointer-events: none;
}
.ib-account .ibreg-profile .ibreg-intro { margin: 0 !important; }
.ib-account .ibreg-profile-journey { display: grid; gap: clamp(12px, 1.7vw, 18px); min-width: 0; }
.ib-account .ibreg-profile-journey > .ibreg-profile-section { margin: 0; }
.ib-account .ibreg-account-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 12px 0 0;
    margin: 0;
    border-top: 1px solid var(--ib-line);
}
.ib-account .ibreg-account-details > div { min-width: 0; }
.ib-account .ibreg-account-details dt {
    color: var(--ibreg-data-label);
    font-weight: 650;
    font-size: .83rem;
}
.ib-account .ibreg-account-details dd {
    margin: 4px 0 0;
    color: var(--ibreg-data-value);
    line-height: 1.46;
    overflow-wrap: anywhere;
}
.ib-account .ibreg-profile-edits { margin-top: 14px; border-top: 1px solid var(--ib-line); }
.ib-account .ibreg-profile-edits > summary {
    min-height: 44px;
    padding: 12px 0 8px;
    box-sizing: border-box;
    color: var(--ibreg-data-label);
    cursor: pointer;
    font-weight: 650;
}
.ib-account .ibreg-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    padding: 15px;
    margin: 0;
    min-width: 0;
    border: 1px solid var(--ib-line);
    border-radius: 8px;
}
.ib-account .ibreg-fields legend { padding: 0 6px; color: var(--ib-gold); font-weight: 700; }
.ib-account .ibreg-field { min-width: 0; display: grid; gap: 5px; align-content: start; }
.ib-account .ibreg-span { grid-column: 1 / -1; }
.ib-account .ibreg-field textarea { resize: vertical; }
.ib-account .ibreg-card form + p { margin-top: 14px; }
.ib-account .ibreg-profile-heading {
    grid-area: identity;
    min-width: 0;
}
.ib-account .ibreg-profile-header .ibreg-profile-photo {
    grid-area: photo;
    display: block;
    box-sizing: border-box;
    width: clamp(100px, 14vw, 136px);
    height: auto;
    aspect-ratio: 1;
    margin: 0;
    border: 1px solid #415971;
    border-radius: 12px;
    object-fit: cover;
}
.ib-account .ib-account-card.ibreg-profile .ibreg-profile-heading h2 {
    margin: 3px 0 7px !important;
    font-size: clamp(1.5rem, 3.6vw, 2.1rem) !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.ib-account .ibreg-profile .ibreg-profile-category {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ibreg-profile-accent);
    font-weight: 700;
    margin: 0;
    font-size: .82rem;
}
.ib-account .ibreg-profile-category::before {
    width: 9px;
    height: 2px;
    flex: none;
    background: #e56d82;
    content: "";
}
.ib-account .ibreg-profile .ibreg-member-number {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 7px;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 4px 8px;
    margin: 0;
    border: 1px solid #40566b;
    border-radius: 7px;
    color: var(--ibreg-profile-muted);
    background: #0f2134;
    font-size: .78rem;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}
.ib-account .ibreg-member-number span { min-width: 0; color: var(--ib-white); font-size: .84rem; overflow-wrap: anywhere; }
.ib-account .ibreg-profile-exit,
.ib-account .ibreg-profile-nav > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 4px 11px;
    border: 1px solid #405b73;
    border-radius: 8px;
    font-size: .86rem;
    font-weight: 650;
    text-decoration: none;
    background: #102a46;
}
.ib-account .ibreg-profile-actions {
    grid-area: actions;
    align-self: start;
    display: grid;
    justify-items: end;
    gap: 2px;
}
.ib-account .ibreg-profile .ibreg-profile-exit {
    border-color: #aa5265;
    background: #683044;
    color: #fff2f4;
}
.ib-account .ibreg-profile .ibreg-profile-exit:hover {
    border-color: #d67b8c;
    background: #843a50;
}
.ib-account .ibreg-profile-password-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding-inline: 10px;
    border: 1px solid #8c7455;
    border-radius: 8px;
    background: #192b40;
    color: #ffe1a2;
    font-size: .85rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}
.ib-account .ibreg-profile-password-link:hover {
    border-color: #e6c784;
    background: #24374a;
    color: #ffedc6;
}
.ib-account .ibreg-profile-nav > a:hover,
.ib-account .ibreg-profile-nav > a:focus-visible { border-color: #e6c784; color: #ffe1a2; }
.ib-account .ibreg-profile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--ibreg-profile-line);
    border-radius: 10px;
    background: #0e2033;
}
.ib-account .ibreg-profile-nav > a {
    border-color: transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--ib-white);
    text-align: center;
    line-height: 1.2;
}
.ib-account .ibreg-profile-nav > a:is(:hover, :focus-visible) { background: #173049; }
.ib-account .ibreg-profile-section {
    min-width: 0;
    margin: 14px 0 0;
    padding: clamp(12px, 2vw, 17px);
    border: 1px solid var(--ibreg-profile-line);
    border-radius: 13px;
    background: var(--ibreg-profile-surface);
    scroll-margin-top: 130px;
}
.ib-account .ibreg-profile-section h3,
.ib-account .ibreg-profile-section h4 {
    color: var(--ib-white);
    margin: 0 0 9px;
    font: 700 clamp(1.08rem, 2.2vw, 1.3rem)/1.25 Poppins, system-ui, sans-serif;
    text-transform: none;
    word-break: normal;
}
.ib-account .ibreg-profile-section h4 { font-size: 1.04rem; }
.ib-account .ibreg-profile-section:target { border-color: #54708a; }
.ib-account .ibreg-palmares-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.ib-account .ibreg-palmares-list {
    border: 1px solid #3c556e;
    border-radius: 10px;
    background: #0b1f35;
    padding: 12px;
    min-width: 0;
}
.ib-account .ibreg-palmares-list :is(ul, li) {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ib-account .ibreg-palmares-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    gap: 2px 8px;
    padding: 7px 0;
    border-top: 1px solid #314a64;
    overflow-wrap: anywhere;
}
.ib-account .ibreg-palmares-list small { color: #f1cf8f; }
.ib-account .ibreg-profile-section + .ibreg-message { margin-top: 12px !important; }
.ib-account .ibreg-profile .ibreg-confirmation-retry { margin: 0; }
.ib-account .ibreg-profile :is(.ibreg-profile-data, .ibreg-profile-password) { margin: 0; }
.ib-account .ibreg-profile-password:not([open]) { display: none; }
.ib-account .ibreg-profile-data:not([open]) { padding-block: 6px; }
.ib-account .ibreg-profile .ibreg-profile-password form { max-width: 460px; }
.ib-account :is(.ibreg-profile-data, .ibreg-profile-password) > summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    padding: 5px 0;
    color: var(--ib-white);
    cursor: pointer;
    list-style: none;
    font: 700 clamp(1.04rem, 2.2vw, 1.2rem)/1.3 Poppins, system-ui, sans-serif;
}
.ib-account :is(.ibreg-profile-data, .ibreg-profile-password) > summary::-webkit-details-marker { display: none; }
.ib-account :is(.ibreg-profile-data, .ibreg-profile-password) > summary::after {
    content: "";
    display: block;
    flex: none;
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-bottom: 2px solid var(--ib-gold);
    border-right: 2px solid var(--ib-gold);
    transform: translateY(-2px) rotate(45deg);
}
.ib-account :is(.ibreg-profile-data, .ibreg-profile-password)[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.ib-account .ibreg-profile .ibreg-profile-data {
    --ibreg-data-label: #b1cedf;
    --ibreg-data-value: #f4f7fb;
    --ibreg-data-heading: #ceeaf0;
    border-color: #3a536a;
    background: #10263a;
}
.ib-account .ibreg-profile-data > summary { color: var(--ibreg-data-heading); }
.ib-account .ibreg-profile-data > summary::after { border-color: var(--ibreg-data-heading); }
.ib-account .ibreg-profile-data-grid { display: grid; gap: 10px; margin-top: 8px; }
.ib-account .ibreg-profile-data-card {
    min-width: 0;
    padding: clamp(12px, 2vw, 18px);
    border: 1px solid var(--ibreg-profile-line);
    border-radius: 10px;
    background: #0d2033;
}
.ib-account .ibreg-profile-data-card h3 { margin: 0 0 11px; color: var(--ibreg-data-heading); font-size: 1rem; }
.ib-account .ibreg-profile-data-card + .ibreg-profile-data-card h3 { color: var(--ibreg-profile-accent); }
.ib-account .ibreg-profile-data :is(.ibreg-fields legend, .ibreg-field label) { color: var(--ibreg-data-label); }
.ib-account .ibreg-profile :is(summary, .ibreg-profile-nav a, .ibreg-profile-actions a):focus-visible {
    outline: 2px solid #ffe1a2;
    outline-offset: 3px;
}
.ib-account .ibreg-recovery { margin-top: 18px; border-top: 1px solid var(--ib-line); }
.ib-account .ibreg-recovery summary { min-height: 44px; cursor: pointer; padding-block: 12px; font-weight: 650; }
.ib-account .ibreg-recovery form { margin-top: 10px; }
.ib-account .ibreg-message + form { margin-top: 12px; }
.ib-account .ibreg-privacy { scroll-margin-top: 112px; }
.ib-account .ibreg-privacy p + p { margin-top: 10px !important; }
@media (min-width: 900px) {
    .ib-account .ibreg-profile-data-grid:has(> .ibreg-profile-data-card:nth-child(2)) {
        grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    }
}
@media (min-width: 920px) {
    .ib-account #registrati .ibreg-registration-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ib-account #registrati .ibreg-registration-form > :is(.ibreg-check, .ibreg-field:has(#ibreg-band, #ibreg-role)) { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .ib-account .ibreg-fields { grid-template-columns: minmax(0, 1fr); padding: 12px; }
}
@media (max-width: 740px) {
    .ibreg-account-screen .ib-account .ib-account-wrap { width: calc(100% - 32px) !important; }
    .ib-account .ibreg-profile-header {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "identity" "share" "actions";
        gap: 12px;
        padding: clamp(13px, 3.7vw, 20px);
    }
    .ib-account .ibreg-profile-header-with-photo {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "photo identity" "share share" "actions actions";
    }
    .ib-account .ibreg-profile-header:not(:has(> .ibreg-share-shortcuts)) { row-gap: 6px; }
    .ib-account .ibreg-profile-header:has(> .ibreg-share-shortcuts) .ibreg-profile-heading { align-self: center; }
    .ib-account .ibreg-profile-header .ibreg-profile-watermark {
        inset-inline-end: 14px;
        top: clamp(44px, 13vw, 63px);
        width: clamp(78px, 24vw, 112px);
        opacity: .06;
    }
    .ib-account .ibreg-profile-header .ibreg-profile-photo { width: clamp(66px, 21vw, 108px); border-radius: 12px; }
    .ib-account .ib-account-card.ibreg-profile .ibreg-profile-heading h2 { font-size: clamp(1.2rem, 5vw, 1.95rem) !important; }
    .ib-account .ibreg-profile-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding-top: 4px;
        border-top: 1px solid #38516a;
    }
    .ib-account .ibreg-profile-exit { padding-inline: 10px; font-size: .85rem; }
    .ib-account .ibreg-profile-password-link { padding-inline: 7px; }
}
@media (max-width: 540px) {
    .ib-account .ib-account-wrap :is(.ibreg-card, .ibreg-privacy, .ibreg-recovery, .ib-account-card) { scroll-margin-top: 114px; }
    .ib-account .ibreg-profile-section { scroll-margin-top: 114px; }
    .ib-account .ib-account-card.ibreg-profile { padding: 0 !important; border: 0; background: transparent; }
    .ib-account .ibreg-profile-nav > a { padding-inline: 2px; font-size: .81rem; }
    .ib-account .ibreg-profile-header > .ibreg-share-shortcuts { gap: clamp(4px, 1.6vw, 9px); }
    .ib-account .ibreg-account-screen-content .ibreg-button { width: 100%; justify-content: center; }
    .ib-account .ibreg-profile .ibreg-profile-form > .ibreg-button,
    .ib-account .ibreg-profile .ibreg-profile-password .ibreg-button { width: 100%; justify-content: center; }
}
@media (max-width: 360px) {
    .ib-account .ibreg-member-number span { font-size: .8rem; }
    .ib-account .ibreg-account-details { grid-template-columns: minmax(0, 1fr); }
}
