/* Base styles */
.profile-container {
    padding: 30px 0;
    margin-bottom: 30px;
    background: rgba(118, 24, 227, 0.03);
    border-radius: 16px;
}

/* Profile Header */
.profile-header {
display: flex
;
align-items: center;
margin-bottom: 30px;
background: #ffffff;
backdrop-filter: blur(10px);
border: 1px solid rgb(188 140 255 / 40%);
border-radius: 16px;
padding: 20px 25px;
}

/* Profile Name Row */
.profile-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-name-row h2 {
    margin: 0;
    flex-shrink: 0;
}

/* User Badges */
.user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 24px;
    white-space: nowrap;
    gap: 6px;
}

.badge-logo {
    height: 14px;
    width: auto;
    filter: brightness(0) invert(1); /* Makes logo white for pioneer badge */
}

.pioneer-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.founder-badge {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.founder-badge .badge-logo {
    filter: brightness(0); /* Makes logo black for founder badge */
}

/* Lifetime Badge */
.lifetime-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    min-height: 20px;
    white-space: nowrap;
}

/* AI Credits Section - Fix border radius for title */
#section-ai-credits .profile-section-header {
    border-radius: 16px 16px 0 0; /* Only top corners rounded when active */
}

#section-ai-credits:not(.active) .profile-section-header {
    border-radius: 16px; /* All corners rounded when closed */
}
.ai-logo-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 4px;
}

.ai-logo-small {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: middle;
    border-radius: 3px;
}

/* AI Credit Icons and Flexbox Layout */
.ai-credit-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: currentColor;
    flex-shrink: 0;
}

.profile-item-info {
    flex: 1;
}

.profile-item-title {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-weight: 600;
}

.profile-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

/* Info Icon */
.info-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.8;
}

/* Promo Banner */
.promo-banner {
    margin-bottom: 30px;
    overflow: hidden;
}

.promo-banner-bg {
background: #fff;
/* border: 1px solid rgba(0, 0, 0, 0.07); */
border-radius: 16px;
padding: 20px;
display: flex
;
align-items: center;
justify-content: space-between;
gap: 20px;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}

.promo-banner-bg img {
position: absolute;
right: 30px;
height: 90%;
bottom: 0;
}

.promo-banner-bg:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.promo-banner-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-banner-content {
display: flex
;
flex-direction: column;
gap: 8px;
color: #40374a;
place-items: flex-start;
}

.promo-banner-description {
    font-size: 14px;
    margin: 0;
    opacity: 0.75;
    color: #555;
    max-width: 600px;
}

.promo-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #8729ff, #7618e3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(118, 24, 227, 0.2);
}

.promo-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(118, 24, 227, 0.3);
    color: #fff;
}

.promo-banner-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

