.aso-tml-wrapper,
.aso-profile-summary,
.aso-profile-form-wrapper,
.aso-login-card {
    border: 1px solid #dfe7ea;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    max-width: 100%;
    padding: 18px;
}

.aso-login-gate {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    max-width: 100%;
    overflow-x: hidden;
    padding: 32px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #3aa6b9 100%);
}

.aso-login-card {
    width: min(900px, 100%);
    text-align: center;
    box-shadow: 0 12px 36px rgba(20, 83, 95, .18);
    overflow-wrap: break-word;
}

.aso-tml-panel,
.aso-tml-panel form {
    box-sizing: border-box;
    max-width: 100%;
}

.aso-tml-panel input:not([type="checkbox"]):not([type="radio"]),
.aso-tml-panel textarea,
.aso-tml-panel select {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

.aso-login-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.aso-gate-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    text-align: left;
}

.aso-gate-sections details {
    border: 1px solid #dbe5e8;
    border-radius: 8px;
    padding: 12px;
}

.aso-register-legal-consent {
    border: 1px solid rgba(45, 106, 79, .18);
    border-radius: 8px;
    box-sizing: border-box;
    max-width: 100%;
    margin: 18px 0;
    overflow-wrap: break-word;
    padding: 14px;
    text-align: left;
}

.aso-register-legal-consent legend {
    color: #102033;
    font-weight: 800;
    padding: 0 6px;
}

.aso-consent-option {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    line-height: 1.5;
    margin-top: 12px;
}

.aso-consent-option input {
    flex: 0 0 auto;
    margin-top: 4px;
}

.aso-consent-option span {
    color: #334155;
    min-width: 0;
    overflow-wrap: break-word;
}

.aso-consent-option-required span {
    color: #102033;
    font-weight: 650;
}

.aso-consent-option a {
    font-weight: 800;
}

.aso-register-profile-fields {
    border: 1px solid rgba(47, 127, 144, .22);
    border-radius: 8px;
    box-sizing: border-box;
    margin: 18px 0;
    max-width: 100%;
    padding: 14px;
    text-align: left;
}

.aso-register-profile-fields legend {
    color: #102033;
    font-weight: 800;
    padding: 0 6px;
}

.aso-register-profile-help {
    color: #475569;
    line-height: 1.55;
    margin: 0 0 12px;
}

.aso-register-profile-field {
    margin-bottom: 14px;
}

.aso-register-profile-label {
    color: #102033;
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
}

.aso-choice-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aso-choice-option {
    min-width: 0;
}

.aso-choice-card {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(100, 116, 139, .28);
    border-radius: 8px;
    box-sizing: border-box;
    color: #334155;
    cursor: pointer;
    display: flex !important;
    font-weight: 800;
    gap: 10px;
    min-height: 48px;
    padding: 11px 13px;
    position: relative;
    user-select: none;
    width: 100%;
}

.aso-choice-card::before {
    border: 2px solid rgba(100, 116, 139, .45);
    border-radius: 999px;
    box-sizing: border-box;
    content: "";
    flex: 0 0 18px;
    height: 18px;
    width: 18px;
}

.aso-choice-card:hover {
    border-color: rgba(47, 127, 144, .58);
    color: #102033;
}

.aso-choice-input:focus + .aso-choice-card,
.aso-choice-card:focus-visible {
    outline: 3px solid rgba(82, 183, 136, .35);
    outline-offset: 2px;
}

.aso-choice-input:checked + .aso-choice-card,
.aso-choice-card.is-selected {
    background: #eef9f3;
    border-color: #2f7f90;
    box-shadow: 0 0 0 1px rgba(47, 127, 144, .2);
    color: #12362f;
}

