/* --- Menu Profilo (identico alla dashboard) --- */
.an-profile-menu-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.an-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);
}

.an-profile-menu-trigger:hover {
    background-color: #f1f5f9;
    color: #1e3a5f;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

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

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

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

.an-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;
}

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

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

.an-profile-menu-dropdown a,
.an-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;
}

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

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

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

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

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

/* --- Annunci --- */
.an-page-title {
    text-align: center;
    color: #2c3e50;
    margin: 80px 0 16px;
    font-size: 22px;
    font-weight: 600;
}

.an-annunci-count {
    text-align: center;
    margin: 0 0 24px;
    font-size: 0.95em;
    color: #666;
    font-style: italic;
}

.an-no-ads-message {
    margin-top: 120px;
    text-align: center;
    font-style: italic;
    color: #777;
    font-size: 18px;
}

.an-user-ads-list {
    max-width: 600px;
    margin: 0 auto 40px;
}

.an-user-ad-box {
    border: 1px solid #e0e0e0;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,1);
    text-align: center;
}

.an-user-ad-box h4 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2c3e50;
    font-size: 18px;
}

.an-user-ad-box ul {
    display: inline-block;
    text-align: left;
    margin-top: 10px;
    width: 100%;
}

.an-user-ad-box ul li {
    margin-bottom: 8px;
    font-size: 15px;
    color: #495057;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.an-user-ad-box ul li strong {
    color: #2c3e50;
    font-weight: 600;
}

.an-multi-comune-text {
    display: inline-block;
    white-space: pre-line;
    word-break: break-word;
}

.an-logo-preview img {
    max-width: 100%;
    max-height: 80px;
    border: 1px solid #ddd;
    border-radius: 6px;
    object-fit: contain;
    margin-top: 6px;
}

.an-logo-preview span {
    font-style: italic;
    color: #777;
    font-size: 14px;
}

.an-ad-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.an-button {
    text-decoration: none;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 100px;
}

.an-button-edit {
    background-color: #1e88e5;
}

.an-button-edit:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(30, 136, 229, 0.3);
}

.an-button-delete {
    background-color: #e53935;
}

.an-button-delete:hover {
    background-color: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(229, 57, 53, 0.3);
}

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

    .an-page-title {
        margin-top: 40px;
    }

    .an-user-ad-box {
        padding: 20px;
        margin-left: 12px;
        margin-right: 12px;
    }

    .an-ad-actions {
        flex-direction: column;
        align-items: center;
    }

    .an-button {
        width: 100%;
        max-width: 250px;
    }
}