.promo-banner-icon {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 130px;
    height: 130px;
    opacity: 0.7;
    z-index: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.promo-banner-bg:hover .promo-banner-icon {
    transform: translateY(-50%) rotate(5deg);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .promo-banner-content {
        max-width: 100%;
    }
    
    .promo-banner-icon {
        width: 100px;
        height: 100px;
        opacity: 0.4;
        right: -20px;
    }
    
    .promo-banner-bg img {
        height: 70%;
        right: 10px;
        opacity: 0.8;
    }
}

@media (max-width: 576px) {
    .promo-banner-bg {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .promo-banner-content h3 {
        font-size: 18px;
    }
    
    .promo-banner-content p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .promo-banner-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .promo-banner-icon {
        position: absolute;
        width: 80px;
        height: 80px;
        opacity: 0.2;
        top: 50%;
        right: 50%;
        transform: translate(50%, -50%);
    }
    
    .promo-banner-bg img {
        display: none; /* Nascondi completamente l'immagine su mobile */
    }
}

.profile-avatar {
width: 60px;
height: 60px;
border-radius: 50%;
background: #8729ff;
display: flex
;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: bold;
color: #fff;
margin-right: 20px;
box-shadow: 0 4px 12px rgba(118, 24, 227, 0.3);
flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
margin: 0;
font-size: 20px;
color: #0c0c0c;
font-weight: 600;
}

.profile-info p {
margin: 5px 0 0;
color: #7618e3;
font-size: 14px;
}

.form-label-container>label {
margin-bottom: 0 !important;
}

.btn-logout {
color: #fff;
background: #7618e3;
padding: 8px 20px;
border-radius: 30px;
font-size: 14px;
font-weight: 500;
text-decoration: none;
display: flex
;
align-items: center;
margin-left: auto;
margin-right: 10px;
transition: all 0.2s ease;
border: none;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-logout svg {
width: 16px;
height: 16px;
margin-right: 6px;
stroke: #fff;
}

.btn-logout:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Profile Section */
.profile-section {
    margin-bottom: 25px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.profile-section-header {
    background: linear-gradient(45deg, rgb(74 38 79 / 15%), rgb(6 0 10 / 25%));
    color: #fff;
    padding: 18px 22px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgb(188 140 255 / 40%);
    border-radius: 16px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.profile-section-header:hover {
    background: linear-gradient(45deg, rgb(74 38 79 / 20%), rgb(6 0 10 / 30%));
}

.profile-section.active .profile-section-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: rgb(188 140 255 / 40%);
    border-bottom-color: transparent;
}

.profile-section-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section-icon {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    fill: #fff;
    transition: transform 0.3s ease;
}

.profile-section-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
    stroke: #fff;
}

.profile-section.active .profile-section-icon {
    transform: rotate(180deg);
}

/* Close Button */
.close-form-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
    cursor: pointer;
    display: none;
}

.profile-section.form-active .profile-section-icon {
    display: none;
}

.profile-section.form-active .close-form-icon {
    display: block;
}

/* Section Content */
.profile-section-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-left: 1px solid rgb(188 140 255 / 40%);
    border-right: 1px solid rgb(188 140 255 / 40%);
    border-bottom: 1px solid rgb(188 140 255 / 40%);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.profile-section.active .profile-section-content {
    padding: 24px;
    max-height: none; /* Rimuovo max-height: 800px; */
    height: auto;
    overflow: visible;
}

/* Profile Items */
.profile-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-item-title {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

.profile-item-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 5px;
    max-width: 400px;
}

.profile-license-code, .profile-purchase-date {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-right: 10px;
}

.profile-license-code span, .profile-purchase-date span {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.profile-item-action {
    color: #7618e3;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 30px;
    background-color: #fff;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: none; 
}

.profile-item-action:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* AI Bot Action - stile simile a Upgrade Plan ma più piccolo */
.ai-bot-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    padding: 0.6rem 0.8rem !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
}

.ai-bot-action:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.ai-bot-action .ai-logo-small {
    width: 14px !important;
    height: 14px !important;
    margin-right: 0 !important;
}

.profile-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto; /* Mantiene i pulsanti a destra negli item della lista */
    justify-content: center; /* Centra i pulsanti all'interno del loro contenitore */
    margin-top: 10px; /* Aggiunge spazio sopra i pulsanti */
}

.profile-action-download {
    color: #7618e3;
    background: #fff;
    box-shadow: 0 4px 12px rgba(118, 24, 227, 0.2);
    text-decoration: none ;
}


/* Icon for download button */
.profile-action-download svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -3px;
}

/* Icon for devices button */
.profile-action-devices svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -3px;
}

/* Styles for the devices form */
.devices-form {
    margin-top: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 20px;
    clear: both;
    width: 100%;
    position: relative;
    z-index: 100;
    height: auto;
    overflow: visible;
}

.devices-list {
    margin-top: 20px;
    margin-bottom: 20px;
    max-height: none;
    height: auto;
    overflow: visible;
}

.device-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
}

.device-item:last-child {
    margin-bottom: 0;
}

.device-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.device-icon svg {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.9);
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    margin-bottom: 2px;
}

