/* --- Menu Profilo Moderno --- */
.dash-profile-menu-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.dash-profile-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,1);
}

.dash-profile-menu-trigger:hover {
    background-color: #f1f5f9; /* Sfondo chiaro ma non bianco */
    color: #1e3a5f; /* Testo scuro e leggibile */
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.dash-profile-icon,
.dash-arrow {
    flex-shrink: 0;
}

.dash-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: #757575;
}

.dash-profile-menu-dropdown.dash-visible .dash-arrow {
    transform: rotate(180deg);
}

.dash-profile-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 8px 0 0;
    padding: 10px 0;
    min-width: 240px;
    z-index: 100;
    border: 1px solid #eee;
    overflow: hidden;
}

.dash-profile-menu-dropdown.dash-visible {
    display: block !important;
}

.dash-profile-menu-dropdown li {
    margin: 0;
}

.dash-profile-menu-dropdown a,
.dash-menu-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.dash-menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dash-profile-menu-dropdown a:hover {
    background-color: #f1f5f9;
}

.dash-logout-link:hover {
    background-color: #fff1f0 !important;
    color: #d32f2f !important;
}

.dash-delete-link {
    color: #d32f2f;
}

.dash-delete-link:hover {
    background-color: #fff1f0;
    color: #d32f2f;
}

/* Divider */
.dash-menu-divider {
    height: 1px;
    background-color: #eee;
    margin: 6px 0;
    padding: 0;
    list-style: none;
}

.dash-menu-error {
    color: #d32f2f;
    padding-left: 20px;
}

/* 🔹 Sfondo scuro tipo popup quando il menu è aperto */
body:has(.dash-profile-menu-dropdown.dash-visible)::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55); /* nero/blu trasparente */
    z-index: 900;                        /* sotto al menu (1000) ma sopra al resto */
    pointer-events: auto;                /* blocca i click sotto, come un vero popup */
}

/* --- Dashboard Principale --- */
.dash-user-dashboard {
    border: 1px solid #e0e0e0;
    padding: 28px;
    border-radius: 20px;
    max-width: 420px;
    margin: 80px auto 20px; /* aumentato margine superiore per non sovrapporsi al menu */
    background-color: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,1);
    position: relative;
}

.dash-user-dashboard h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
}

.dash-user-dashboard ul {
    list-style: none;
    padding-left: 0;
}

.dash-user-dashboard ul li {
    margin-bottom: 14px;
    font-size: 15px;
    color: #495057;
}

.dash-user-dashboard ul li strong {
    color: #2c3e50;
    font-weight: 600;
}

.dash-status-verified {
    color: #4caf50;
    font-weight: 600;
}

.dash-status-unverified {
    color: #f44336;
    font-weight: 600;
}

/* --- Bottone CTA --- */
.dash-dashboard-button-box {
    margin-top: 32px;
    text-align: center;
}

.dash-dashboard-button-message {
    margin-bottom: 16px;
    font-size: 16px;
    color: #546e7a;
    font-weight: 500;
}

.dash-button {
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 17px;
    padding: 14px 20px;
    box-sizing: border-box;
}

.dash-button-primary {
    background-color: #1e88e5;
    color: white;
    width: 100%;
    border: none;
}

.dash-button-primary:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .dash-profile-menu-container {
        position: relative;
        top: auto;
        right: auto;
        margin: 0 auto 20px;
        text-align: center;
    }

    .dash-user-dashboard {
        margin: 20px 16px;
        padding: 24px;
    }
}