.aso-choice-input:checked + .aso-choice-card::before,
.aso-choice-card.is-selected::before {
    background: radial-gradient(circle at center, #2f7f90 0 42%, transparent 46%);
    border-color: #2f7f90;
}

@media (max-width: 620px) {
    .aso-choice-grid {
        grid-template-columns: 1fr;
    }
}
.aso-profile-head {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.aso-profile-head img {
    border-radius: 50%;
}

.aso-field {
    margin-bottom: 12px;
}

.aso-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

.aso-field input,
.aso-field textarea,
.aso-field select {
    width: 100%;
    box-sizing: border-box;
}

.aso-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.aso-button,
.aso-logout-button,
.aso-delete-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #2f7f90;
    border-radius: 999px;
    padding: 9px 16px;
    background: #fff;
    color: #2f7f90;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.aso-button:hover,
.aso-logout-button:hover {
    background: #2f7f90;
    color: #fff;
}

.aso-button-secondary {
    border-color: #94a3b8;
    color: #475569;
}

.aso-delete-profile {
    border-color: #dc2626;
    color: #dc2626;
}

.aso-delete-profile:hover {
    background: #dc2626;
    color: #fff;
}

.aso-delete-profile-wrapper {
    margin: 0;
}

.aso-delete-modal-open {
    overflow: hidden;
}

.aso-delete-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(7px);
}

.aso-delete-modal {
    width: min(520px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    overflow-y: auto;
    border: 1px solid rgba(220, 38, 38, .18);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    padding: 26px;
    color: #102033;
}

.aso-delete-modal h3 {
    margin: 0 0 12px;
    color: #991b1b;
    font-size: 1.35rem;
    line-height: 1.2;
}

.aso-delete-modal p {
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.6;
}

.aso-delete-confirm-label {
    display: block;
    margin: 18px 0 8px;
    color: #102033;
    font-weight: 700;
}

.aso-delete-confirm-input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid rgba(100, 116, 139, .32);
    border-radius: 10px;
    padding: 10px 12px;
    color: #102033;
    font: inherit;
}

.aso-delete-confirm-input:focus {
    outline: 3px solid rgba(220, 38, 38, .18);
    border-color: #dc2626;
}

.aso-delete-modal-status {
    margin-top: 14px;
}

.aso-delete-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.aso-delete-modal-btn {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 9px 16px;
    cursor: pointer;
    font-weight: 700;
}

.aso-delete-modal-btn-cancel {
    background: #fff;
    color: #334155;
    border-color: rgba(100, 116, 139, .28);
}

.aso-delete-modal-btn-cancel:hover {
    background: #f8fafc;
}

.aso-delete-modal-btn-confirm {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.aso-delete-modal-btn-confirm:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.aso-delete-modal-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 520px) {
    .aso-delete-modal-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .aso-delete-modal {
        max-height: calc(100vh - 24px);
        padding: 20px;
        border-radius: 14px;
    }

    .aso-delete-modal-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.aso-form-message,
.aso-profile-message,
.aso-auth-notice {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
}

.aso-message-success,
.aso-auth-notice-success {
    background: #dcfce7;
    color: #166534;
}

.aso-auth-notice-info {
    background: #e8f5ef;
    color: #2f7656;
}

.aso-message-error {
    background: #fee2e2;
    color: #991b1b;
}

.aso-pwd-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}

.aso-pwd-wrap input[type="password"],
.aso-pwd-wrap input[type="text"].aso-pwd-revealed {
    padding-right: 44px !important;
}

.aso-pwd-eye-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 6px;
    margin: 0;
    cursor: pointer;
    line-height: 0;
    color: #2f7656;
    opacity: .8;
}

.aso-pwd-eye-btn:hover {
    opacity: 1;
}

.aso-pwd-eye-btn:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.aso-pwd-eye-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.aso-verification-resend {
    margin-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .24);
    padding-top: 14px;
}

.aso-verification-resend summary {
    cursor: pointer;
    color: #2f7656;
    font-weight: 700;
}

.aso-verification-resend form {
    margin-top: 12px;
}

.aso-dashboard-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.aso-dashboard-list li {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 10px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.aso-dashboard-list strong {
    color: #102033;
    display: block;
    font-weight: 800;
    line-height: 1.25;
}

.aso-dashboard-list span {
    color: #64748b;
    display: block;
    font-size: .9rem;
    line-height: 1.45;
    margin-top: 3px;
}

.aso-dashboard-action {
    align-items: center;
    border: 1px solid rgba(45, 106, 79, .28);
    border-radius: 999px;
    color: #2d6a4f;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .84rem;
    font-weight: 800;
    justify-content: center;
    padding: 8px 12px;
    text-decoration: none;
}

.aso-dashboard-action:hover,
.aso-dashboard-action:focus {
    background: #2d6a4f;
    color: #fff;
}

.aso-empty-state {
    background: #f8fcfa;
    border: 1px dashed rgba(82, 183, 136, .34);
    border-radius: 10px;
    color: #64748b;
    padding: 16px;
}

.aso-empty-state strong {
    color: #2d6a4f;
    display: block;
    font-weight: 900;
    margin-bottom: 4px;
}

.aso-empty-state p {
    margin: 0;
}

.aso-status-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 900;
    justify-content: center;
    line-height: 1.2;
    padding: 7px 10px;
    white-space: nowrap;
}

.aso-status-nuova {
    background: #dbeafe;
    color: #1e3a5f;
}

.aso-status-in_lavorazione,
.aso-status-info {
    background: #fef3c7;
    color: #92400e;
}

.aso-status-chiusa {
    background: #dcfce7;
    color: #166534;
}

.aso-user-request-form {
    display: grid;
    gap: 12px;
}

.aso-user-request-form .aso-field {
    margin-bottom: 0;
}

.aso-user-request-form small {
    color: #64748b;
    display: block;
    line-height: 1.45;
    margin-top: 6px;
}

.aso-user-request-form textarea {
    min-height: 126px;
    resize: vertical;
}

@media (max-width: 620px) {
    .aso-login-gate {
        padding: 24px 12px;
    }

    .aso-login-card {
        padding: 16px;
    }

    .aso-auth-legal {
        overflow-wrap: break-word;
    }

    .aso-tml-panel .tml-field-wrap {
        display: block;
        text-align: left;
    }

    .aso-tml-panel .tml-field-wrap label {
        display: block;
        margin-bottom: 6px;
    }

    .aso-dashboard-list li {
        align-items: flex-start;
        flex-direction: column;
    }

    .aso-register-legal-consent {
        margin: 16px 0;
        padding: 12px;
    }
}