.device-details {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.device-action {
    padding: 5px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.device-action.device-action-remove {
    background: rgba(244, 67, 54, 0.15);
}

.device-action.device-action-remove:hover {
    background: rgba(244, 67, 54, 0.25);
}

.license-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.license-info-item {
    flex: 1;
    min-width: 180px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.license-info-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.license-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

/* Empty state for devices */
.devices-empty {
    padding: 25px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 20px 0;
}

.devices-empty-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.devices-empty-icon svg {
    width: 25px;
    height: 25px;
    stroke: rgba(255, 255, 255, 0.6);
}

.devices-empty h5 {
    font-size: 16px;
    color: #fff;
    margin: 0 0 10px;
}

.devices-empty p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Loading spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.text-center {
    text-align: center !important;
}

.text-light {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Empty state */
.profile-empty-state {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 25px;
}

.profile-empty-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.profile-empty-icon svg {
    width: 30px;
    height: 30px;
    stroke: rgba(255, 255, 255, 0.7);
}

.profile-empty-state h4 {
    font-size: 18px;
    color: #fff;
    margin: 0 0 10px;
    font-weight: 600;
}

.profile-empty-state p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px;
    font-size: 14px;
}

.profile-empty-action {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #8729ff, #7618e3);
    color: #fff;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(118, 24, 227, 0.25);
}

.profile-empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(118, 24, 227, 0.35);
    color: #fff;
}

/* Subscription Section Styles */
.subscription-section {
    margin-bottom: 1rem;
}

.subscription-section-title {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subscription-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: currentColor;
    flex-shrink: 0;
    align-self: center;
}

.subscription-item {
    background: linear-gradient(135deg, #8729ff 0%, #6d1fd4 100%);
    color: white;
    border: none;
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.subscription-info {
    flex: 1;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.subscription-plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.subscription-billing {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: capitalize;
}

/* Status badge styles rimossi - non più utilizzati */

.subscription-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.subscription-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 150px; /* Ensure minimum width */
}

.detail-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.detail-value {
    font-weight: 600;
}

.subscription-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.feature-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.feature-badge-icon {
    width: 20px;
    height: auto;
    flex-shrink: 0;
}

.feature-badge-icon svg {
    width: 100%;
    height: 100%;
    stroke: rgba(255, 255, 255, 0.9);
}

.feature-badge-content {
    flex: 1;
}

.feature-badge-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.2;
}

.feature-badge-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.2;
    margin-top: 2px;
}

.subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 180px;
    padding: 0 1rem; /* Add padding to prevent buttons from touching edges */
}

.cancellation-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: #ffc107;
    font-size: 0.85rem;
    font-weight: 500;
}

.cancellation-notice svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.subscription-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.subscription-btn svg {
    width: 16px;
    height: 16px;
}

