/* Admin Dropdown Menu */

.admin-info {
    position: relative !important;
    cursor: pointer;
    z-index: 1001 !important;
}

/* Dropdown Menu */
.admin-dropdown {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    min-width: 220px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition-base);
    z-index: 10000 !important;
    overflow: hidden;
    pointer-events: none;
}

.admin-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1);
    pointer-events: auto !important;
}

/* Dropdown Arrow */
.admin-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    border-left: 2px solid var(--border-color);
    border-top: 2px solid var(--border-color);
    transform: rotate(45deg);
    z-index: 1;
}

/* Dropdown Header */
.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.05), 
        rgba(59, 130, 246, 0.05));
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    box-shadow: 
        0 4px 12px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.dropdown-user-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.dropdown-user-details p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Dropdown Menu Items */
.dropdown-menu {
    padding: 8px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.05), transparent);
    transition: left 0.6s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.08), 
        rgba(16, 185, 129, 0.04));
    transform: translateX(4px);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all var(--transition-base);
}

.dropdown-item:hover svg {
    transform: scale(1.1) rotate(-5deg);
    color: var(--primary-color);
}

/* Logout Item Special Styling */
.dropdown-item.logout {
    color: var(--error-color);
    margin-top: 4px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.dropdown-item.logout:hover {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.08), 
        rgba(239, 68, 68, 0.04));
    box-shadow: inset 3px 0 0 var(--error-color);
}

.dropdown-item.logout svg {
    color: var(--error-color);
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Click Outside Overlay */
.dropdown-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999 !important;
    display: none;
    background: transparent;
}

.dropdown-overlay.active {
    display: block !important;
}

/* Animation for dropdown items */
.dropdown-item {
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.dropdown-item:nth-child(1) { animation-delay: 0.05s; }
.dropdown-item:nth-child(2) { animation-delay: 0.1s; }
.dropdown-item:nth-child(3) { animation-delay: 0.15s; }
.dropdown-item:nth-child(4) { animation-delay: 0.2s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-dropdown {
        min-width: 200px;
        right: -10px;
    }
    
    .dropdown-header {
        padding: 16px;
    }
    
    .dropdown-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Smooth entrance animation */
@keyframes dropdownEnter {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-dropdown.active {
    animation: dropdownEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