.btn-upgrade {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-upgrade:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.btn-reactivate {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.btn-reactivate:hover {
    background: rgba(40, 167, 69, 0.3);
    transform: translateY(-1px);
}

.btn-update-payment {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.btn-update-payment:hover {
    background: rgba(255, 193, 7, 0.3);
    transform: translateY(-1px);
}

.section-divider {
    padding-top: 2rem;
    border-top: 1px solid rgba(135, 41, 255, 0.1);
}

.section-divider-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

/* Lifetime Licenses section styling - same as subscription */
.section-divider .subscription-section-title {
    margin-bottom: 1rem; /* Same spacing as subscription section */
}

.angle-up {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Responsive styles */
@media (max-width: 991px) {
    .subscription-plan-name {
        font-size: 1.2rem;
    }
    .subscription-features {
        margin-bottom: 0;
    }
    .subscription-header {
        text-align: center;
        align-items: center;
        justify-content: center;
    }
    .subscription-info {
        width: 100%;
    }
    .subscription-item {
        background: transparent;
        padding: 0;
        gap: 0;
    }
    .subscription-section-title {
        font-size: 1rem;
    }
    .profile-container {
        padding: 0;
    }
    
    .profile-info h2 {
        font-size: 22px;
    }
    
    .profile-info p {
        font-size: 14px;
    }
    
    .profile-section.active .profile-section-content {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .profile-name-row {
        text-align: center;
        display: block;
    }

    .user-badge {
        margin-top: 10px;
    }
    
    .btn-logout {
        margin: 20px auto 0;
    }
    
    /* Hide AI Credits info icon and Open Doublegram AI button on mobile */
    #section-ai-credits .info-icon {
        display: none !important;
    }
    
    #section-ai-credits .ai-bot-action {
        display: none !important;
    }
    
    .profile-item {
        flex-direction: column;
        align-items: flex-start; /* Changed from center to flex-start for left alignment */
        text-align: left; /* Changed from center to left */
    }
    
    /* Subscription responsive styles */
    .subscription-item {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .subscription-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .subscription-details {
        flex-direction: row; /* Keep items on same line */
        gap: 1rem;
        text-align: center;
        justify-content: center;
    }
    
    .subscription-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding-bottom: 0;
    }
    
    .feature-badge {
        padding: 10px 14px;
    }
    
    .feature-badge-number {
        font-size: 1rem;
    }
    
    .feature-badge-label {
        font-size: 0.75rem;
    }
    
    .subscription-actions {
        width: 100%;
        min-width: unset;
        padding: 0 1rem; /* Keep padding on mobile */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem 0;
    }
    
    .profile-item-actions {
        margin-top: 20px; /* Più spazio su mobile */
        width: 100%; /* Occupa tutta la larghezza */
        justify-content: center; /* Centra i pulsanti */
        margin-left: 0; /* Rimuove il margine a sinistra */
    }
    
    .profile-item-desc {
        text-align: left; /* Changed from center to left */
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .profile-container {
        padding: 0;
    }
    
    .profile-section-header {
        padding: 12px 15px;
    }
    
    .profile-section-header h3 {
        font-size: 15px;
    }
    
    .profile-section.active .profile-section-content {
        padding: 15px 12px;
    }
    
    .profile-item {
        padding: 12px 0;
    }
    
    .profile-item-title {
        font-size: 14px;
    }
    
    .profile-item-desc {
        font-size: 13px;
    }
    
    .profile-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .profile-form-cancel, 
    .profile-item-action, 
    .auth-submit {
        width: 100%;
        justify-content: center;
        display: flex;
        margin-top: 10px;
    }
}

/* Form Elements */
.profile-form-header {
    margin-bottom: 25px;
}

.profile-form-header h4 {
    color: var(--color-text-dark);
    font-size: 18px;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.profile-form-header p {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin: 0;
}

.profile-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    box-shadow: 0 0 0 2px rgba(118, 24, 227, 0.15);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.profile-form-actions {
    display: flex;
    justify-content: center; /* Cambiato da flex-end a center */
    margin-top: 30px; /* Aumentato da 24px a 30px per aggiungere più spazio */
    gap: 10px;
}

.profile-form-cancel {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-form-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Alerts */
.alert {
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.alert-danger {
    background-color: rgba(211, 47, 47, 0.1);
    color: #ff5252;
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.alert-success {
    background-color: rgba(56, 142, 60, 0.1);
    color: #69f0ae;
    border: 1px solid rgba(56, 142, 60, 0.2);
}

/* Updated form styles to match labs */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: #fff;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
}

/* Add styles for auth messages and form errors */
.auth-error, .auth-success {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    margin-bottom: 15px;
    border-radius: 8px;
    position: relative;
}

.auth-error {
    background-color: rgba(211, 47, 47, 0.14);
    color: #ff6b6b;
}

/* Nascondi i messaggi di errore in sezioni non attive */
.profile-section:not(.active) .auth-error {
    display: none !important;
}

.auth-success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #69f0ae;
}

.auth-error svg, .auth-success svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.auth-error svg {
    fill: #ff5252;
}

.auth-success svg {
    fill: #69f0ae;
}

.auth-message {
    flex: 1;
    color: #fff;
    font-size: 14px;
}

.auth-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.auth-close svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.6);
    margin-right: 0;
}

/* Stili per i badge di errore nei campi - Matching signup.php */
.form-error {
    color: #d32f2f;
    font-size: 12px;
    font-weight: 500;
    display: none;
    margin-left: 10px;
    background-color: #ffeaea;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.form-label-container {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .form-label-container {
        align-items: flex-start;
    }
    
    .form-error {
        margin-left: 0;
        margin-top: 0px;
        white-space: normal;
    }
}

.form-control.is-invalid {
    border-color: #d32f2f;
    background-color: #fff6f6;
}

.form-control.is-invalid:focus {
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.1);
}

/* Make sure errors display with forms in either structure */
input.is-invalid ~ .form-error,
.form-group:has(.is-invalid) .form-error,
.mb-3:has(.is-invalid) .form-error {
    display: inline-block !important;
}

.form-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.auth-submit {
    display: inline-block;
    padding: 8px 18px;
    background: #fff;
    color: #7618e3;
    font-weight: 500;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.auth-submit:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Add body background to match labs theme */
body {
    background: linear-gradient(45deg, #120338, #2a075e);
    color: #fff;
}

/* Ensure the section looks good with the gradient background */
.masthead-docs {
    background: transparent;
}

/* Aggiungo stili per l'icona del prodotto e la badge licenza a vita */
.product-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    width: 26px;
    height: 26px;
    vertical-align: middle;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.purchase-product-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    width: 24px;
    height: 24px;
}

.purchase-product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-item-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #fff;
    font-size: 15px;
    flex-wrap: wrap;
}

.lifetime-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #8729ff, #7618e3);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 50px;
    margin-left: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(135, 41, 255, 0.3);
}

.lifetime-badge:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
    margin-right: 5px;
}

/* Assicuriamoci che i layout funzionino anche su mobile */
@media (max-width: 576px) {
    .profile-item-title {
        margin-bottom: 6px;
    }
    
    .lifetime-badge {
        margin-top: 5px;
        margin-left: 40px;
    }
}

/* Assicuro che la sezione acquisti possa espandersi completamente */
#section-purchases.profile-section.form-active .profile-section-content {
    max-height: none;
    height: auto;
    overflow: visible;
}

/* Specifico stile per il contenitore dei dispositivi */
#devices-data-DBPRO, #devices-data-DBST {
    max-height: none;
    height: auto;
    overflow: visible;
}

/* Stile per la lista dei dispositivi */
.devices-list {
    margin-top: 20px;
    margin-bottom: 30px; /* Aumentato per dare più spazio */
    max-height: none;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Stili specifici per centrare i pulsanti nelle varie sezioni */
#devices-data-DBPRO .profile-form-actions,
#devices-data-DBST .profile-form-actions,
.devices-form .profile-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 10px;
    width: 100%;
}

/* Assicurarsi che i pulsanti abbiano dimensioni uniformi */
.profile-form-cancel, 
.auth-submit {
    min-width: 150px;
    text-align: center;
    justify-content: center;
}

/* Styling per bottoni di chiusura */
.profile-form-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Aggiustare lo spazio nei contenitori dei dispositivi */
.license-info {
    margin-bottom: 30px;
}

/* Assicurarsi che il contenitore dei dispositivi abbia spazio adeguato */
#devices-data-DBPRO, 
#devices-data-DBST {
    padding: 10px 0;
}

/* Assicurarsi che il pulsante di chiusura sia ben visibile e centrato */
.devices-form .profile-form-cancel {
    min-width: 120px;
    padding: 10px 20px;
    margin-top: 20px;
}

/* Stili per il modal dei dispositivi */
.devices-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.devices-modal-content {
position: fixed;
width: 90%;
max-width: 800px;
margin: 40px auto;
background: #170734;
border-radius: 16px;
padding: 30px;
border: 1px solid rgb(188 140 255 / 40%);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
transform: translateY(-20px);
opacity: 0;
transition: transform 0.3s ease, opacity 0.3s ease;
height: 80%;
overflow-y: scroll;
scrollbar-width: none;
top: 0;
bottom: 0;
margin: auto;
left: 0;
right: 0;
}

.devices-modal.active .devices-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.devices-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.devices-modal-header h4 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.devices-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.devices-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.devices-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.9);
}

.devices-modal-body {
    margin-bottom: 20px;
}

.devices-modal-footer {
    display: flex;
    justify-content: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Blocca lo scroll del body quando il modal è aperto */
body.modal-open {
    overflow: hidden;
}



/* Stili per lo storico acquisti */
.profile-form {
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    width: 100%;
}

.profile-form-header {
    margin-bottom: 25px;
}

.profile-form-header h4 {
    color: var(--color-text-dark);
    font-size: 18px;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.profile-form-header p {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin: 0;
}

.purchase-history-list {
    margin-bottom: 25px;
    width: 100%;
}

.purchase-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.purchase-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

/* Removed colored left borders - styles were removed */

.purchase-item.subscription .purchase-product-icon svg {
    color: #ffffff;
}

.purchase-item-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.purchase-product {
    display: flex;
    align-items: center;
}

.purchase-product-icon {
    margin-right: 10px;
    color: #ffffff;
}

.purchase-product-name {
    font-weight: 600;
    color: #fff;
}

.purchase-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.purchase-details {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.purchase-detail {
    margin-bottom: 8px;
}

.purchase-detail-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.purchase-detail-value {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.purchase-actions {
    padding: 0 15px 15px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.purchase-action {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 30px;
    background-color: var(--color-primary);
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: none;
    text-decoration: none;
}

.purchase-action:hover {
    background-color: var(--color-primary-dark, #6010be);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.purchase-action svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* Stili responsivi per lo storico acquisti */
@media (max-width: 768px) {
    .purchase-details {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .purchase-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .purchase-date {
        margin-top: 5px;
    }
    
    .purchase-details {
        grid-template-columns: 1fr;
    }
}

#purchase-history-form .purchase-item .purchase-detail-value {
    font-weight: 500;
    color: #fff;
}

/* Stili per il form dello storico acquisti */
#purchase-history-form {
    width: 100%;
    max-width: 100%;
    height: 100%;
    background: transparent;
    position: relative;
    display: none;
}

/* Nascondi il pulsante Chiudi nel form dello storico acquisti */
#purchase-history-form .profile-form-actions {
    display: none;
}

/* Adatta la visualizzazione per dispositivi mobili */
@media (max-width: 768px) {
    .purchase-details {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.promo-banner-bg img {
    position: absolute;
    right: 30px;
    height: 90%;
    bottom: 0;
}

/* Media query per dispositivi mobili */
@media screen and (max-width: 768px) {
    .promo-banner-bg {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .promo-banner-bg img {
        position: absolute;
        right: 50%;
        transform: translateX(50%);
        height: 130px;
        bottom: 5px;
        opacity: 0.85;
    }
    
    .promo-banner-content {
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .promo-banner-content button {
        margin-top: 10px;
    }
}

/* Per schermi molto piccoli */
@media screen and (max-width: 480px) {
    
}




/* Reactivate Modal Styles */
.reactivate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.reactivate-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.reactivate-modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
}

.reactivate-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    margin-bottom: 24px;
}

.reactivate-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.reactivate-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.reactivate-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.reactivate-modal-close svg {
    width: 20px;
    height: 20px;
}

.reactivate-modal-body {
    padding: 0 24px;
}

.reactivate-confirmation {
    text-align: center;
    margin-bottom: 24px;
}

.confirmation-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-icon svg {
    width: 30px;
    height: 30px;
    color: #22c55e;
}

.confirmation-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: white;
}

.confirmation-details {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px;
    line-height: 1.5;
}

.reactivate-benefits {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin-top: 20px;
}

.reactivate-benefits h4 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: white;
}

.reactivate-benefits ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.reactivate-benefits li {
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reactivate-benefits li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #22c55e;
}

.reactivate-modal-footer {
    display: flex;
    gap: 12px;
    padding: 24px;
    justify-content: flex-end;
}

.reactivate-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.reactivate-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reactivate-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.reactivate-modal-btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.reactivate-modal-btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.reactivate-modal-btn svg {
    width: 16px;
    height: 16px;
}

.reactivate-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive for Reactivate Modal */
@media (max-width: 768px) {
    .reactivate-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .reactivate-modal-footer {
        flex-direction: column;
    }
    
    .reactivate-modal-btn {
        width: 100%;
        justify-content: center;
    }
}

.cancel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cancel-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.cancel-modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
}

.cancel-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    margin-bottom: 24px;
}

.cancel-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.cancel-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cancel-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.cancel-modal-close svg {
    width: 20px;
    height: 20px;
}

.cancel-modal-body {
    padding: 0 24px;
}

.cancel-warning {
    text-align: center;
    margin-bottom: 24px;
}

.warning-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-icon svg {
    width: 30px;
    height: 30px;
    color: #ffc107;
}

.warning-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: white;
}

.warning-details {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px;
    line-height: 1.5;
}

.cancel-consequences {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin-top: 20px;
}

.cancel-consequences h4 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: white;
}

.cancel-consequences ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cancel-consequences li {
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cancel-consequences li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.cancel-consequences li svg:first-child {
    color: #22c55e; /* Green for positive items */
}

.cancel-consequences li:nth-child(3) svg {
    color: #ef4444; /* Red for negative item */
}

.cancel-consequences li:nth-child(4) svg {
    color: #3b82f6; /* Blue for info item */
}

.cancel-modal-footer {
    display: flex;
    gap: 12px;
    padding: 24px;
    justify-content: flex-end;
}

.cancel-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.cancel-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.cancel-modal-btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.cancel-modal-btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.cancel-modal-btn-primary {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.cancel-modal-btn-primary:hover {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.cancel-modal-btn svg {
    width: 16px;
    height: 16px;
}

.cancel-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Success and Error States */
.cancel-success, .cancel-error {
    text-align: center;
    padding: 20px 0;
}

.success-icon, .error-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon {
    background: rgba(34, 197, 94, 0.2);
}

.success-icon svg {
    width: 30px;
    height: 30px;
    color: #22c55e;
}

.error-icon {
    background: rgba(239, 68, 68, 0.2);
}

.error-icon svg {
    width: 30px;
    height: 30px;
    color: #ef4444;
}

.success-message, .error-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: white;
}

.success-details, .error-details {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

/* Loading spinner */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .cancel-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .cancel-modal-footer {
        flex-direction: column;
    }
    
    .cancel-modal-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive for Devices Modal */
@media (max-width: 768px) {
    .devices-modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
        height: 85%;
        max-height: calc(100vh - 40px);
    }
    
    .devices-modal-header {
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .devices-modal-header h4 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .devices-modal-content {
        width: 98%;
        margin: 10px auto;
        padding: 15px;
        height: 90%;
        max-height: calc(100vh - 20px);
    }
    
    .devices-modal-header h4 {
        font-size: 15px;
    }
}

/* Additional responsive for Cancel Modal */
@media (max-width: 480px) {
    .cancel-modal {
        padding: 10px;
    }
    
    .cancel-modal-content {
        max-width: none;
        width: 100%;
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }
    
    .cancel-modal-header {
        padding: 16px 16px 0;
        margin-bottom: 16px;
    }
    
    .cancel-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .cancel-modal-body {
        padding: 0 16px;
    }
    
    .cancel-modal-footer {
        padding: 16px;
    }
    
    .cancel-modal-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}
